ACTOR EnragedLegendaryColonel : LegendaryZombie 
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: ELCL //ELCL - enraged legendary catharsi
//Title: "Enraged Legendary Colonel" 
Health 1350
Speed 24
MaxTargetRange 2048
MinMissileChance 100
PainChance 25
Species "Zombie"
DamageFactor "PDTBFG", 0.10
DamageFactor "PDTBFGTracer", 0.20
DamageFactor "PlayerDevBall", 0.60
DamageFactor "PlayerDevBall2", 0.60
DamageFactor "PlayerDTBFGRailgunSlug", 0.60
DamageFactor "PlayerDevTracer", 0.60
DamageFactor "Legendary", 0.0
DamageFactor "LegendaryGuru", 0.0
DamageFactor "LegendaryPlayer", 0.3
DamageFactor "LegendaryGuruPlayer", 0.2
DamageFactor "LegendaryZombie", 0.0
DamageFactor "LACGrenade", 0.0
DamageFactor "DBFG10K2", 0.55
DamageFactor "PlayerDBFG10K2", 0.55
DamageFactor "DBFG2", 0.55
DamageFactor "PlayerDBFG2", 0.55
DamageFactor "PlayerDTRG", 0.4
DamageFactor 0.5
DropItem "Enraged Legendary Assault Shotgun" 202
DropItem "HeavyChaingun" 64 1
DropItem "LegendaryBeaconLow" 256 1
DropItem "NewShell" 255 4
DropItem "NewShellBox" 128
DropItem "NexusEnragedLegendaryShell" 256 4
DropItem "NexusEnragedLegendaryShellBox" 130
DropItem "EnragedLegendaryPowerShard" 30 1
DropItem "EnragedLegendaryArmor" 92 1
DropItem "LegAmmoSphere" 95 1
DropItem "AmmoPack" 100
DropItem "AmmoPack" 100
DropItem "AmmoPack" 100
DropItem "HandGrenadeAmmo" 237 2
DropItem "MineAmmo" 242 2
DropItem "Backpack" 202, 1
DropItem "Armorplate" 212 1
DropItem "Portablemedkit" 217 1
DropItem "StimKit" 222 3
DropItem "HealthFlask" 227 5
DropItem "LegendaryRune" 128 1
DropItem "ShieldSphere" 64 1
DropItem "MarineBeacon" 45 1
DropItem "EnragedLegendaryAmmoSphere", 128
DropItem "EnragedLegTimeFreezeSphere", 128 
//AttackSound "weapons/12gaugefire"
SeeSound "TureLegColonel/sight"
PainSound "TureLegColonel/pain"
DeathSound "TureLegColonel/death"
ActiveSound "TureLegColonel/active"
Obituary "%o couldn't hide from the miraculous, \c[m6]Enraged\c- \c[z3]Legendary Colonel!\c-."
Tag "\c[m6]Enraged\c- \c[z3]Legendary Colonel\c-"
+DONTHARMSPECIES
+BRIGHT
var int user_attack;
var int user_infammo;
States
{
  Spawn:
	ELCL A 10 A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL "Z" 10 A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
    TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,1805,312)
    TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL AA 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_Jump(80,"Rush")
	ELCL CC 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL DD 3 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Jump(80,"Rush")
	Loop
  Chase:
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL AA 1 A_FastChase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(170,"Dodge")
	ELCL AA 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(170,"Dodge")
	ELCL BB 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(170,"Dodge")
	ELCL BB 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	TNT1 A 0 A_JumpIfCloser(170,"Dodge")
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL CC 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(170,"Dodge")
	ELCL CC 1 A_FastChase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(170,"Dodge")
	ELCL DD 1 A_FastChase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(170,"Dodge")
	ELCL DD 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	TNT1 A 0 A_Jump(64,"Dodge")
	Loop
  Rush:
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("EnragedLegendaryColonelGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELCL A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegendaryColonelGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELCL A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegendaryColonelGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELCL B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegendaryColonelGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELCL B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("EnragedLegendaryColonelGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELCL C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegendaryColonelGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELCL C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegendaryColonelGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELCL D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegendaryColonelGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELCL D 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(85,"See")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ELCL AA 3 A_GiveInventory("HEMELegColonelStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ELCL BB 3 A_GiveInventory("HEMELegColonelStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ELCL CC 3 A_GiveInventory("HEMELegColonelStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ELCL DD 3 A_GiveInventory("HEMELegColonelStrafing",1)
	Goto See
  SeeNoDodge:
	ELCL AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	ELCL CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	ELCL AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	ELCL CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	ELCL AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	ELCL CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	Goto Chase
  Dodge:
	ELCL A 1 A_FaceTarget
	TNT1 A 0 ThrustThingZ(0,20,0,0)
	TNT1 A 0 A_Jump(256,"DodgeRight","DodgeLeft")
  DodgeLeft:
	TNT1 A 0 ThrustThing(angle*256/360+192,15,0,0)
	Goto SeeNoDodge
  DodgeRight:
	TNT1 A 0 ThrustThing(angle*256/360+64,15,0,0)
	Goto SeeNoDodge
  Missile:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_attack",1)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Sart",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_JumpIfCloser(250,"CloserAttack")
	ELCL E 3 A_GiveInventory("LegZombieStrafingg",1)
	ELCL EEEEEEE 1 A_FaceTarget(45)
  Refire:
	TNT1 A 0 A_PlaySound("HeavyChaingun/Loop",CHAN_WEAPON,1.0,1)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",6)
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	ELCL E 4 A_CustomBulletAttack(0,0,1,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_FaceTarget
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",6)
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	ELCL F 4 A_CustomBulletAttack(0,0,1,Random(5,15)*6,"EnragedBulletPuff",8192,CBAF_NOrandom)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_MonsterRefire(0,"MissileEnd")
	TNT1 A 0 A_Jump(20,"Pause")
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	Loop
  CloserAttack:
	TNT1 A 0
	TNT1 A 0 A_GiveInventory("ZombieShieldSphere",1)
	ELCL A 1 A_GiveInventory("HEMELegColonelStrafing",1)
	ELCL A 1 A_FaceTarget
	TNT1 A 0 A_FaceTarget
	ELCL B 1 A_GiveInventory("HEMELegColonelStrafing",1)
	ELCL BC 1 A_FaceTarget
	TNT1 A 0 A_FaceTarget
	ELCL C 1 A_GiveInventory("HEMELegColonelStrafing",1)
	ELCL C 1 A_FaceTarget
	TNT1 A 0 A_FaceTarget
	ELCL D 1 A_GiveInventory("HEMELegColonelStrafing",1)
	ELCL DD 1 A_FaceTarget
	TNT1 A 0 A_FaceTarget
  Refire2:
	TNT1 A 0 A_PlaySound("HeavyChaingun/Loop",CHAN_WEAPON,1.0,1)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",6)
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_GiveInventory("HEMELegColonelStrafing",1)
	ELCL E 4 A_CustomBulletAttack(0,0,1,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",6)
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_GiveInventory("HEMELegColonelStrafing",1)
	ELCL F 4 A_CustomBulletAttack(0,0,1,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",6)
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_GiveInventory("HEMELegColonelStrafing",1)
	ELCL E 4 A_CustomBulletAttack(0,0,1,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",6)
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_GiveInventory("HEMELegColonelStrafing",1)
	ELCL F 4 A_CustomBulletAttack(0,0,1,Random(5,15)*6,"EnragedBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_MonsterRefire(0,"MissileEnd")
	TNT1 A 0 A_Jump(15,"Pause")
	Loop
  MissileEnd:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_attack",0)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Down",CHAN_WEAPON,1.0,0)
	Goto See
  Pause:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_attack",0)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Down",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	Goto Rage
  Rage:
	TNT1 A 0 A_JumpIf(user_infammo == 0,"See")
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90),128)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",5)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6),0)
	ELCL E 4 Bright A_FaceTarget
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90),128)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",5)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6),0)
	ELCL E 4 Bright A_FaceTarget
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90),128)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",5)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6),0)
	ELCL E 4 Bright A_FaceTarget
	Goto MidRage
  MidRage:
	TNT1 A 0 A_JumpIf(user_infammo == 0,"See")
	ELCL E 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL E 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL E 3 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL E 3 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL E 3 Bright A_FadeOut(0.1,0)
	ELCL E 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	ELCL E 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	ELCL EEEEEEEEEE 1 Bright A_FadeIn(0.1)
	ELCL E 3 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL E 3 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL E 3 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ELCL E 1 Bright A_FadeIn(0.1)
	ELCL E 1 Bright A_SetShootable
	TNT1 A 0 A_Jump(128,"Refire","Refire2")
	Goto Rage
  Pain:
	TNT1 A 0
	TNT1 A 0 A_JumpIfHealthLower((ACS_NamedExecuteWithResult("Hem_SpawnHealth")*0.25),"PainShield")
	TNT1 A 0 A_Jump(10,"Protection")
	TNT1 A 0 A_Jump(96,"NoPainShield")
  PainShield:
	TNT1 A 0 A_GiveInventory("ZombieShieldSphere",1)
  NoPainShield:
	TNT1 A 0 A_JumpIf(user_attack > 0,"WeapodDown")
	ELCL G 6 A_Pain
	Goto See
  WeapodDown:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_attack",0)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Down",CHAN_WEAPON,1.0,0)
	ELCL G 6 A_Pain
	Goto See
  Protection:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	ELCL E 2 ACS_NamedExecuteAlways("LegendaryProtection",0,0,0,0)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	Goto See
  Death:
	TNT1 A 0
