ACTOR DeathKnightPlayer : PlayerPawn
{
  Health 1250
  Radius 24
  Height 72
  Mass 700 
  Speed 1.0
  DamageFactor "Player", 0.75
  Player.ColorRange 0, 0
  Player.JumpZ 12
  Player.MaxHealth 16000
  Player.DisplayName "DeathKnight"
  Player.MorphWeapon "DeathKnightWeapon0"
  Player.SoundClass "DeathKnight"
  Player.StartItem "Mana", 100
  DamageFactor "Boss", 0
  limitedtoteam 1
  MeleeSound "monster/dknhit" 
  SeeSound "monster/dknsit" 
  PainSound "monster/dknpai" 
  DeathSound "monster/dkndth" 
  ActiveSound "monster/dknact" 
  +THRUSPECIES
  +NOSKIN
  -PICKUP
  states
{
  See:
	Spawn:
		DKNT AB 10
		Loop
	See:
       DKNT AABBCCDD 3 
		Loop
	Missile:
	   DKNT A 1 a_jumpifinventory("deathshieldcheck", 1, "shield")
	   DKNT A 1 a_jumpifinventory("deathshieldcheck", 1, "shield")
       DKNT E 5 
       DKNT F 1 
       DKNT F 6 
       DKNT G 6
    Goto See
	Shield:
	DKNT T 3
	DKNT U 7 bright
	   
	Goto See
	Death:
		TNT1 A 0 A_SpawnItem("DeathKnightDying")
		TNT1 A 0 a_givetotarget("BOSSKILLEDSTAT", 1)
		TNT1 A 0 a_givetotarget("reward", 1)
		TNT1 A 1 A_Scream
		BLAN A -1
    stop
}
}

actor deathshieldcheck : Inventory
{
	inventory.maxamount 1
}

actor DeathKnightattackmode4 : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
  States
  {
  Spawn:
    TNT1 A -1
    Stop
  }
}

ACTOR DeathKnightWeapon : Weapon 
{
 Weapon.SelectionOrder 800
 Obituary "%o was vaporized by %k"
 Inventory.PickupMessage ""
 Inventory.PickupSound "misc/pk_up"
 Weapon.AmmoUse 0
 Weapon.AmmoGive 0
 Weapon.AmmoType "Mana"
 +WEAPON.NOAUTOAIM
 +INVENTORY.UNDROPPABLE
  States
 {
  Spawn:
       TNT1 A -1
       Loop
  Ready:
       CLA2 A 1 A_WeaponReady
       goto ready
  Deselect:
       CLA2 A 1 A_Lower
       Loop
  Select:
       CLA2 A 0 A_Raise
       Loop
  Fire:
       TNT1 A 0 A_jumpIfinventory("DeathKnightattackmode1", 1, "StunAttackcheck")
       TNT1 A 0 A_jumpIfinventory("DeathKnightattackmode2", 1, "AssassinateAttackcheck")
       TNT1 A 0 A_jumpIfinventory("DeathKnightattackmode3", 1, "DragonDashAttackcheck")
	   TNT1 A 0 A_jumpIfinventory("DeathKnightattackmode4", 1, "FlameSwordcheck")
	   Goto ready
  AltFire:
  	   CLA2 A 1 ACS_execute(812)
       CLA2 A 1
       CLA2 A 15
       goto ready
  StunAttack:
	   TNT1 A 0 A_Giveinventory("deathshieldcheck", 1)
       TNT1 A 0 A_Takeinventory("mana", 15)
       TNT1 A 0 A_GunFlash
       CLA2 B 10 bright
       TNT1 A 0 A_FireCustomMissile("DeathKnightStun")
	   TNT1 A 0 a_takeinventory("deathshieldcheck", 1)
  goto ready
  AssassinateAttack:
       TNT1 A 0 A_Takeinventory("mana", 40)
	   TNT1 A 0 ACS_EXECUTEALWAYS(617, 0, 10, 50)
       TNT1 A 0 A_PlaySound ("monster/dknpai")
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("deathknightassassinate")
	   CLA2 B 1 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DKFIRE", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
       CLA2 A 10 bright
  goto ready
  DragonDashAttack:
       TNT1 A 0 A_Takeinventory("mana", 80)
       TNT1 A 0 A_PlaySound ("DRAGDASH")
	   TNT1 A 0 ACS_EXECUTEALWAYS(617, 0, 10, 64)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 B 0 a_firecustommissile("DragonDashAttack")
	   CLA2 B 1 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
	   CLA2 A 0 Bright a_spawnitemex("DeathFireFX2nodmg", random(-30, 30), random(-30, 30), 0, 0 ,0 , 0 ,0, 0)
       CLA2 A 10 bright
       CLA2 A 6
  goto ready
  FlameSwordAttack:
       TNT1 A 0 A_Takeinventory("mana", 40)
       TNT1 A 0 A_PlaySound("FlameSword/Attack", CHAN_WEAPON)
	   TNT1 A 0 A_FIRECUSTOMMISSILE("DeathFlameSwordProjectile",0,0,24,12,0)
	   TNT1 A 0 A_FIRECUSTOMMISSILE("DeathFlameSwordProjectile",0,0,12,6,0)
	   TNT1 A 0 A_FIRECUSTOMMISSILE("DeathFlameSwordProjectile",0,0,0,0,0)
	   TNT1 A 0 A_FIRECUSTOMMISSILE("DeathFlameSwordProjectile",0,0,-12,-6,0)
	   TNT1 A 0 A_FIRECUSTOMMISSILE("DeathFlameSwordProjectile",0,0,-24,-12,0)
	   CLA2 A 10 bright
       CLA2 A 6
	   Goto Ready
  StunAttackcheck:
       TNT1 A 0 A_jumpIfinventory("mana", 15, "StunAttack")
  goto ready
  AssassinateAttackcheck:
       TNT1 A 0 A_jumpIfinventory("mana", 40, "AssassinateAttack")  
  goto ready
  DragonDashAttackcheck:
       TNT1 A 0 A_jumpIfinventory("mana", 80, "DragonDashAttack")  
       goto ready
  FlameSwordcheck:
       TNT1 A 0 A_jumpIfinventory("mana", 40, "FlameSwordAttack")  
       goto ready
  Flash:
       SNIF F 3 Bright A_Light2
       SNIF F 3 Bright A_Light1
       SNIF F 0 Bright A_Light0
       Goto LightDone     
       }
}

