Actor LegendaryDeathKnight : HEMDeathKnight 30305
{
Health 5500
Speed 8
Scale 1.25
Species "SS"
Damagetype "SS"
DamageFactor "SS", 0.0
DamageFactor "Void", 0
DamageFactor BruiserFire, 0
DamageFactor "None", 0.3
DamageFactor "Sharp", 0
DamageFactor "Ice", 0.2
Damagefactor "Melee", 0.5
Damagefactor "Crush", 0.1
Damagefactor "Acid", 0.1
Damagefactor "Fire", 0.1
Damagefactor "Poison", 0.0
Damagefactor "PoisonCloud", 0.1
Damagefactor "Electric", 0.01
Damagefactor "Disintegrate", 0.01
DamageFactor "DrainLife", 0.0
DamageFactor "Extreme", 0.0
DamageFactor "Player", 0.3
DamageFactor "Players", 0.02
DamageFactor "PyroShot", 0.10
DamageFactor "PlayerPyro", 0.10
DamageFactor "PDTPuff", 0.0
DamageFactor "Explosion", 0.2
DamageFactor "NuclearFire", 0.01
DamageFactor "BFG9500Ball", 0.5
DamageFactor "BFGSplash", 0.5
DamageFactor "UpBFG9500Ball", 0.5
DamageFactor "UpBFGSplash", 0.4
DamageFactor "PDTBFG", 0.3
DamageFactor "PDTBFGTracer", 0.3
DamageFactor "PlayerDevBall", 0.2
DamageFactor "PlayerDevBall2", 0.2
DamageFactor "PlayerDevTracer", 0.30
DamageFactor "PlayerDBFG2", 0.2
DamageFactor "PlayerDBFG10K2", 0.2
DamageFactor "PlayerDBFGSplash2", 0.2
DamageFactor "PlayerBHole", 0.25
DamageFactor "PlayerNemesisPlasma", 0.4
DamageFactor "LegendaryPlayer", 0.2
DamageFactor "PlayerHellfire", 0.1
DamageFactor "SuperWeapon", 0.0
DamageFactor "LegendaryGuruPlayer", 0.05
DamageFactor "Legendary", 0.0
DamageFactor "Legendary1", 0.0
DamageFactor 0.55
DropItem "LegendaryBossLifeEssence" 256
DropItem "LegendaryBossArmorBonusMax" 256
DropItem "LegendaryBossLifeEssence" 128
DropItem "LegendaryBossArmorBonusMax" 128
DropItem "LegendaryLMGBulletMag", 250, 6
DropItem "LegendaryBulletBox", 125
DropItem "ReforcedLegendaryArmor" 140 1
DropItem "LegAmmoSphere", 100
DropItem "PortableMedCell", 256, 1
DropItem "PortableMedCellPack", 256, 1
DropItem "ArmorPlate" 256
DropItem "ArmorPlate" 256
DropItem "ArmorPlate" 256
DropItem "AmmoPack", 256
DropItem "Megapack", 256
DropItem "LegendarySyringe", 256, 1
Tag "\c[z3]Legendary Death Knight\c-"
Obituary "%o was terminated by a Legendary Death Knight."
HitObituary "%o's body wasn't able to be identified after being shot by a Legendary Death Knight."
+BOSSDEATH
var int user_music;
States
{
  Spawn:
	LTKN A 10
	TNT1 AA 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_SetUserVar("user_Acounter",430)
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
  SpawnLoop:
	LTKN A 10 A_Look
	TNT1 AA 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_JumpIf(user_currenthp > ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"),"Idle")
	Loop
  Idle:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Rekt")
  IdleLoop:
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	LTKN AB 5 A_Wander
	TNT1 AA 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	LTKN CD 5 A_Wander
	TNT1 AA 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	LTKN AB 5 A_Wander
	TNT1 AA 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	LTKN CD 5 A_Wander
	TNT1 AA 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	TNT1 A 0 A_Jump(128,17,35)
	LTKN AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Look
	TNT1 A 0 A_JumpIf(user_currenthp > ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"),"Avoid")
	TNT1 A 0 A_Jump(128,17,35)
	LTKN AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Look
	TNT1 A 0 A_JumpIf(user_currenthp > ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"),"Avoid")
	TNT1 A 0 A_SetUserVar("user_Acounter",user_Acounter-3)
	TNT1 A 0 A_JumpIf(user_Acounter < 1,"ChangeMusic")
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	Loop
  ChangeMusic:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_Acounter",430)
	TNT1 A 0 A_SetUserVar("user_music",0)
	TNT1 A 0 A_ClearTarget
	Goto Idle
  See:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Rekt")
	Goto SeeLoop
  SeeLoop:
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,805)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 AAA 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LTKN AB 5 A_Chase
	TNT1 A 0 A_JumpIfInTargetLOS("Avoid",360,JLOSF_DEADNOJUMP,1000)
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_JumpIf(user_currenthp > ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"),"Missile")
	TNT1 AAA 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LTKN CD 5 A_Chase
	TNT1 A 0 A_JumpIfInTargetLOS("Avoid",360,JLOSF_DEADNOJUMP,1000)
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	TNT1 A 0 A_SetUserVar("user_Acounter",user_Acounter-1)
	TNT1 A 0 A_JumpIf(user_Acounter < 1,"ChangeMusic")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_JumpIf(user_currenthp > ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"),"Missile")
	Loop
  Melee:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory("Tic",3)
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_Punch
	TNT1 A 0 A_Jump(255,"DoubleHexaTaunt","GoBack")
	Goto DoubleHexa
  Missile:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_JumpIf(user_taunt == 0,"Missile2")
	TNT1 A 0 A_PlaySound("DeathKnight/action",CHAN_VOICE,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SetUserVar("user_taunt",0)
  Missile2:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_Acounter",430)
	TNT1 A 0 A_JumpIfTargetInLOS("GoCloser",90,JLOSF_CLOSENOJUMP|JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,0,2000)
	TNT1 A 0 A_JumpIfTargetInLOS("FireDeathKnight15K",90,JLOSF_CLOSENOJUMP|JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,0,1500)
	TNT1 A 0 A_JumpIfTargetInLOS("BFG10KandChainguns",90,JLOSF_CLOSENOJUMP|JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,0,1000)
	TNT1 A 0 A_JumpIfTargetInLOS("ChainAndRocketGuns",90,JLOSF_CLOSENOJUMP|JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,0,500)
	TNT1 A 0 A_JumpIfTargetInLOS("DoubleHexa",90,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,500,0)
  GoCloser:
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("DeathKnight/jump",CHAN_BODY,1.0,0)
	LTKN P 20 A_Recoil(-40)
	TNT1 A 0 A_JumpIfInventory("Tic",3,"See")
	TNT1 A 0 A_GiveInventory("Tic",1)
	TNT1 A 0 A_JumpIfTargetInLOS("Missile2",90,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS)
	Goto See
  ChainAndRocketGuns:
	TNT1 A 0 A_TakeInventory("Tic",1)
	TNT1 A 0 A_SetUserVar("user_lcounter",0)
	TNT1 A 0 A_CheckFlag(FRIENDLY,5)
	TNT1 A 0 A_TakeInventory("ProjHitCheck",1)
	TNT1 A 0 A_TakeInventory("ProjMissCheck",1)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_CustomMissile("ss-hit-testing",32,0,0,CMF_TRACKOWNER|CMF_CHECKTARGETDEAD)
	LTKN EEEEEEEEEEEEEEEEEEEE 1 A_FaceTarget
	TNT1 A 0 A_CheckFlag(FRIENDLY,"ChainAndRocketGunsLoop")
	TNT1 A 0 A_JumpIfInventory("ProjHitCheck",1,"ChainAndRocketGunsLoop")
	TNT1 A 0 A_JumpIfInventory("ProjMissCheck",1,"Avoid")
	TNT1 A 0 A_Jump(256,"ChainAndRocketGunsEnd")
  ChainAndRocketGunsLoop:
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_CustomBulletAttack(22.5,0,2,random(1,5)*5,"SSBulletPuff",8192,CBAF_NORANDOM)
	TNT1 A 0 A_CustomMissile("LegendaryRocket",62,-18,0,CMF_TRACKOWNER)
	LTKN F 3 Bright A_PlaySound("hitler/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_JumpIfCloser(300,"DoubleHexa")
	TNT1 A 0 A_MonsterRefire(0,"ChainAndRocketGunsEnd")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_CustomBulletAttack(22.5,0,2,random(1,5)*5,"SSBulletPuff",8192,CBAF_NORANDOM)
	TNT1 A 0 A_CustomMissile("LegendaryRocket",62,18,0,CMF_TRACKOWNER)
	LTKN G 3 Bright A_PlaySound("hitler/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_JumpIfCloser(300,"DoubleHexa")
	TNT1 A 0 A_MonsterRefire(0,"ChainAndRocketGunsEnd")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_CustomBulletAttack(22.5,0,2,random(1,5)*5,"SSBulletPuff",8192,CBAF_NORANDOM)
	//TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_InstakillCVAR") == 0,2)
	TNT1 A 0 A_CustomMissile("LegendaryRocket",62,-18,0,CMF_TRACKOWNER)
	LTKN F 3 Bright A_PlaySound("hitler/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_JumpIfCloser(300,"DoubleHexa")
	TNT1 A 0 A_MonsterRefire(0,"ChainAndRocketGunsEnd")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_CustomBulletAttack(22.5,0,2,random(1,5)*5,"SSBulletPuff",8192,CBAF_NORANDOM)
	//TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_InstakillCVAR") == 0,2)
	TNT1 A 0 A_CustomMissile("LegendaryRocket",62,18,0,CMF_TRACKOWNER)
	LTKN G 3 Bright A_PlaySound("hitler/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_JumpIfCloser(300,"DoubleHexa")
	TNT1 A 0 A_MonsterRefire(0,"ChainAndRocketGunsEnd")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_SetUserVar("user_lcounter",user_lcounter+1)
	TNT1 A 0 A_JumpIf(user_lcounter > 20,"ChainAndRocketGunsEnd")
	TNT1 A 0 A_JumpIfCloser(1000,"ChainAndRocketGunsLoop")
	Goto ChainAndRocketGunsEnd
  ChainAndRocketGunsEnd:
	LTKN E 15
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_SetUserVar("user_taunt",1)
	TNT1 A 0 A_Jump(128,"DoubleHexa2")
	TNT1 A 0
	Goto See
  FireDeathKnight15K:
	TNT1 A 0 A_TakeInventory("Tic",1)
	TNT1 A 0 A_CheckFlag(FRIENDLY,6)
	TNT1 A 0 A_TakeInventory("ProjHitCheck",1)
	TNT1 A 0 A_TakeInventory("ProjMissCheck",1)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_CustomMissile("ss-hit-testing",40,-24,0,CMF_TRACKOWNER|CMF_CHECKTARGETDEAD)
	TNT1 A 0 A_CustomMissile("ss-hit-testing",40,24,0,CMF_TRACKOWNER|CMF_CHECKTARGETDEAD)
	LTKN EEEEEEEEEEEEEEEEEEEE 1 A_FaceTarget
	TNT1 A 0 A_SetUserVar("user_lcounter",0)
	TNT1 A 0 A_CheckFlag(FRIENDLY,"FireDeathKnight15KLoop")
	TNT1 A 0 A_JumpIfInventory("ProjHitCheck",1,"FireDeathKnight15KLoop")
	TNT1 A 0 A_JumpIfInventory("ProjMissCheck",1,"Avoid")
	TNT1 A 0 A_Jump(256,"FireDeathKnight15KEnd")
  FireDeathKnight15KLoop:
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	LTKN H 1 A_FaceTarget
	LTKN H 1 A_PlaySound("weapons/bfg15kfire",CHAN_WEAPON,1.0,0)
	LTKN H 1 BRIGHT A_CustomMissile("LegDeathKnight15k",40,-24,random(4,-8),CMF_TRACKOWNER)
	LTKN H 1 BRIGHT A_CustomMissile("LegDeathKnight15k",40,24,random(4,-8),CMF_TRACKOWNER)
	LTKN H 4 A_FaceTarget
	LTKN H 1 A_MonsterRefire(0,"FireDeathKnight15KEnd")
	TNT1 A 0 A_JumpIfCloser(300,"DoubleHexa")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_SetUserVar("user_lcounter",user_lcounter+1)
	TNT1 A 0 A_JumpIf(user_lcounter > 40,"FireDeathKnight15KEnd")
	TNT1 A 0 A_JumpIfCloser(2000,2)
	TNT1 A 0 A_Jump(256,"FireDeathKnight15KEnd")
	TNT1 A 0
	Loop
  FireDeathKnight15KEnd:
	LTKN E 15 A_SetUserVar("user_lcounter",0)
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_SetUserVar("user_taunt",1)
	TNT1 A 0 A_Jump(128,"DoubleHexa2")
	TNT1 A 0
	Goto See
  BFG10KandChainguns:
	TNT1 A 0 A_TakeInventory("Tic",1)
	LTKN EEEEEEEEEEEEEEE 1 A_FaceTarget
	TNT1 A 0 A_SetUserVar("user_lcounter",0)
	TNT1 A 0 A_PlaySound("weapons/charge15k",CHAN_WEAPON,1.0,0)
	LTKN E 8 A_FaceTarget
  BFG10KandChaingunsLoop:
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_CustomBulletAttack(22.5,0,2,random(1,5)*5,"SSBulletPuff",8192,CBAF_NORANDOM)
	TNT1 A 0 A_CustomMissile("LegDeathKnight10K",62,-18,random(4,-8),CMF_TRACKOWNER)
	LTKN F 3 Bright A_PlaySound("hitler/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire",7,1.0,0)
	LTKN F 3 Bright A_MonsterRefire(0,"BFG10KandChaingunsEnd")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_CustomBulletAttack(22.5,0,2,random(1,5)*5,"SSBulletPuff",8192,CBAF_NORANDOM)
	TNT1 A 0 A_CustomMissile("LegDeathKnight10K",62,18,random(4,-8),CMF_TRACKOWNER)
	LTKN G 3 Bright A_PlaySound("hitler/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire",7,1.0,0)
	LTKN G 3 Bright A_MonsterRefire(0,"BFG10KandChaingunsEnd")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_CustomBulletAttack(22.5,0,2,random(1,5)*5,"SSBulletPuff",8192,CBAF_NORANDOM)
	TNT1 A 0 A_CustomMissile("LegDeathKnight10K",62,-18,random(4,-8),CMF_TRACKOWNER)
	LTKN F 3 Bright A_PlaySound("hitler/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire",7,1.0,0)
	LTKN F 3 Bright A_MonsterRefire(0,"BFG10KandChaingunsEnd")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_CustomBulletAttack(22.5,0,2,random(1,5)*5,"SSBulletPuff",8192,CBAF_NORANDOM)
	TNT1 A 0 A_CustomMissile("LegDeathKnight10K",62,18,random(4,-8),CMF_TRACKOWNER)
	LTKN G 3 Bright A_PlaySound("hitler/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire",7,1.0,0)
	LTKN G 3 Bright A_MonsterRefire(0,"BFG10KandChaingunsEnd")
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	TNT1 A 0 A_SetUserVar("user_lcounter",user_lcounter+1)
	TNT1 A 0 A_JumpIf(user_lcounter > 30,"BFG10KandChaingunsEnd")
	TNT1 A 0 A_JumpIfCloser(1500,"BFG10KandChaingunsLoop")
	Goto BFG10KandChaingunsEnd
  BFG10KandChaingunsEnd:
	LTKN E 15 A_PlaySound("weapons/bfg15kcooldown",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_SetUserVar("user_taunt",1)
	TNT1 A 0 A_Jump(128,"DoubleHexa2")
	TNT1 A 0
	Goto See
  DoubleHexa:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	LTKN E 5 A_FaceTarget
	LTKN E 1 A_PlaySound("weapons/hsgfire",CHAN_WEAPON,1.0,0)
	LTKN E 4 A_PlaySound("weapons/hsgfire",7,1.0,0)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),24,Random(6,-6),0)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),-24,Random(6,-6),0)
	LTKN H 1 Bright A_CustomBulletAttack(15.4,10.6,30,Random(1,4)*5,"SSBulletPuff")
	LTKN H 4 Bright A_CustomBulletAttack(15.4,10.6,30,Random(1,4)*5,"SSBulletPuff")
	LTKN E 10 A_FaceTarget
	TNT1 AAAAAA 0 A_SpawnItemEx("BlueShellCasing",10,24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 AAAAAA 0 A_SpawnItemEx("BlueShellCasing",10,-24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	LTKN E 5
	TNT1 A 0 A_Jump(192,3)
	TNT1 A 0 A_PlaySound("DeathKnight/taunt1",CHAN_VOICE,1.0,0)
	TNT1 A 0 A_SetUserVar("user_taunt",0)
	TNT1 A 0
	Goto See
  DoubleHexa2:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	LTKN E 5 A_FaceTarget
	LTKN E 1 A_PlaySound("weapons/hsgfire",CHAN_WEAPON,1.0,0)
	LTKN E 4 A_PlaySound("weapons/hsgfire",7,1.0,0)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),24,Random(6,-6),0)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),-24,Random(6,-6),0)
	LTKN H 1 Bright A_CustomBulletAttack(15.4,10.6,78,Random(1,4)*3,"SSBulletPuff")
	LTKN H 4 Bright A_CustomBulletAttack(15.4,10.6,78,Random(1,4)*3,"SSBulletPuff")
	LTKN E 10 A_FaceTarget	
	TNT1 AAAAAA 0 A_SpawnItemEx("BlueShellCasing",10,24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 AAAAAA 0 A_SpawnItemEx("BlueShellCasing",10,-24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	LTKN E 5
	Goto See
  DoubleHexaTaunt:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	LTKN E 5 A_FaceTarget
	LTKN E 1 A_PlaySound("weapons/hsgfire",CHAN_WEAPON,1.0,0)
	LTKN E 4 A_PlaySound("weapons/hsgfire",CHAN_AUTO,1.0,0)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),24,Random(6,-6),0)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),-24,Random(6,-6),0)
	LTKN H 1 Bright A_CustomBulletAttack(15.4,10.6,78,Random(1,4)*3,"SSBulletPuff")
	LTKN H 4 Bright A_CustomBulletAttack(15.4,10.6,78,Random(1,4)*3,"SSBulletPuff")
	LTKN E 10 A_FaceTarget
	TNT1 AAAAAA 0 A_SpawnItemEx("BlueShellCasing",10,24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 AAAAAA 0 A_SpawnItemEx("BlueShellCasing",10,-24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	LTKN E 5 A_FaceTarget
	LTKN E 1 A_PlaySound("weapons/hsgfire",CHAN_WEAPON,1.0,0)
	LTKN E 4 A_PlaySound("weapons/hsgfire",CHAN_AUTO,1.0,0)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),24,Random(6,-6),0)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",Random(36,44),-24,Random(6,-6),0)
	LTKN H 1 Bright A_CustomBulletAttack(15.4,10.6,78,Random(1,4)*3,"SSBulletPuff")
	LTKN H 4 Bright A_CustomBulletAttack(15.4,10.6,78,Random(1,4)*3,"SSBulletPuff")
	LTKN E 10 A_FaceTarget
	TNT1 AAAAAA 0 A_SpawnItemEx("BlueShellCasing",10,24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 AAAAAA 0 A_SpawnItemEx("BlueShellCasing",10,-24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	LTKN E 5 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Rekt")
	TNT1 A 0 A_Jump(100,3)
	TNT1 A 0 A_PlaySound("DeathKnight/taunt2",CHAN_VOICE,1.0,0)
	TNT1 A 0 A_SetUserVar("user_taunt",0)
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	Goto See
  Rekt:
	DTKN E 1 A_FaceTarget
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_StopSound(CHAN_VOICE)
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	TNT1 A 0 A_TakeInventory("MarineKilled",1)
	LTKN E 6 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_PlaySound("DeathKnight/taunt",CHAN_VOICE,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SetUserVar("user_taunt",0)
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	TNT1 A 0 A_JumpIf((user_currenthp - ACS_NamedExecuteWithResult("Hem_GetCurrentHealth")) > 100,"PainAttack")
	LTKN E 7 A_FaceTarget
	Goto See
  GoBack:
	TNT1 A 0
	TNT1 A 0 A_PlaySound("DeathKnight/jump",CHAN_BODY,1.0,0)
	LTKN P 10 A_Recoil(20)
	Goto DoubleHexaTaunt
  PainAttack:
	TNT1 A 0
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("DeathKnight/jump",CHAN_BODY,1.0,0)
	LTKN P 10 A_Recoil(-20)
	TNT1 A 0 A_SetUserVar("user_taunt",1)
	Goto DoubleHexa
  PainAttack2:
	TNT1 A 0
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("DeathKnight/jump",CHAN_BODY,1.0,0)
	LTKN P 10 A_Recoil(-20)
	Goto DoubleHexa
  Avoid:
	TNT1 A 0
	TNT1 A 0 A_Jump(192,"AvoidLeft","AvoidRight")
	LTKN P 20 A_Recoil(-40)
	TNT1 A 0 A_Jump(192,"AvoidLeft","AvoidRight")
	TNT1 A 0 A_SetUserVar("user_taunt",1)
	Goto DoubleHexa
  AvoidLeft:
	LTKN E 1 A_FaceTarget
	TNT1 A 0 A_PlaySound("DeathKnight/jump",CHAN_BODY,1.0,0)
	TNT1 A 0 ThrustThing(angle*256/360+192,15,0,0)
	LTKN E 5 A_FaceTarget
	TNT1 A 0 A_Jump(48,"DoubleHexa","FireDeathKnight15KLoop")
	Goto Missile
  AvoidRight:
	LTKN E 1 A_FaceTarget
	TNT1 A 0 A_PlaySound("DeathKnight/jump",CHAN_BODY,1.0,0)
	TNT1 A 0 ThrustThing(angle*256/360+64,15,0,0)
	LTKN E 5 A_FaceTarget
	TNT1 A 0 A_Jump(48,"DoubleHexa","FireDeathKnight15KLoop")
	Goto Missile
  Pain.Crush:
	TNT1 A 0
	TNT1 A 0 A_Recoil(-20)
	LTKN Q 8 A_Pain
	TNT1 A 0 A_SetUserVar("user_taunt",0)
	Goto See
  Pain:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	LTKN Q 8 A_Pain
	TNT1 A 0 A_SetUserVar("user_taunt",0)
	Goto Avoid
  Death:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory("Tic",999999)
	LTKN I 35 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128,0)
	TNT1 A 0 A_PlaySound("DeathKnight/step",5,1.0,0)
	LTKN J 105 A_Scream
	LTKN K 4 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128,0)
	LTKN L 4 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128,0)
	TNT1 A 0 A_PlaySound("DeathKnight/step",6,1.0,0)
	LTKN M 4 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128,0)
	LTKN N 4 A_Fall
	TNT1 A 0 A_BossDeath
	TNT1 A 0 A_RemoveChildren
	TNT1 A 0 A_SpawnItemEx("AmmoSphere",0,0,8,random(0,8),random(0,8),2,random(0,360),0,32)
	LTKN O -1
	Stop
	}
}

Actor LegDeathKnight15k
{
Projectile
Height 15
Radius 15
Speed 45
Scale 0.5
RenderStyle Add
Alpha 0.75
ExplosionDamage 110
ExplosionRadius 165
Damage 25
+RANDOMIZE
+FORCERADIUSDMG
+THRUSPECIES
+MTHRUSPECIES
+DONTHARMSPECIES
+NOTIMEFREEZE
Damagetype "SS"
SeeSound "weapons/bfg15kfire"
DeathSound "weapons/bfg95explode"
States
{
  Spawn:
	LFS1 AB 2 Bright A_SpawnItemEx("BFGTrailParticleGold",Random(-8,8),Random(-8,8),Random(-8,8),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
	Loop
  Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveGold",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryGoldParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0) 
	TNT1 AAA 0 A_CustomMissile("KaboomGold2",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	LFE1 A 4 Bright A_Explode
	LFE1 BCDEF 4 Bright
	Stop
	}
}

ACTOR LegDeathKnight10K : FastProjectile
{
PROJECTILE
Height 1
Radius 1
Speed 200
Scale 0.15
RenderStyle Add
Alpha 0.85
DECAL BFG9500LightningGold
+NOEXTREMEDEATH
+THRUSPECIES
+DONTHARMSPECIES
+NOTIMEFREEZE
DamageType "SS"
DeathSound "weapons/bfg95explode"
Obituary "%o was terminated by a Legendary Death Knight."
States
{
  Spawn:
	LRAC A 1 Bright
	Loop
  Death:
  XDeath:
	TNT1 A 0
	TNT1 A 1 A_SpawnItemEx("LegDeathKnight10KEx",0,0,0,0,0,0,0,SXF_SETMASTER,0)
	Stop
	}
}

ACTOR LegDeathKnight10KEx
{
Height 8
Radius 11
Scale 0.85
Renderstyle Add
Alpha 0.75
Damage 150
+NOGRAVITY
+NOBLOCKMAP
+NOTELEPORT
+FORCERADIUSDMG
+THRUSPECIES
+DONTHARMSPECIES
+NOTIMEFREEZE
DamageType "SS"
States
{
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveGold",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 AA 0 A_SpawnItemEx("LegendaryGoldParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 AAAA 0 A_CustomMissile("KaboomGold2",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	LFE1 A 4 Bright A_Detonate
	LFE1 BCDEF 4 Bright
	Stop
	}
}