//	TNT1 A 0 A_Jump(36,"LegendarySoul")
	TNT1 AAA 0 A_StopSound(CHAN_WEAPON)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	ELCL H 5
	ELCL I 5 A_Scream 
	ELCL J 5 A_Fall 
	ELCL K 5 A_SpawnItem("BodyCrash",0,0,0,0)
	ELCL LMNOP 5
	ELCL P -1
	Stop
  LegendarySoul:
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELGQ H 6
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELGQ I 6 A_Scream
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LegSSGGuyGib",0,0,12,frandom(0.1,1.0),frandom(0.1,1.0),frandom(0.1,1.0),random(0,360),SXF_CLIENTSIDE)
	ELGQ J 6 A_Fall
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELGQ K 6 A_SpawnItem("BodyCrash",0,0,0,0)			
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELGQ L 6
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELGQ L 5
	ELGQ M 5
    ELGQ N 140
	TNT1 A 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	ELGQ NNNNNNNNNNNNNNNNN 2 A_GiveInventory("ELegSoulEventSmokeSpawner",1)
	ELGQ NNNNNNNNNNNNNNNNN 2 A_GiveInventory("ELegSoulEventSmokeSpawner",1)
	ELGQ NNNNNNNNNNNNNNNNN 2 A_GiveInventory("ELegSoulEventSmokeSpawner",1)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("EnragedLegendarySoul",0,0,16,0,0,0,0,SXF_NOCHECKPOSITION,0)
	ELGQ N 525
	ELGQ N 5 A_FadeOut(0.1,1)
	Wait
    Stop	
	}
}