ACTOR DeathFlameSwordProjectile 
{
	Speed 30
	Radius 16
	Height 8
	Damage (50)
	Projectile
	RenderStyle Add
	Decal "FlameSwordDecal"
	SeeSound "FlameSword/Fire"
	DeathSound "FlameSword/Explode"
	Obituary "%o was burned to a crisp by %k."
    DamageType "Boss"
    +FORCERADIUSDMG
	States
	{
	Spawn:
		FSPT ABC 3 Bright A_CustomMissile("FlameSwordProjectileTrail",0,0,0,3)
		Loop
	Death:
        FSPT D 4 Bright 
        FSPT E 3 Bright A_SpawnItem("FlameSwordProjectileEffect2")
		FSPT E 0 A_Explode(32,128,0)	
        FSPT F 4 Bright
        FSPT G 3 Bright
        FSPT H 4 Bright
        FSPT I 3 Bright
        FSPT J 4 Bright
        FSPT KLM 3 Bright
        Stop
	}
}

// Evil Knight
actor EvilKnight
{
    Health 250
    Radius 20
    Height 56
    PainChance 100
    Mass 150
    MeleeDamage 10
    MeleeRange 100
    Speed 11
    Scale 0.85
    Monster
    +FLOORCLIP
    SeeSound "dknight/sight"
    ActiveSound "dknight/active"
    MeleeSound "dknight/melee"
    PainSound "dknight/pain"
    DeathSound "dknight/death"
    HitObituary "%o was sliced by evil knight."
    Obituary "%o was burned from evil knight's fireballs."
		Species "Boss"
  +THRUSPECIES
  +MISSILEMORE
  +DONTGIB
  +NOTARGET
  +SHOOTABLE
  +DONTHURTSPECIES
  +QUICKTORETALIATE
  +NOINFIGHTING
    States
    {
    Spawn:
       KNGT E 5 A_Look
       Loop
    See:
       KNGT AABBCCDD 2 A_Chase
       Loop
	Clear:
		TNT1 A 0 A_ClearTarget
        KNGT AABBCCDD 2 A_Wander
		Goto See
    Melee:
	   TNT1 A 0 A_JumpIfInTargetInventory("DeathKnightWeapon", 1, "Clear")
       KNGT E 5 A_FaceTarget
       KNGT F 4 A_FaceTarget
       KNGT F 0 A_PlaySound("dknight/swing")
       KNGT FGH 4
       KNGT I 4 A_MeleeAttack
       KNGT J 5
       KNGT E 3
       Goto See
    Missile:
	   TNT1 A 0 A_JumpIfInTargetInventory("DeathKnightWeapon", 1, "Clear")
       KNGT E 5 A_FaceTarget
       KNGT F 4 A_FaceTarget
       KNGT FGH 4
       KNGT I 1 A_CustomMissile("KFireBall",32,0,-6)
       KNGT I 1 A_CustomMissile("KFireBall",32,0,-3)
       KNGT I 1 A_CustomMissile("KFireBall",32,0,0)
       KNGT I 1 A_CustomMissile("KFireBall",32,0,3)
       KNGT I 1 A_CustomMissile("KFireBall",32,0,6)
       KNGT I 1 A_CustomMissile("KFireBall",32,0,9)
       KNGT E 3
       Goto See
   Pain:
       KNGT E 3 A_Pain
       KNGT E 3
       Goto See
   Death:
       KNGT K 6 A_Scream
       KNGT LM 5 a_spawnitemex("AmmoPack2", random(-10, 10), random(-10, 10), random(20, 44), random(1,2), random(1,2), random(3,4), 0, 0, 100)
	   KNGT LL 0 a_spawnitemex("StimPack2", random(-10, 10), random(-10, 10), random(20, 44), random(1,2), random(1,2), random(3,4), 0, 0)
       KNGT NOPQ 5
       KNGT R 1 A_NoBlocking
       KNGT R -1
       Stop
   }
}
       