ACTOR EnragedLegendaryColonelGhostA
{
Scale 1.1
Radius 20
Height 56
Speed 0
Alpha 0.7
PROJECTILE
RENDERSTYLE Translucent
+CLIENTSIDEONLY
+NOINTERACTION
+NOTIMEFREEZE
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    ELCL A 2 A_FadeOut(0.10)
    Wait
    }
}

ACTOR EnragedLegendaryColonelGhostB : EnragedLegendaryColonelGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    ELCL B 2 A_FadeOut(0.10)
    Wait
    }
}

ACTOR EnragedLegendaryColonelGhostC : EnragedLegendaryColonelGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    ELCL C 2 A_FadeOut(0.10)
    Wait
    }
}

ACTOR EnragedLegendaryColonelGhostD : EnragedLegendaryColonelGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    ELCL D 2 A_FadeOut(0.10)
    Wait
    }
}

Actor HEMELegColonelStrafing : CustomInventory
{
-COUNTITEM
+INVENTORY.QUIET
+INVENTORY.UNDROPPABLE
+INVENTORY.ALWAYSPICKUP
+INVENTORY.AUTOACTIVATE       
Inventory.Amount 1
Inventory.MaxAmount 0
+NOTIMEFREEZE
States
{
  Pickup:
	TNT1 A 1 
	TNT1 A 1 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 1 A_Jump(188,2)
	TNT1 A 1 A_GiveInventory("LegZombieJumping",1)
	TNT1 A 1 A_JumpIf(velx != 0 || vely != 0,2)
	TNT1 A 1 A_Jump(256,2)
	TNT1 A 1 A_Jump(235,5)
	TNT1 A 1 A_JumpIfInventory("LegZombieStrafeSens",1,3)
	TNT1 A 1 A_GiveInventory("LegZombieStrafeSens",1)
	TNT1 A 1 A_Jump(256,2)	
	TNT1 A 1 A_TakeInventory("LegZombieStrafeSens",1)
	TNT1 A 1 A_JumpIfInventory("LegZombieStrafeSens",1,3)
	TNT1 A 1 ThrustThing(angle*256/360+38.7,3,0,0)
	TNT1 A 1 A_Jump(256,2)	
	TNT1 A 1 ThrustThing(angle*256/360+38.7,-3,0,0)
	TNT1 A 1 A_FaceTarget
	TNT1 A 1 A_Jump(24,2)
	TNT1 A 1 A_JumpIfCloser(300,2)
	TNT1 A 1 A_Recoil(-1)
	Stop
	TNT1 A 1 A_Recoil(1)
	Stop	
	}
}