actor KFireBall
{
    Radius 4
    Height 4
    Speed 16
    Damage 2
    DamageType "Fire"
    Alpha 0.65
    
    Projectile
    +ROCKETTRAIL
    RenderStyle Translucent
    SeeSound "dknight/attack"
    DeathSound "imp/shotx"
    States
    {
    Spawn:
       FDMB A 2 Bright
       Loop
    Death:
       FDMB BCDE 2 Bright
       Stop
    }
}


actor ArcherKnight 30010
{
    Health 50
    Radius 20
    Height 56
    Speed 13
    PainChance 200
	Mass 200
    MONSTER 
    SeeSound "archer/sight"
    AttackSound "archer/attack"
    PainSound "archer/pain"
    DeathSound "archer/death"
    ActiveSound "archer/growl"
    Obituary "%o was pierced by a Knight Archer."
	Species "Boss"
  +THRUSPECIES
  +MISSILEMORE
  +DONTGIB
  +NOTARGET
  +SHOOTABLE
  +DONTHURTSPECIES
  +QUICKTORETALIATE
  +NOINFIGHTING
    States
    {
    Spawn:
        KNIG AB 10 A_Look
        Loop
    See:
        KNIG AABBCCDD 3 A_Chase
        Loop
	Clear:
		TNT1 A 0 A_ClearTarget
        KNIG AABBCCDD 3 A_Wander
		Goto See
    Missile:
        TNT1 A 0 A_JumpIfInTargetInventory("DeathKnightWeapon", 1, "Clear")
		KNIG E 0 A_Jump(64,"Missile2")
        KNIG E 3 A_PlaySound("archer/draw")
        KNIG E 10 A_FaceTarget
        KNIG F 5 bright A_CustomMissile("ArcherArrow",32,5)
		KNIG E 5
        Goto See
	Missile2:	
        KNIG E 3 A_PlaySound("archer/draw")
        KNIG E 10 A_FaceTarget
        KNIG G 5 bright A_CustomMissile("ArcherArrow2",32,5)
		KNIG E 5
        Goto See
    Pain:
    	KNIG H 3
        KNIG H 3 A_Pain
    	Goto See
    Death:
        KNIG I 5 A_Scream
        KNIG J 5 A_NoBlocking
        KNIG KLMN 5 a_spawnitemex("AmmoPack2", random(-10, 10), random(-10, 10), random(20, 44), random(1,2), random(1,2), random(3,4), 0, 0, 100)
        KNIG N -1
        Stop
    XDeath:
        KNIG O 5 A_PlaySound("archer/gib")
        KNIG P 5 A_NoBlocking
        KNIG QRSTUVWX 5
        KNIG X -1
        Stop
    Raise:
        KNIT MLKJIH 3
        Goto See
    }
}


actor ArcherArrow
{
   Radius 5
   Height 12
   Speed 16
   Damage (15)
   PROJECTILE
   +NOGRAVITY
   +ThruSpecies
   renderstyle add
   alpha 0.8
   scale 0.5
   SeeSound "archer/attack"
   DeathSound "archer/hit"
   damagetype boss
   Species "Boss"
   States
   {
   Spawn:
      VEKF A 1 bright A_SpawnItem("ArcherArrowTrail")
      Loop
   Death:
      VEKF FGHI 3 bright
	Stop
   }
}

actor ArcherArrowTrail
{
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	renderstyle add
	alpha 0.5
	States
	{
		Spawn:
		VEKF AABCDE 3 A_FadeOut(0.1)
		loop
	}
}

actor ArcherArrow2 : ArcherArrow
{
   Speed 20
   Damage (30)
   SeeSound "archer/attackboss"
   States
   {
   Spawn:
      VEKG A 1 bright A_SpawnItem("ArcherArrowTrail2")
      Loop
   Death:
      VEKG FGHI 3 bright
	Stop
   }
}

actor ArcherArrowTrail2 : ArcherArrowTrail
{
	States
	{
		Spawn:
		VEKG AABCDE 3 A_FadeOut(0.1)
		loop
	}
}