//Rank 1 Low-Mid-High Tier: Enraged Legendary (priority 300 - 350)

ACTOR INFEnragedLegendaryImp : NewEnragedLegendaryImp Replaces EnragedLegendaryImp2
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Imp\c-"
}

ACTOR INFEnragedLegendaryImp2 : INFEnragedLegendaryImp
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Imp\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Spawn2")
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    IEGN A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IEGN Q 10 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ImpSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

//Enraged Legendary Soul

ACTOR INFEnragedLegendarySoul : RandomSpawner
{
DropItem "EnragedLegendarySoul", 256, 1
}

ACTOR INFEnragedLegendaryZombie : EnragedLegendaryZombie2 Replaces EnragedLegendaryZombie
{
Health 1200
+BRIGHT
+DONTHARMSPECIES
+DONTHURTSPECIES
SeeSound "Elegzom/sight"
PainSound "Elegzom/pain"
DeathSound "Elegzom/death"
ActiveSound "Elegzom/active"
Obituary "%o was vaporized by an \c[m6]Enraged\c- \c[z3]Legendary Zombie\c-'s overheated plasma."
Tag "\c[m6]Enraged\c- \c[z3]Legendary Zombie\c-"
var int user_music;
var int user_protection;
var int user_protected;
var int user_missile;
var int user_upgrade;
var int user_aurascript;
States
{
  Spawn:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Spawn2")
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    IPOS A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IPO2 A 10 A_Look
    Loop
  Spawn2:
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
    AEZO A 10 A_Look
	AEZO "Z" 10 A_Look
    Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	//TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,402,302) //MUST BE NORMAL LEG MUSIC, REMEMBER TO REMOVE MUSIC IN PAIN STATE
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,402)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"See2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    IPOS A 0 A_JumpIfTargetInLOS("Strafing")
    IPOS AA 3 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IPOS BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("FootStep")
	IPOS A 0 A_JumpIfTargetInLOS("Strafing")
	IPOS CC 3 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IPOS DD 3 A_Chase
	IPOS A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("FootStep")
    Loop
  See2:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,402)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
	TNT1 A 0 A_JumpIfHealthLower(600,"SeeLowHealth")
    AEZO A 0 A_JumpIfTargetInLOS("Strafing2")
    AEZO AA 3 A_Chase
	AEZO BB 3 A_Chase
	AEZO A 0 A_Jump(10,"Rush2","Teleport")
	TNT1 A 0 A_SpawnItem("FootStep")
	AEZO A 0 A_JumpIfTargetInLOS("Strafing2")
	AEZO CC 3 A_Chase
	AEZO DD 3 A_Chase
	AEZO A 0 A_Jump(80,"Rush2","Teleport")
	TNT1 A 0 A_SpawnItem("FootStep")
    Loop
  SeeLowHealth:
    AEZO A 0 A_JumpIfTargetInLOS("Strafing3")
    AEZO AA 2 A_Chase
	AEZO BB 2 A_Chase
	AEZO A 0 A_Jump(40,"Rush3","Teleport2","Missile2")
	TNT1 A 0 A_SpawnItem("FootStep")
	AEZO A 0 A_JumpIfTargetInLOS("Strafing3")
	AEZO CC 2 A_Chase
	AEZO DD 2 A_Chase
	AEZO A 0 A_Jump(80,"Rush3","Teleport2","Missile2")
	TNT1 A 0 A_SpawnItem("FootStep")
    Loop
  Rush:
    IPOS A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("LegZombieGhostAA")
	IPOS A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegZombieGhostAA")
	IPOS A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegendaryZombieGhostBB")
	IPOS B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegendaryZombieGhostBB")
	IPOS B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("LegZombieGhostCC")
	IPOS C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegZombieGhostCC")
	IPOS C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegendaryZombieGhostDD")
	IPOS D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegendaryZombieGhostDD")
	IPOS D 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(84,"See")
	Loop
  Rush2:
    AEZO A 0 A_JumpIfTargetInLOS("Strafing3")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostA")
	AEZO A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostA")
	AEZO A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostB")
	AEZO B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostB")
	AEZO B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostC")
	AEZO C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostC")
	AEZO C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostD")
	AEZO D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostD")
	AEZO D 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(38,"See2")
	Loop
  Rush3:
    AEZO A 0 A_JumpIfTargetInLOS("Strafing3")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostA")
	AEZO A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostA")
	AEZO A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostB")
	AEZO B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostB")
	AEZO B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostC")
	AEZO C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostC")
	AEZO C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostD")
	AEZO D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostD")
	AEZO D 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(25,"SeeLowHealth")
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	IPOS AA 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	IPOS BB 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    IPOS CC 3 A_GiveInventory("LegZombieStrafingg",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	IPOS DD 3 A_GiveInventory("LegZombieStrafingg",1)
	Goto See
  Strafing2:
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO AA 3 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO BB 3 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    AEZO CC 3 A_GiveInventory("AELZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO DD 3 A_GiveInventory("AELZombieStrafing",1)
	Goto See
  Strafing3:
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO AA 2 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO BB 2 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    AEZO CC 2 A_GiveInventory("AELZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO DD 2 A_GiveInventory("AELZombieStrafing",1)
	Goto See
  Teleport:
	TNT1 A 0 A_Jump(75,"TeleportTroll")
    AEZO E 1 A_UnSetShootable
	AEZO AAAAAAAAAA 1  A_FadeOut(0.1,0)
	AEZO E 2 
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    AEZO E 1 A_PlayWeaponSound("boss/teleport")
	AEZO AAAAAAAAAA 1 A_FadeIn(0.1)
    AEZO E 1 A_SetShootable
    Goto See2
  Teleport2:
	TNT1 A 0 A_Jump(60,"TeleportTroll2")
    AEZO E 1 A_UnSetShootable
	AEZO AAAAAAAAAA 1  A_FadeOut(0.1,0)
	AEZO E 2 
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    AEZO E 1 A_PlayWeaponSound("boss/teleport")
	AEZO AAAAAAAAAA 1 A_FadeIn(0.1)
    AEZO E 1 A_SetShootable
    Goto SeeLowHealth
  TeleportTroll:
    AEZO E 1 A_UnSetShootable
	AEZO AAAAAAAAAA 1  A_FadeOut(0.1,0)
	AEZO E 2 
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    AEZO E 1 A_PlayWeaponSound("boss/teleport")
	AEZO AAAAAAAAAA 1 A_FadeIn(0.1)
    AEZO E 1 A_SetShootable
	AEZO E 1 A_FaceTarget
	AEZO E 1 A_UnSetShootable
	AEZO AAAAAAAAAA 1  A_FadeOut(0.1,0)
	AEZO E 2 
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    AEZO E 1 A_PlayWeaponSound("boss/teleport")
	AEZO AAAAAAAAAA 1 A_FadeIn(0.1)
    AEZO E 1 A_SetShootable
	AEZO E 1 A_FaceTarget
	AEZO E 1 A_UnSetShootable
	AEZO AAAAAAAAAA 1  A_FadeOut(0.1,0)
	AEZO E 2 
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    AEZO E 1 A_PlayWeaponSound("boss/teleport")
	AEZO AAAAAAAAAA 1 A_FadeIn(0.1)
    AEZO E 1 A_SetShootable
    Goto See2
  TeleportTroll2:
    AEZO A 1 A_UnSetShootable
	AEZO AAAAAAAAAA 1  A_FadeOut(0.1,0)
	AEZO A 2 
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	AEZO AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    AEZO A 1 A_PlayWeaponSound("boss/teleport")
	AEZO AAAAAAAAAA 1 A_FadeIn(0.1)
    AEZO A 1 A_SetShootable
	TNT1 A 0 A_Jump(90,"SeeLowHealth")
    Loop
  Pause:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	IPOS E 0 A_PlaySound("EPRifle/Steam")
	IPOS EEEEE 3 A_GiveInventory("LegZombieStrafingg",1)
	Goto See
  Pause2:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	IPOS E 0 A_PlaySound("EPRifle/Steam")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO AA 2 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO BB 2 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    AEZO CC 2 A_GiveInventory("AELZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO DD 2 A_GiveInventory("AELZombieStrafing",1)
	Goto See2
  Pause3:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	IPOS E 0 A_PlaySound("EPRifle/Steam")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO AA 2 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO BB 2 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    AEZO CC 2 A_GiveInventory("AELZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	AEZO DD 2 A_GiveInventory("AELZombieStrafing",1)
	Goto SeeLowHealth
  Missile:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Missile2")
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_JumpIfHealthLower(200,"NoForThisTime")
	TNT1 A 0 A_Jump(5,"NoForThisTime")
  Firing:
	IPOS EEEE 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_Jump(20,"Rapid")
	IPOS E 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 AA 0 A_CustomMissile("RLegendaryProjectile",32,0,Frandom(-1,1),0)
	IPOS F 3 A_PlaySoundEx("EPRifle/Fire","Weapon")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
    TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	Goto Firing+4
  Rapid:
	TNT1 A 0 A_PlaySound("ELegCommando/Star",0,1,0,ATTN_NONE)
    IPOS EEEEEEEE 3 A_GiveInventory("LegZombieStrafingg",1)
  RapidLoop:
    TNT1 A 0 A_JumpIf(user_missile == 20,"Pause")
    IPOS E 1 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 AA 0 A_CustomMissile("RLegendaryProjectile",32,0,Frandom(-1,1),0)
	IPOS F 3 A_PlaySoundEx("EPRifle/Fire","Weapon")
	TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	Loop
  Missile2:
	AEZO EEEE 2 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_Jump(20,"Crazy")
	AEZO E 2 A_GiveInventory("AELZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("AELZombieStrafing",1)
	TNT1 AA 0 A_CustomMissile("RLegendaryProjectile",32,0,Frandom(-1,1),0)
	AEZO F 2 A_PlaySoundEx("EPRifle/Fire","Weapon")
	TNT1 A 0 A_Jump(15,"Pause2")
	TNT1 A 0 A_SpidRefire
    TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	Goto Missile2+4
  Crazy:
	TNT1 A 0 A_PlaySound("AECommando/Rage",0,1,0,ATTN_NONE)
    AEZO EEEEEEEE 2 A_GiveInventory("AELZombieStrafingApeshit",1)
	TNT1 A 0 A_JumpIfHealthLower(600,"CrazyLoop2")
  CrazyLoop:
    TNT1 A 0 A_JumpIf(user_missile == 40,"Pause2")
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostE")
    AEZO E 1 A_GiveInventory("AELZombieStrafingApeshit",1)
	TNT1 AA 0 A_CustomMissile("RLegendaryProjectile",32,0,Frandom(-10,10),0)
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostF")
	AEZO F 2 A_PlaySoundEx("EPRifle/Fire","Weapon")
	TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	Loop
  CrazyLoop2:
    TNT1 A 0 A_JumpIf(user_missile == 60,"Pause3")
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostE")
    AEZO E 1 A_GiveInventory("AELZombieStrafingApeshit",1)
	TNT1 AA 0 A_CustomMissile("RLegendaryProjectile",32,0,Frandom(-12,12),0)
	TNT1 A 0 A_SpawnItemEx("AELZombieGhostF")
	AEZO F 2 A_PlaySoundEx("EPRifle/Fire","Weapon")
	TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	Loop
  NoForThisTime:
	IPOS E 3 A_JumpIf(user_upgrade >= 1,"See2")
	TNT1 A 0 A_PlaySound("ELegCommando/Star",0,1,0,ATTN_NONE)
	TNT1 A 0 A_ChangeFlag(REFLECTIVE,1)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,1)
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_FaceTarget
  AwakeLoop:
    TNT1 A 0 A_JumpIf(user_missile >= 25,"AwakeEnd")
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_SpawnItem("ILegImpLineSpawner")
	IPOS E 2 A_SpawnItem("EnragedHellionSmokeSpawner")
    TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  AwakeEnd:
	IPOS E 2
	TNT1 A 0 A_SetUserVar("user_upgrade",1)
	TNT1 A 0 A_SpawnItem("EnragedDeathBallSmall")
	TNT1 A 0 A_SpawnItemEx("RedLightning")
    TNT1 A 0 ACS_NamedExecuteAlways("EnragedLegZombieAwakened",0)
	TNT1 A 0 A_SetUserVar("user_upgrade",user_upgrade+1)
	TNT1 A 0 A_PlaySound("AELegZom/sight",0,1,0,ATTN_NONE)
    AEZO E 20
	TNT1 A 0 A_ChangeFlag(REFLECTIVE,0)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,0)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_UnSetInvulnerable
    AEZO E 20
	TNT1 A 0 A_Jump(128,"Teleport")
	Goto See2
  Pain:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"PainAwaken")
	TNT1 A 0 A_Jump(10,"Protection")
  Pain2:
	TNT1 A 0 A_Jump(192,"PainMissile")
    IPOS G 3 A_GiveInventory("LegZombieStrafingg",1)
    TNT1 A 0 A_Pain
	IPOS G 3 A_GiveInventory("LegZombieStrafingg",1)
    Goto See
  PainMissile: 
	IPOS G 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_Pain
	IPOS G 3 A_GiveInventory("LegZombieStrafingg",1)
	Goto Missile	
  Protection:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain2")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain2")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	IPOS E 2 ACS_NamedExecuteAlways("EnragedLegendaryProtection")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	Goto See	
  PainAwaken:
	TNT1 A 0 A_Jump(20,"Protection2")
  PainAwaken2:
	TNT1 A 0 A_Jump(192,"PainMissile2")
    AEZO G 3 A_GiveInventory("AELZombieStrafingApeshit",1)
    TNT1 A 0 A_Pain
	AEZO G 3 A_GiveInventory("AELZombieStrafingApeshit",1)
    Goto See2
  PainMissile2: 
	AEZO G 3 A_GiveInventory("AELZombieStrafingApeshit",1)
	TNT1 A 0 A_Pain
	AEZO G 3 A_GiveInventory("AELZombieStrafingApeshit",1)
	Goto Missile2
  Protection2:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain2")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain2")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	AEZO E 2 ACS_NamedExecuteAlways("EnragedLegendaryProtection")
	Goto See2
  Death:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Death2")
    TNT1 A 0 A_ChangeFlag("BRIGHT",0)
    TNT1 A 0 A_StopSound(6)
    TNT1 A 0 A_Jump(36,"LegendarySoul")
	IPOS H 5 A_Scream
    IPOS I 5 A_NoBlocking
    IPOS J 5 A_SpawnItem("BodyCrash")
    IPOS K 5 
    IPOS L -1 
	Stop
  XDeath:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Death2")
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItemEx("EnragedGibbedGenerator")
    IPOS P 3 A_XScream
    IPOS Q 3 A_NoBlocking
    IPOS RSTUV 3 
    IPOS W -1 
    Stop
  Death2:
    TNT1 A 0 A_ChangeFlag("BRIGHT",0)
    TNT1 A 0 A_StopSound(6)
    TNT1 A 0 A_Jump(36,"LegendarySoul2")
	AEZO H 5 A_Scream
    AEZO I 5 A_NoBlocking
    AEZO J 5 A_SpawnItem("BodyCrash")
    AEZO K 5 
    AEZO L -1 
	Stop
  LegendarySoul2:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	AEZO H 5 A_Scream
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    AEZO I 5 A_Fall
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    AEZO J 5 A_SpawnItem("BodyCrash")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    AEZO KLL 5 A_SpawnItem("EnragedHellionSmokeSpawner")
	AEZO L 140
	AEZO N 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	AEZO LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	AEZO LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	AEZO LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	TNT1 A 0 A_SpawnItemEx("EnragedLegendarySoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	AEZO L -1
	Stop	
  XDeath2:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItemEx("EnragedGibbedGenerator")
    AEZO P 3 A_XScream
    AEZO Q 3 A_NoBlocking
    AEZO RSTUV 3 
    AEZO W -1 
    Stop
	}
}

ACTOR INFEnragedLegendaryZombie2 : INFEnragedLegendaryZombie
{
Obituary "%o was vaporized by an \c[m6]Enraged\c- \c[z3]Legendary Zombie\c-'s overheated plasma."
Tag "\c[m6]Enraged\c- \c[z3]Legendary Zombie\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Idle2")
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    IPOS A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IPO2 A 10 Bright A_Look
    Loop
  Idle2:
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
    AEZO A 10 A_Look
	AEZO "Z" 10 A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ZombieSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

Actor EnragedLegendaryZombieAwakened : INFEnragedLegendaryZombie2 //This would probably be smarter rather than having to include entire monster codes yes?
{
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedLegZombieAwakened",0)
	TNT1 A 0 A_SetUserVar("user_upgrade",user_upgrade+1)
	Goto Idle
	}
}

ACTOR AELZombieGhostA : LegZombieGhostA
{
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    AEZO A 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR AELZombieGhostB : LegZombieGhostA
{   
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    AEZO B 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR AELZombieGhostC : LegZombieGhostA
{   
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    AEZO C 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR AELZombieGhostD : LegZombieGhostA
{   
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    AEZO D 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR AELZombieGhostE : LegZombieGhostA
{   
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    AEZO E 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR AELZombieGhostF : LegZombieGhostA
{   
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    AEZO F 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

Actor AELZombieStrafing : LegZombieStrafing
{
  States
  {
  Pickup:
    NULL A 1 
	//NULL A 1 A_SpawnItem("EnragedHellionSmokeSpawner")
	NULL A 1 A_Jump(188,2)
	NULL A 1 A_GiveInventory("AELZombieJumping",1)
	NULL A 1 A_JumpIf(velx != 0 || vely != 0,2)
	NULL A 1 A_Jump(256,2)
	NULL A 1 A_Jump(235,5)
	NULL A 1 A_JumpIfInventory("LegZombieStrafeSens",1,3)
	NULL A 1 A_GiveInventory("LegZombieStrafeSens",1)
	NULL A 1 A_Jump(256,2)	
	NULL A 1 A_TakeInventory("LegZombieStrafeSens",1)
	NULL A 1 A_JumpIfInventory("LegZombieStrafeSens",1,3)
	NULL A 1 ThrustThing(angle*256/360+38.7,4,0,0)
	NULL A 1 A_Jump(256,2)	
	NULL A 1 ThrustThing(angle*256/360+38.7,-4,0,0)
    NULL A 1 A_FaceTarget
	NULL A 1 A_Jump(24,2)
	NULL A 1 A_JumpIfCloser(300,2)
	NULL A 1 A_Recoil(-1)
    Stop
	NULL A 1 A_Recoil(1)
    Stop	
  }
}

Actor AELZombieJumping : LegZombieStrafingg
{
  +NOTIMEFREEZE
  States
  {
  Pickup:
    NULL A 1 
    NULL A 1 A_CheckFloor(1)
    Stop
	NULL A 1 A_Jump(242,2)
	NULL A 1 ThrustThingZ(0,50,0,1)
    Stop
	NULL A 1
    Stop
  }
}

Actor AELZombieStrafingApeshit : LegZombieStrafing
{
  States
  {
  Pickup:
    NULL A 1 
	//NULL A 1 A_SpawnItem("EnragedHellionSmokeSpawner")
	NULL A 1 A_Jump(188,2)
	NULL A 1 A_GiveInventory("AELZombieJumping",1)
	NULL A 1 A_JumpIf(velx != 0 || vely != 0,2)
	NULL A 1 A_Jump(256,2)
	NULL A 1 A_Jump(235,5)
	NULL A 1 A_JumpIfInventory("LegZombieStrafeSens",1,3)
	NULL A 1 A_GiveInventory("LegZombieStrafeSens",1)
	NULL A 1 A_Jump(256,2)	
	NULL A 1 A_TakeInventory("LegZombieStrafeSens",1)
	NULL A 1 A_JumpIfInventory("LegZombieStrafeSens",1,3)
	NULL A 1 ThrustThing(angle*256/360+38.7,8,0,0)
	NULL A 1 A_Jump(256,2)	
	NULL A 1 ThrustThing(angle*256/360+38.7,-8,0,0)
    NULL A 1 A_FaceTarget
	NULL A 1 A_Jump(24,2)
	NULL A 1 A_JumpIfCloser(300,2)
	NULL A 1 A_Recoil(-1)
    Stop
	NULL A 1 A_Recoil(1)
    Stop	
  }
}

ACTOR EnragedAuraSpawnerZombie : LHellionSmokeSpawner
{
+CLIENTSIDEONLY
+NOINTERACTION
+NOBLOCKMAP
+NOCLIP
States
  {
  Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Null")
	TNT1 A 0 A_SpawnItem("EnragedAura",0,0,0,0)
	TNT1 A 1
	Stop	
  }
}

Actor EnragedAuraParticle : ProjectileTrailParticleRed
{
Scale 0.03
}

Actor LegendaryAuraSpark
{
  +NOINTERACTION
  +NOTIMEFREEZE
  +CLIENTSIDEONLY
  Renderstyle Add
  var int user_delay;
  States
  {
  Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Null")
	TNT1 A 0 A_SetScale(frandom(0.5,1.0))
	TNT1 A 0 A_SetUserVar(user_delay,random(2,4))
	SPK9 ABCDEF 1 A_SetTics(user_delay)
	Stop
	}
}

Actor EnragedAuraSpark
{
  +NOINTERACTION
  +NOTIMEFREEZE
  +CLIENTSIDEONLY
  Renderstyle Add
  var int user_delay;
  States
  {
  Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Null")
	TNT1 A 0 A_SetScale(frandom(0.5,1.0))
	TNT1 A 0 A_SetUserVar(user_delay,random(2,4))
	SPK8 ABCDEF 1 A_SetTics(user_delay)
	Stop
	}
}

Actor EnragedAura
{
  +NOINTERACTION
  +NOTIMEFREEZE
  +CLIENTSIDEONLY
  Renderstyle Add
  var int user_delay;
  States
  {
  Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Null")
	TNT1 AA 0 A_SpawnItemEx("EnragedAuraSpark",random(-12,12),random(-12,12),random(15,40),frandom(-0.4,0.4),frandom(-0.4,0.4),frandom(0,3),0,0,64)
	TNT1 A 0 A_SpawnItemEx("LegendaryAuraSpark",random(-12,12),random(-12,12),random(15,40),frandom(-0.4,0.4),frandom(-0.4,0.4),frandom(0,3),0,0,64)
	TNT1 A 0 A_SpawnItemEx("EnragedAuraParticle",Random(-12,12),Random(-12,12),Random(30,50),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	Stop
	}
}

//Enraged Legendary Revolver Zombie 303

ACTOR INFEnragedLegendaryRevolverZombie2 : EnragedLegendaryRevolverZombie
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Revolver Zombie\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NexusDJBPistolSpawn") == 1, "Remove2")
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NexusDJBPistolSpawn") == 2, "SpawnBoth")
  Idle:
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    EGRZ A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	EGRI A 10 A_Look
	Loop
  Remove:
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx("ZombieSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
    TNT1 A 0
    Stop
  Remove2:
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx("EnragedLegendaryCowboy",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
    TNT1 A 0
    Stop
  SpawnBoth:
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx("EnragedLegendaryPistolSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
    TNT1 A 0
    Stop
	}
}

ACTOR INFEnragedLegendaryCowboy : EnragedLegendaryCowboy Replaces EnragedLegendaryCowboy
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Cowboy\c-"
States
{
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ZombieSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryCowboy2 : INFEnragedLegendaryCowboy
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Cowboy\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    EWGU A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	EWGU A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    Loop
	}
}

ACTOR INFEnragedLegendaryAssaultCaptain : EnragedLegendaryAssaultCaptain2 Replaces EnragedLegendaryAssaultCaptain
{	
Health 1300
Obituary "%o was shot on sight by an \c[m6]Enraged\c- \c[z3]Legendary Assault Captain\c-"
Tag "\c[m6]Enraged\c- \c[z3]Legendary Assault Captain\c-"
var int user_upgrade;
var int user_infammo;
var int user_aurascript;
States
{
  Spawn:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Spawn2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IASG A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IASG Z 10 A_Look
	Loop
  Spawn2:
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
	I2SG A 10 A_Look
	I2SG "Z" 10 A_Look
	Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,403)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"See2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IASG AA 4 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IASG BB 4 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IASG CC 4 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IASG DD 4 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(64,"Mine","Rush","DodgeLeft","DodgeRight","Chase")
	Loop
  See2:
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
	I2SG AA 4 A_Chase
	I2SG BB 4 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	I2SG CC 4 A_Chase
	I2SG DD 4 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(64,"Mine2","Rush2","DodgeLeft2","DodgeRight2","Chase2")
	Loop
  Chase2:
	I2SG AA 1 A_FastChase
	TNT1 A 0 A_Jump(1,"Heal4")
	TNT1 A 0 A_JumpIfCloser(130,"Dodge2")
	I2SG AA 1 A_Chase
	TNT1 A 0 A_JumpIfCloser(130,"Dodge2")
	I2SG BB 1 A_Chase
	TNT1 A 0 A_JumpIfCloser(130,"Dodge2")
	I2SG BB 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_JumpIfCloser(150,"Dodge2")
	I2SG CC 1 A_Chase
	TNT1 A 0 A_Jump(10,"Heal4")
	TNT1 A 0 A_JumpIfCloser(150,"Dodge2")
	I2SG CC 1 A_FastChase
	TNT1 A 0 A_JumpIfCloser(130,"Dodge2")
	I2SG DD 1 A_FastChase
	TNT1 A 0 A_JumpIfCloser(130,"Dodge2")
	I2SG DD 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_Jump(95,"Mine2")
	TNT1 A 0 A_Jump(128,"Dodge2")
	Loop
  Rush2:
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhost2A")
	I2SG A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhost2A")
	I2SG A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhost2B")
	I2SG B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhost2B")
	I2SG B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhost2C")
	I2SG C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhost2C")
	I2SG C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhost2D")
	I2SG D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhost2D")
	I2SG D 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(85,"See2")
	Loop
  SeeNoDodge2:
	I2SG AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	I2SG CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	I2SG AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	I2SG CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	I2SG AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	I2SG CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	Goto Chase2
  Dodge2:
	I2SG A 1 A_FaceTarget
	I2SG E 0 ThrustThingZ(0,20,0,0)
	TNT1 A 0 A_Jump(256,"DodgeRight","DodgeLeft")
  DodgeLeft2:
	I2SG E 0 ThrustThing(angle*256/360+192,15,0,0)
	TNT1 A 0 A_Jump(40,"Heal4")
	Goto SeeNoDodge2
  DodgeRight2:
	I2SG E 0 ThrustThing(angle*256/360+64,15,0,0)
	TNT1 A 0 A_Jump(40,"Heal4")
	Goto SeeNoDodge2
  Heal4:
	I2SG A 5 HealThing(50)
	TNT1 A 0 A_PlaySound("pickups/pmedkit",0,1.0,0)
	GoTo See2
  Missile:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Missile2")
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_JumpIfHealthLower(200,"EnragedRune")
	TNT1 A 0 A_Jump(5,"EnragedRune")
  MissileLoop:
	TNT1 A 0 A_JumpIfCloser(600,1)
	Goto Rail
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_UnsetInvulnerable
	TNT1 A 0 A_SetTranslucent(1)
	IASG E 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_JumpIf(user_ammo >= 16,"Reload")
	IASG E 4 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SetUserVar(user_ammo,user_ammo+1)
	TNT1 A 0 A_PlaySound("EASG/Fire",5)
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",-8,7,30,4,0,FRandom(3.0,4.0),Random(-80, -90),128)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6))
	IASG F 2 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff")
	IASG E 4 A_FaceTarget
	TNT1 A 0 A_CPosRefire
	TNT1 A 0 A_Jump(12,"Rail")
	TNT1 A 0 A_Jump(6,"Heal")
	TNT1 A 0 A_Jump(5,"Heal2")
	TNT1 A 0 A_Jump(4,"Heal3")
	Goto MissileLoop+4
  Missile2:
	TNT1 A 0 A_JumpIfCloser(600,1)
	Goto Rail2
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_UnsetInvulnerable
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_JumpIf(user_infammo == 1,"MissileLoopInfAmmo")
	I2SG E 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_JumpIf(user_ammo >= 16,"Reload2")
	I2SG E 3 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_ammo,user_ammo+1)
	TNT1 A 0 A_PlaySound("EASG/Fire",5)
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",-8,7,30,4,0,FRandom(3.0,4.0),Random(-80,-90),128)
	TNT1 AAAAA 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6))
	I2SG F 2 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff")
	I2SG E 3 A_FaceTarget
	TNT1 A 0 A_CPosRefire
	TNT1 A 0 A_Jump(12,"Rail2")
	TNT1 A 0 A_Jump(6,"Heal4")
	TNT1 A 0 A_Jump(3,"InfiniteAmmo")
	TNT1 A 0 A_Jump(10,"GrenadeAttack2")
	GoTo Missile2+4
  Rail:
	TNT1 A 0 A_JumpIf(user_ammo >= 13,"Reload")
	IASG E 0 A_PlaySound("EASG/SLUGActivate")
	TNT1 A 0 A_FaceTarget
	IASG E 4 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_FaceTarget
	IASG E 4 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_FaceTarget
	IASG E 4 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_FaceTarget
	IASG E 4 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_FaceTarget 
	TNT1 A 0 A_PlaySound("EASG/SlugFire",5)
	TNT1 A 0 A_SetUserVar(user_ammo,user_ammo+4)
	IASG F 4 A_CustomMissile("ELegCaptainRail",32)
	TNT1 A 0 A_JumpIf(user_ammo >= 16,"Reload")
	Goto See
  Rail2:
	TNT1 A 0 A_JumpIf(user_ammo >= 13,"Reload2")
	I2SG E 0 A_PlaySound("LShotgun/Cock")
	I2SG EEEE 3 A_FaceTarget
	TNT1 A 0 A_FaceTarget 
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",5)
	TNT1 A 0 A_SetUserVar(user_ammo,user_ammo+4)
	I2SG F 4 A_CustomMissile("ELegCaptainRail",32)
	TNT1 A 0 A_JumpIf(user_ammo >= 16,"Reload2")
	Goto See2
  InfiniteAmmo:
	TNT1 A 0 A_JumpIf(user_infammo == 1,"MissileLoopInfAmmo")
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	I2SG A 5
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 ACS_NamedExecuteAlways("EnemyInfiniteAmmo",0)
	TNT1 A 0 A_PlaySound("legammo/use",0,1.0,0,0.5)
	Goto See2
  MissileLoopInfAmmo:
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_SetUserVar(user_ammo,0)
	I2SG E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",5)
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",-8,7,30,4,0,FRandom(3.0,4.0),Random(-80, -90),128)
	TNT1 AAAAA 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6))
	I2SG F 2 A_CustomBulletAttack(22.5,18.3,4,Random(2,5)*6,"EnragedBulletPuff")
	TNT1 A 0 A_CPosRefire //The Party never end!!!
	TNT1 A 0 A_Jump(10,"Heal4","Pause2")
	TNT1 A 0 A_Jump(15,"GrenadeInfAmmo")
	Loop
  Reload2:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_PlaySound("lasgguy/asgout")
	TNT1 A 0 A_SpawnItemEx("LegendaryEmptyDrumSpawner",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90), 128)
	I2SG E 48 A_SetUserVar(user_ammo,0)
	I2SG E 8 A_PlaySound("lasgguy/asgin") 
	I2SG E 20 A_PlaySound("LShotgun/Cock")
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	Goto See2
  GrenadeAttack2:
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	I2SG CC 3 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	I2SG EE 3 A_FaceTarget
	I2SG E 1 A_CustomMissile("ELACGrenade",32,0,0,2,4)
	I2SG CE 3 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	I2SG CC 3 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	I2SG EE 3 A_FaceTarget
	I2SG E 1 A_CustomMissile("ELACGrenade",32,0,0,2,4)
	Goto Rail2
  Mine2:
	I2SG C 11
	TNT1 AAAA 0 A_CustomMissile("ELACThrownMine",32,0,Random(-25,25),2,15)
	I2SG CCCCEEEEC 3
	Goto See2
  GrenadeInfAmmo:
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	I2SG CE 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	I2SG CE 2 A_FaceTarget
	I2SG E 1 A_CustomMissile("ELACGrenade",32,0,Random(-5,5),2,4)
	I2SG CE 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	I2SG CE 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	I2SG CE 2 A_FaceTarget
	I2SG E 1 A_CustomMissile("ELACGrenade",32,0,Random(-5,5),2,4)
	I2SG CE 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	I2SG CE 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	I2SG CE 2 A_FaceTarget
	I2SG E 1 A_CustomMissile("ELACGrenade",32,0,Random(-5,5),2,4)
	Goto MissileLoopInfAmmo
  EnragedRune:
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,1)
	TNT1 A 0 A_Playsound("Elasgguy/sight",7,1,0,ATTN_NONE)
	TNT1 A 0 A_PlaySound("legendary/defense")
	IASG EEEEEEEEEEEEEEEEEEEEEEEEEEE 3 A_SpawnItem("ILegImpLineSpawner")
	TNT1 A 0 A_SetUserVar("user_upgrade",1)
	TNT1 A 0 A_SpawnItemEx("RedLightning")
	TNT1 A 0 A_SpawnItem("EnragedDeathBallSmall")
	TNT1 A 0 A_PlaySound("TrueLegRune/Pickup",6,1.0,0,ATTN_NONE)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedLegAssCapAwakened",0)
	I2SG EEEEEEEEEEEEEEE 2 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,0)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_UnsetInvulnerable
	Goto See2
  Pain:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Pain2")
	IASG G 3 A_Jump(20,"Protection")
	IASG G 3 A_Pain
	TNT1 A 0 A_Jump(192,"Missile")
	TNT1 A 0 A_Jump(40,"Dodge")
	Goto See
  Pain2:
	I2SG G 3 A_Jump(20,"Protection2")
	I2SG G 3 A_Pain
	TNT1 A 0 A_Jump(192,"Missile2")
	TNT1 A 0 A_Jump(40,"Dodge2")
	Goto See2
  PainMissile2:
	I2SG G 3
	I2SG G 3 A_Pain
	Goto Missile2	
  Protection2:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain2")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain2")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	I2SG E 2 ACS_NamedExecuteAlways("EnragedLegendaryProtection")
	Goto See2
  Death:
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_ChangeFlag(BRIGHT,0)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Death2")
	TNT1 A 0 A_Jump(36,"LegendarySoul")
	IASG H 5
	IASG I 5 A_Scream
	IASG J 5 A_Fall
	IASG J 5 A_SpawnItem("BodyCrash")
	IASG K 5
	IASG L -1
	Stop
  Death2:
	TNT1 A 0 A_Jump(36,"LegendarySoul2")
	I2SG H 5
	I2SG I 5 A_Scream
	I2SG J 5 A_Fall
	I2SG J 5 A_SpawnItem("BodyCrash")
	I2SG K 5
	I2SG L -1
	Stop
  LegendarySoul2:
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	I2SG H 5
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	I2SG I 5 A_Scream
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	I2SG J 5 A_Fall
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	I2SG J 5 A_SpawnItem("BodyCrash")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	I2SG K 5
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	I2SG L 140
	I2SG L 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	I2SG LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	I2SG LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	I2SG LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	TNT1 A 0 A_SpawnItemEx("EnragedLegendarySoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	I2SG L -1
	Stop
	}
}

ACTOR INFEnragedLegendaryAssaultCaptain2 : INFEnragedLegendaryAssaultCaptain
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Assault Captain\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Spawn2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IASG A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	IASG Z 10 A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ShotgunSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

Actor EnragedLegendaryAssaultCaptainAwakened : INFEnragedLegendaryAssaultCaptain2
{
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedLegAssCapAwakened",0)
	TNT1 A 0 A_SetUserVar("user_upgrade",user_upgrade+1)
	Goto Idle
	}
}

ACTOR ELegASGZombieGhost2A : LegASGZombieGhostA
{
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
	I2SG A 2 A_FadeOut(0.10)
	Wait
	}
}

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

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

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

ACTOR INFEnragedLegendaryLieutenant : EnragedLegendaryLieutenant Replaces EnragedLegendaryLieutenant
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Lieutenant\c-"
States
{
  Spawn:
	ESSZ A 10 A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	Loop
	}
}

ACTOR INFEnragedLegendaryLieutenant2 : INFEnragedLegendaryLieutenant
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Lieutenant\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NexusDJBshottySpawn") == 0, "Remove2")
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NexusDJBshottySpawn") == 2, "SpawnBoth")
  SpawnLoop:
	ESSZ A 10 A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ShotgunSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
  Remove2:
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx("EnragedLegendarySuperShotgunZombie",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
    TNT1 A 0
    Stop
  SpawnBoth:
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx("EnragedLegShottyZombieSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
    TNT1 A 0
    Stop
	}
}

//Enraged Legendary Super Shotgun Zombie 307

ACTOR INFEnragedLegendarySuperShotgunZombie2 : EnragedLegendarySuperShotgunZombie
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Super Shotgun Zombie\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    ESZ4 A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ESZ4 A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ShotgunSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

//Enraged Legenary Phase Imp 308

ACTOR EnragedLegendaryPhaseImp2 : EnragedLegendaryPhaseImp
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Phase Imp\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	EPHA A 10 A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ImpSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

//Enraged Legendary Cyber Imp 309

ACTOR INFEnragedLegendaryCommando : EnragedLegendaryCommando2 Replaces EnragedLegendaryCommando
{
Health 1400
Obituary "%o was dishonorably discharged by an \c[m6]Enraged\c- \c[z3]Legendary Commando\c-."
Tag "\c[m6]Enraged\c- \c[z3]Legendary Commando\c-"
var int user_upgrade;
var int user_aurascript;
+BRIGHT
States
{
  Spawn:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Spawn2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECOS A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECOI A 10 A_Look
	Loop
  Spawn2:
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 "Z" 10 A_Look
	Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,406)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"See2")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECOS AABB 3 A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECOS CCDD 3 A_Chase
	TNT1 A 0 A_Jump(80,"Rush")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	Loop
  See2:
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing2")
	ECO2 AABB 3 A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing2")
	ECO2 CCDD 3 A_Chase
	TNT1 A 0 A_Jump(80,"Rush2")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	Loop
  Rush2:
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing2")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhost2")
	ECO2 A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhost2")
	ECO2 A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhost2")
	ECO2 B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhost2")
	ECO2 B 1 A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhost2")
	ECO2 C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhost2")
	ECO2 C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhost2")
	ECO2 D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhost2")
	ECO2 D 1 A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_Jump(84,"See2")
	Loop
  Strafing2:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ECO2 AA 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ECO2 BB 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    ECO2 CC 3 A_GiveInventory("LegZombieStrafingg2",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ECO2 DD 3 A_GiveInventory("LegZombieStrafingg2",1)
	Goto See2
  Missile2:
    TNT1 A 0 A_Jump(99,"HomingRockets","ProxMines2","LegendaryStar2","CannonBomb")
	Goto Normal2
  Missile:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Missile2")
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_JumpIfHealthLower(400,"EnragedRune")
	TNT1 A 0 A_Jump(5,"EnragedRune")
    TNT1 A 0 A_Jump(88,"Combo","Grenades","ProxMines","LegendaryStar","ClusterBomb")
	Goto Normal
  Normal:
	ECOS EEEE 3 A_GiveInventory("LegZombieStrafingg2",1)
	ECOS E 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_CustomMissile("EnragedLegCommanderProj",32)
	ECOS F 3 A_PlaySoundEx("ECannon/Fire","Weapon")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
	Goto Normal+3
  Combo:
	ECOS E 0 A_SetInvulnerable
	ECOS E 0 A_PlaySound("superzombie/sight")
	ECOS E 1 A_FaceTarget
	ECOS EEEE 3 A_GiveInventory("LegZombieStrafingg3",1)
	LEGW A 0 A_PlayWeaponSound("ECannon/Charge")
	ECOS EEEEE 3 A_GiveInventory("LegZombieStrafingg3",1)
	ECOS E 0 A_UnSetInvulnerable
  ComboLoop:
    TNT1 A 0 A_JumpIf (user_missile >= 10,"ComboEnd")
	TNT1 A 0 A_CustomMissile("ELegRevBall",32,0,random(-2,2))
	ECOS FE 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  ComboEnd:
    TNT1 A 0 A_SetUserVar(user_missile,0)
	ECOS EEEE 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_Jump(80,"Grenades")
	Goto See
  Normal2:
	ECO2 EEEE 3 A_GiveInventory("LegZombieStrafingg2",1)
	ECO2 E 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 AAA 0 A_CustomMissile("ELegRevBall",32,0,random(-10,10),CMF_OFFSETPITCH,frandom(-5,5))
	ECO2 F 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_Jump(32,"Pause2")
	TNT1 A 0 A_SpidRefire
	Loop
  Pause2:
	ECO2 EEEEE 3 A_GiveInventory("LegZombieStrafingg2",1)
	Goto See2
  HomingRockets:
	ECO2 EEEEEEEE 3 A_GiveInventory("LegZombieStrafingg2",1)
    TNT1 A 0 A_SetUserVar(user_missile,0)
  HomingRocketsLoop:
    TNT1 A 0 A_JumpIf (user_missile >= 6,"HomingRocketsEnd")
	ECO2 EEE 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg2",1)
	ECO2 F 3 A_CustomMissile("EnragedCommandoHomingRocket",32)	
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  HomingRocketsEnd:
	ECO2 EEEE 3 A_GiveInventory("LegZombieStrafingg2",1)
	TNT1 A 0 A_Jump(40,"HomingRockets")
	Goto See2
  LegendaryStar2:
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_PlaySound("superzombie/sight")
	ECO2 E 1 A_FaceTarget
	ECO2 EEEE 3 A_GiveInventory("LegZombieStrafingg3",1)
	TNT1 A 0 A_PlayWeaponSound("star/load3")
	ECO2 EEEEE 3 A_GiveInventory("LegZombieStrafingg3",1)
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_PlayWeaponSound("star/fire")
	ECO2 F 7 A_CustomMissile("LegCommandoRedStar",32)
	ECO2 E 8 A_FaceTarget
	Goto See2
  CannonBomb:
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_PlaySound("ELegCommando/Star",0,1,0,ATTN_NONE)
	TNT1 A 0 A_PlaySound("legendarycannon/charge",7,1,0,0.5)
	ECO2 E 1 A_FaceTarget
	ECO2 EEEEEEEEEEEEEE 3 A_GiveInventory("LegZombieStrafingg3",1)
	TNT1 A 0 A_PlayWeaponSound("star/fire")
	ECO2 F 7 A_CustomMissile("EnragedCommandoCannonBomb",32)
	ECO2 E 10 A_FaceTarget
	TNT1 A 0 A_Jump(196,"See2")
	TNT1 A 0 A_PlayWeaponSound("star/fire")
	ECO2 F 7 A_CustomMissile("EnragedCommandoCannonBomb",32)
	ECO2 E 10 A_FaceTarget
	Goto See2
  ProxMines2:
    TNT1 A 0 A_JumpIf(user_ProxLoad == 1,"ProxDetonate2")
	TNT1 A 0 A_SetUserVar(user_ProxLoad,1)
    TNT1 A 0 A_PlaySound("ELegCommando/Star",0,1,0,ATTN_NONE)
	ECO2 EEEEE 3 A_GiveInventory("LegZombieStrafingg3",1)
  ProxMines2Loop:
    TNT1 A 0 A_JumpIf (user_missile >= 6,"ProxMines2Loop2")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	ECO2 F 5 A_CustomMissile("ELegCommandoProxMine",32)
	ECO2 EEEE 3 A_GiveInventory("LegZombieStrafingg2",1)
	Loop
  ProxMines2Loop2:
    TNT1 A 0 A_JumpIf (user_missile >= 10,"HomingRocketsEnd")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	ECO2 F 5 A_CustomMissile("ELegCommandoProxDTMine",32)
	ECO2 EEEE 3 A_GiveInventory("LegZombieStrafingg2",1)
	Loop
  ProxDetonate2:
    TNT1 A 0 A_PlaySound("ELegCommando/Star",0,1,0,ATTN_NONE)
	ECO2 EEEEE 3 A_GiveInventory("LegZombieStrafingg3",1)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("MakeThoseEnragedMinesExplodeNicely",32,0,random(0,360))
	ECO2 E 3 A_GiveInventory("LegZombieStrafingg3",1)
	ECO2 E 3 A_GiveInventory("LegZombieStrafingg3",1)
	TNT1 A 0 A_SetUserVar(user_ProxLoad,0)
	Goto Missile2
  EnragedRune:
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,1)
	TNT1 A 0 A_Playsound("ELEGCommando/See",7,1,0,ATTN_NONE)
	TNT1 A 0 A_PlaySound("legendary/defense")
	ECOS EEEEEEEEEEEEEEEEEEEEEEEEEEE 3 A_SpawnItem("ILegImpLineSpawner")
	TNT1 A 0 A_SetUserVar("user_upgrade",1)
	TNT1 A 0 A_SpawnItemEx("RedLightning")
	TNT1 A 0 A_SpawnItem("EnragedDeathBallSmall")
	TNT1 A 0 A_PlaySound("TrueLegRune/Pickup",6,1.0,0,ATTN_NONE)
    TNT1 A 0 ACS_NamedExecuteAlways("EnragedLegCommandoAwakened",0)
	ECO2 EEEEEEEEEEEEEEE 2 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,0)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_UnsetInvulnerable
	Goto See2
  Pain:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Pain2")
	TNT1 A 0 A_Jump(20,"Protection")
	ECOS G 3
	ECOS G 3 A_Pain
	TNT1 A 0 A_Jump(192,"Missile")
	Goto See
  Pain2:
	TNT1 A 0 A_Jump(20,"Protection2")
	ECO2 G 3
	ECO2 G 3 A_Pain
	TNT1 A 0 A_Jump(192,"Missile2")
	Goto See2
  Protection2:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain2")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain2")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	ECO2 E 2 ACS_NamedExecuteAlways("EnragedLegendaryProtection")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	Goto See2
  Death:
	TNT1 A 0 A_ChangeFlag(BRIGHT,0)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Death2")
	TNT1 A 0 A_Jump(36,"LegendarySoul")
	TNT1 A 0 A_StopSound(6)
	ECOS H 5 A_Scream
	ECOS I 5 A_Fall
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("MakeThoseEnragedMinesExplodeNicely",32,0,random(0,360))
	ECOS J 5 A_SpawnItem("BodyCrash")
	ECOS KLM 5 
	ECOS N -1
	Stop
  Death2:
	TNT1 A 0 A_Jump(36,"LegendarySoul2")
	TNT1 A 0 A_StopSound(6)
	ECO2 H 5 A_Scream
	ECO2 I 5 A_Fall
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("MakeThoseEnragedMinesExplodeNicely",32,0,random(0,360))
	ECO2 J 5 A_SpawnItem("BodyCrash")
	ECO2 KLM 5 
	ECO2 N -1
	Stop
  LegendarySoul2:
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 H 5 A_Scream
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 I 5 A_Fall
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 J 5 A_SpawnItem("BodyCrash")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 K 5 
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 L 5
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 M 5
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECO2 N 140
	ECO2 N 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	ECO2 NNNNNNNNNNNNNNNNN 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	ECO2 NNNNNNNNNNNNNNNNN 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	ECO2 NNNNNNNNNNNNNNNNN 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	TNT1 A 0 A_SpawnItemEx("EnragedLegendarySoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	ECO2 N -1
	Stop
	}
}

ACTOR INFEnragedLegendaryCommando2 : INFEnragedLegendaryCommando
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Commando\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(60,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Spawn2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECOS A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECOI A 10 A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ChaingunSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

Actor EnragedLegendaryCommandoAwakened : INFEnragedLegendaryCommando2
{
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(60,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedLegCommandoAwakened",0)
	TNT1 A 0 A_SetUserVar("user_upgrade",user_upgrade+1)
	Goto Idle
	}
}

ACTOR EnragedCommandoHomingRocket : EnragedHomingRocket
{
  Speed 30
  FastSpeed 36
  DamageType ""
  States
  {
  Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("EnragedParticleSpawner",0,0,0,0,0,0,0,128) 
	TNT1 AAA 0 A_CustomMissile("EKaboomLN",0,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX2",0,0,random(0,360),2,random(0,360))
	TNT1 AAAA 0 A_SpawnItemEx("LegendaryDebris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
	EROC C 6 Bright A_Explode
	EROC DE 5 Bright A_SetTranslucent(0.75,1)
	Stop
	}
}

Actor ELegCommandoProxDTMine : ELegCommandoProxMine
{
  Speed 30
  Damage 30
  States
  {
  Death:
	TNT1 A 0
	TNT1 A 0 A_PlaySound("Weapons/ProxHit")
	TNT1 A 0 A_SpawnItemEX("EnragedPlantedDTProx")
	Stop
  Crash:
  XDeath:
	TNT1 A 0
	TNT1 A 0 A_Stop
	TNT1 A 0 A_PlaySound("Weapons/RockLX")
	TNT1 A 0 A_NoGravity
	TNT1 A 0 A_SetTranslucent(0.75,1)
	PRXD A 2 Bright A_Explode(128,128)
	TNT1 A 0 A_SpawnItemEx("EnragedParticleSpawner") 
	TNT1 AAAA 0 A_CustomMissile("EKaboomLN",0,0,random(0,360),2,random(20,160))
	TNT1 AAAA 0 A_CustomMissile("LegendarySmokeFX2",0,0,random(0,360),2,random(20,160))
	TNT1 AAAA 0 A_SpawnItemEx("LegendaryDebris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
	TNT1 A 0 A_PlaySound("weapons/dtech10kexplode")
	TNT1 A 0 A_SpawnItemEx("Enraged10KShockwave",0,0,15,0,0,0,0,128)
    TNT1 A 20 A_SpawnItem("EnragedDTGrenadeEx",0,-10)
	Stop
	}
}

Actor EnragedPlantedDTProx : EnragedPlantedProx
{
  States
  {
  Spawn:
	TNT1 A 0 A_JumpIf(user_explodedelay >= 300,"Explode")
	TNT1 A 0 A_SetUserVar("user_explodedelay",user_explodedelay+1)
	EROX A 1 A_ChangeFlag(NOBLOCKMAP,0)
	TNT1 A 0 A_JumpIfInventory("DetonateProx",1,"Explode")
	EROX A 1 A_ChangeFlag(NOBLOCKMAP,0)
	TNT1 A 0 A_JumpIfInventory("DetonateProx",1,"Explode")
	EROX A 1 A_ChangeFlag(NOBLOCKMAP,0)
	TNT1 A 0 A_JumpIfInventory("DetonateProx",1,"Explode")
	EROX A 1 A_ChangeFlag(NOBLOCKMAP,0)
	TNT1 A 0 A_JumpIfInventory("DetonateProx",1,"Explode")
	EROX A 1 A_ChangeFlag(NOBLOCKMAP,0)
	TNT1 A 0 A_JumpIfInventory("DetonateProx",1,"Explode")
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmoke",Random(-12,12),Random(-12,12),Random(0,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),SXF_CLIENTSIDE,64)
	Loop
  Explode:
	EROX A 15 Bright A_PlaySound("weapons/minebeep")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Explode(216,180)
	TNT1 A 0 A_StopSoundEx("Voice")
	TNT1 A 0 Radius_Quake(15,20,0,20,0)
	TNT1 AAAAAA 0 A_CustomMissile("EnragedDTGShrapnel",0,0,Random(0,359),CMF_AIMDIRECTION,Random(0,45))
	TNT1 A 0 A_PlaySound("weapons/dtech10kexplode")
	TNT1 A 0 A_SpawnItemEx("Enraged10KShockwave",0,0,15,0,0,0,0,128)
	TNT1 A 20 A_SpawnItem("EnragedDTGrenadeEx",0,-10)
	Stop
	}
}

Actor EnragedCommandoCannonBomb : EnragedCannonBomb2
{
  Speed 50
  Damage 90
  DamageType "Legendary"
  Species "Legendary"
  States
  {
  Spawn:
	EFS3 AAAABBBB 1 Bright A_SpawnItemEx("EnragedCannonBombTrail")
	Loop
  Death:
	TNT1 A 0 A_JumpIf(user_deathloop >= 6,"DeathContinue")
	TNT1 A 0 A_SetUserVar(user_deathloop,user_deathloop+1)
	TNT1 A 0 A_Explode(128,128,0)
	TNT1 A 0 A_SpawnItemEx("EnragedBFGShockwave", 0, 0, 0, 0, 0, 0, 0, 128)
	EFS3 AAAAABBBBB 1 Bright A_SpawnItemEx("EnragedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	Loop
  DeathContinue:
	TNT1 A 0 A_SpawnItemEx("EnragedDTBFGEx")
	TNT1 A 0 A_PlaySound("star/explode",1,1.0,0,0.2)
	TNT1 A 0 A_Explode(700,500,0,0,300)
	TNT1 AAAAAAAA 0 A_SpawnItemEx("ELegRevSmallBall3",Random(-8,8),Random(-8,8),Random(-8,8),Random(45,70),0,Random(-3,3),Random(170,190),SXF_NOCHECKPOSITION)	
	TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("ELegRevSmallBall3",Random(-8,8),Random(-8,8),Random(-8,8),Random(45,70),0,Random(-3,3),Random(-14,14),SXF_NOCHECKPOSITION)
	TNT1 A 1
	Stop
	}
}

ACTOR EnragedLegCommandoGhost2 : EnragedLegCommandoGhostA
{
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
	ECO2 A 2 A_FadeOut(0.10)
	Wait
	}
}

ACTOR INFEnragedLegendaryStealthTrooper : EnragedLegendaryStealthTrooper2 Replaces EnragedLegendaryStealthTrooperNEO
{
Health 1350
Obituary "%o didn't see the hail of bullets coming from an \c[m6]Enraged\c- \c[z3]Legendary Stealth Trooper\c-."
Tag "\c[m6]Enraged\c- \c[z3]Legendary Stealth Trooper\c-"
var int user_upgrade;
var int user_aurascript;
States 
{
  Spawn:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Spawn2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECMD A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECMD Z 10 A_Look
	Loop
  Spawn2:
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECM2 A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECM2 Z 10 A_Look
	Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,407)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"See2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECMD A 0 A_JumpIfTargetInLOS("Strafing")
	ECMD AA 3 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECMD BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	ECMD A 0 A_JumpIfTargetInLOS("Strafing")
	ECMD CC 3 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECMD DD 3 A_Chase
	TNT1 A 0 A_Jump(80,"Phase")
	ECMD A 0 A_Jump(80,"Rush")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")	
	Loop
  See2:
	TNT1 A 0 A_JumpIf(user_aurascript == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedAuraSpawnerZombie",0)
	TNT1 A 0 A_SetUserVar("user_aurascript",1)
	ECM2 A 0 A_JumpIfTargetInLOS("Strafing2")
	ECM2 AA 3 A_Chase
	ECM2 BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	ECM2 A 0 A_JumpIfTargetInLOS("Strafing2")
	ECM2 CC 3 A_Chase
	ECM2 DD 3 A_Chase
	TNT1 A 0 A_Jump(80,"Phase2")
	ECM2 A 0 A_Jump(80,"Rush2")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	Loop
  Rush2:
	ECM2 A 0 A_JumpIfTargetInLOS("Strafing2")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhostAA")
	ECM2 A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhostAA")
	ECM2 A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhostBB")
	ECM2 B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhostBB")
	ECM2 B 1 A_Chase
	TNT1 A 0 A_Jump(80,"Phase2")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhostCC")
	ECM2 C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhostCC")
	ECM2 C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhostDD")
	ECM2 D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegCommandoGhostDD")
	ECM2 D 1 A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_Jump(84,"See2")
	Loop
  Strafing2:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ECM2 AA 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ECM2 BB 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ECM2 CC 3 A_GiveInventory("LegZombieStrafingg",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ECM2 DD 3 A_GiveInventory("LegZombieStrafingg",1)
	Goto See2
  Phase2:
	TNT1 A 0 A_PlaySound("phaseimp/teleport")
	ECM2 E 2 A_FaceTarget
	ECM2 E 1 A_SetTranslucent(0.75)
	ECM2 E 1 A_SetTranslucent(0.55)
	ECM2 E 1 A_SetTranslucent(0.35)
	ECM2 E 1 A_SetTranslucent(0.20)
	Goto Phased2
  UnPhase2:
	TNT1 A 0 A_PlaySound("phaseimp/teleport")
	ECM2 E 1 A_SetTranslucent(0.15)
	ECM2 E 1 A_SetTranslucent(0.35)
	ECM2 E 1 A_SetTranslucent(0.55)
	ECM2 E 1 A_SetTranslucent(0.75)
	TNT1 A 0 A_SetTranslucent(1)
	ECM2 E 2 A_FaceTarget		
	Goto See2
/*
  Phased: //Who have the brilliant idea of copy and paste the walk sprites just for this????
	ECMP AABBCCDDAABBCCDDAABBCCDDAABBCCDD 1 A_ExtChase(0,0)
	ECMP AABBCCDDAABBCCDD 1 A_Chase
	TNT1 A 0 A_Jump(24,"UnPhase")
	Goto Phased+32	
*/
  Phased2:
	ECM2 AABBCCDDAABBCCDDAABBCCDDAABBCCDD 1 A_ExtChase(0,0)
	ECM2 AABBCCDDAABBCCDD 1 A_Chase
	TNT1 A 0 A_Jump(24,"UnPhase2")
	Goto Phased2+32	
  Missile:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Missile2")
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_JumpIfHealthLower(400,"EnragedRune")
	TNT1 A 0 A_Jump(5,"EnragedRune")
  MissileLoop:
	TNT1 A 0 A_SetUserVar(user_SniperLoop,0)
	TNT1 A 0 A_SetUserVar(user_SniperAttack,0)
	ECMD E 10 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("ELegAK47Ammo",92,"Reload")
	TNT1 A 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 A_GiveInventory ("ELegAK47Ammo",1)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TNT1 A 0 A_CustomBulletAttack(42.5,14,1,Random(10,20)*3,"EnragedBulletPuff")
	ECMD F 0 A_PlaySoundEx("ELMG/Fire","Weapon")
	ECMD F 3 A_GiveInventory("LegZombieStrafingg",1)	
	TNT1 A 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 A_GiveInventory ("ELegAK47Ammo",1)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TNT1 A 0 A_CustomBulletAttack(32.1,12,1,Random(16,30)*3,"EnragedBulletPuff")
	ECMD F 0 A_PlaySoundEx("ELMG/Fire","Weapon")
	ECMD F 3 A_GiveInventory("LegZombieStrafingg",1)	
	TNT1 A 0 A_CPosRefire
	TNT1 A 0 A_Jump(12,"Turrets")
	TNT1 A 0 A_Jump(2,"Pause")
	TNT1 A 0 A_Jump(8,"Nade")
	TNT1 A 0 A_Jump(18,"Sniper")
	Goto MissileLoop+3
  Missile2:
	TNT1 A 0 A_SetUserVar(user_SniperLoop,0)
	TNT1 A 0 A_SetUserVar(user_SniperAttack,0)
	ECM2 E 10 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("ELegAK47Ammo", 92, "Reload2")
	TNT1 A 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 A_GiveInventory ("ELegAK47Ammo",1)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TNT1 A 0 A_CustomBulletAttack(42.5,14,1,Random(10,20)*3,"EnragedBulletPuff")
	ECM2 F 0 A_PlaySoundEx("ELMG/Fire","Weapon")
	ECM2 F 2 A_GiveInventory("LegZombieStrafingg",1)	
	TNT1 A 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 A_GiveInventory ("ELegAK47Ammo",1)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TNT1 A 0 A_CustomBulletAttack(32.1,12,1,Random(16,30)*3,"EnragedBulletPuff")
	ECM2 F 0 A_PlaySoundEx("ELMG/Fire","Weapon")
	ECM2 F 2 A_GiveInventory("LegZombieStrafingg",1)	
	TNT1 A 0 A_CPosRefire
	TNT1 A 0 A_Jump(15,"Turrets2")
	TNT1 A 0 A_Jump(5,"Pause2")
	TNT1 A 0 A_Jump(20,"Sniper2","Nade2")
	Goto Missile2+3
  Pause2:
	ECM2 EEEEE 3 A_GiveInventory("LegZombieStrafingg",1)
	Goto See2
  Reload2:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_PlaySound("weapons/LMGReload2")
	TNT1 A 0 A_SpawnItemEx("LegendaryEmptyDrumSpawner",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90), 128)
	ECM2 EE 25 A_TakeInventory ("ELegAK47Ammo", 92)
	ECM2 E 20 A_PlaySound("weapons/LMGReload1") 
	ECM2 E 40 A_PlaySound("weapons/LMGReload3")
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	Goto See2
  Nade2:
	ECM2 E 1 A_JumpIfCloser(1000,1)
	Goto Missile2
	ECM2 E 0 A_JumpIfCloser(280,"Missile2")
	ECM2 E 6 A_GiveInventory("LegZombieStrafingg",1)
	ECM2 EEE 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ECM2 E 6 A_CustomMissile("ELegStealthTrooperNade",32,0,0,2,10)
	ECM2 E 1
	ECM2 EEE 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
	ECM2 E 6 A_CustomMissile("ELegStealthTrooperNade",32,0,0,2,10)
	ECM2 E 1
	Goto See2
  Turrets2:
	TNT1 A 0 A_JumpIf(user_TurretUse == 2,"Sniper2")
	TNT1 A 0 A_SetUserVar(user_TurretUse,2)
	ECM2 C 8 A_PlaySound("ELegCommando/Star",0,1,0,ATTN_NONE)
	ECM2 E 3 A_CustomMissile("ELSuperTurretSpawner",32,0,25,0,15)
	ECM2 C 3 A_CustomMissile("ELSuperTurretSpawner",32,0,-25,0,15)
	ECM2 E 3 A_CustomMissile("ELSuperTurretSpawner",32,0,0,0,15)
	ECM2 EEE 8 A_FaceTarget
	Goto See2
//>-<<-<<-=+[#]+=->>->>-<[Just """""""Fixing""""""" this laggy thing ]>-<<-<<-=+[#]+=->>->>-<\\
  Sniper:
	TNT1 A 0 A_PlaySound("superzombie/sight")
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)	
	ECMD E 5 A_FaceTarget
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)	
	ECMD E 5 A_FaceTarget
  SniperLoopStart:
	TNT1 A 0 A_JumpIf(user_SniperLoopStart == 17,"SniperLoop")
	TNT1 A 0 A_SetUserVar(user_SniperLoopStart,user_SniperLoopStart+1)
	ECMD E 2 A_CustomRailgun(-1,7,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,RailTargetPuff,0,0,0,0,2,0,"EnragedLaserSight")
	Loop
  SniperLoop:
	TNT1 A 0 A_JumpIf(user_SniperLoop == 50, "See")
	TNT1 A 0 A_SetUserVar(user_SniperLoop,user_SniperLoop+1)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_JumpifTargetinLOS("SniperAttack")
	ECMD E 2 A_CustomRailgun(-1,7,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,RailTargetPuff,0,0,0,0,2,0,"EnragedLaserSight")
	Loop
  SniperAttack:
	TNT1 A 0 A_SetUserVar(user_SniperLoopStart,0)
	TNT1 A 0 A_JumpIf(user_SniperAttack == 8, "See")
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(2,-2),0)
	TNT1 A 0 A_PlaySoundEx("ELMG/LOnFire","Weapon")
	TNT1 A 0 A_JumpIfInventory ("ELegAK47Ammo",92,"Reload")
	TNT1 A 0 A_GiveInventory ("ELegAK47Ammo",1)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TNT1 A 0 A_CustomBulletAttack(6,10,1,Random(10,20)*5,"EnragedBulletPuff",0,CBAF_NORANDOM)
	ECMD F 2 A_CustomRailgun(-1,7,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,RailTargetPuff,0,0,0,0,2,0,"EnragedLaserSight")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECMD E 2 A_CustomRailgun(-1,7,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,RailTargetPuff,0,0,0,0,2,0,"EnragedLaserSight")
	TNT1 A 0 A_SetUserVar(user_SniperAttack,user_SniperAttack+1)
	Loop
//>-<<-<<-=+[#]+=->>->>-<[ <####> <####> <####> <####> <####> <####> ]>-<<-<<-=+[#]+=->>->>-<\\
  Sniper2:
	TNT1 A 0 A_PlaySound("superzombie/sight")
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)	
	ECM2 E 5 A_FaceTarget
	TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)	
	ECM2 E 5 A_FaceTarget
  SniperLoopStart2:
	TNT1 A 0 A_JumpIf(user_SniperLoopStart == 17,"SniperLoop2")
	TNT1 A 0 A_SetUserVar(user_SniperLoopStart,user_SniperLoopStart+1)
	ECM2 E 2 A_CustomRailgun(-1,7,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,RailTargetPuff,0,0,0,0,2,0,"EnragedLaserSight")
	Loop
  SniperLoop2:
	TNT1 A 0 A_JumpIf(user_SniperLoop == 50, "See2")
	TNT1 A 0 A_SetUserVar(user_SniperLoop,user_SniperLoop+1)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_JumpifTargetinLOS("SniperAttack2")
	ECM2 E 2 A_CustomRailgun(-1,7,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,RailTargetPuff,0,0,0,0,2,0,"EnragedLaserSight")
	Loop
  SniperAttack2:
	TNT1 A 0 A_SetUserVar(user_SniperLoopStart,0)
	TNT1 A 0 A_JumpIf(user_SniperAttack == 16,"See")
	TNT1 A 0 A_SetUserVar(user_SniperAttack,user_SniperAttack+1)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(2,-2),0)
	TNT1 A 0 A_PlaySoundEx("ELMG/LOnFire","Weapon")
	TNT1 A 0 A_JumpIfInventory ("ELegAK47Ammo",92,"Reload2")
	TNT1 A 0 A_GiveInventory ("ELegAK47Ammo",1)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TNT1 A 0 A_CustomBulletAttack(6,10,1,Random(10,20)*5,"EnragedBulletPuff",0,CBAF_NORANDOM)
	ECM2 F 2 A_CustomRailgun(-1,7,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,RailTargetPuff,0,0,0,0,2,0,"EnragedLaserSight")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECM2 E 2 A_CustomRailgun(-1,7,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,RailTargetPuff,0,0,0,0,2,0,"EnragedLaserSight")
	Loop
  EnragedRune:
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,1)
	TNT1 A 0 A_Playsound("ELEGCommando/See",7,1,0,ATTN_NONE)
	TNT1 A 0 A_PlaySound("legendary/defense")
	ECMD EEEEEEEEEEEEEEEEEEEEEEEEEEE 3 A_SpawnItem("ILegImpLineSpawner")
	TNT1 A 0 A_SetUserVar("user_upgrade",1)
	TNT1 A 0 A_SpawnItemEx("RedLightning")
	TNT1 A 0 A_SpawnItem("EnragedDeathBallSmall")
	TNT1 A 0 A_PlaySound("TrueLegRune/Pickup",6,1.0,0,ATTN_NONE)
    TNT1 A 0 ACS_NamedExecuteAlways("EnragedLegStealthTroAwakened",0)
	ECM2 EEEEEEEEEEEEEEE 2 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,0)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_UnsetInvulnerable
	Goto See2
  Pain:
   	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Pain2")
	TNT1 A 0 A_Jump(15,"Protection")
	TNT1 A 0 A_Jump(90,"Phase")
    ECMD G 3 A_GiveInventory("LegZombieStrafingg",1)
    TNT1 A 0 A_Pain
	ECMD G 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_Jump(25,"Turrets")
    Goto See
  Pain2:
	TNT1 A 0 A_Jump(15,"Protection2")
	TNT1 A 0 A_Jump(90,"Phase2")
    ECM2 G 3 A_GiveInventory("LegZombieStrafingg",1)
    TNT1 A 0 A_Pain
	ECM2 G 3 A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_Jump(25,"Turrets2")
    Goto See2
  Protection2:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain2")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain2")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	ECM2 E 2 ACS_NamedExecuteAlways("EnragedLegendaryProtection")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	Goto See2
  Death:
    TNT1 A 0 A_ChangeFlag(BRIGHT,0)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Death2")
    TNT1 A 0 A_Jump(36,"LegendarySoul")
	TNT1 A 0 A_SetTranslucent(1)
    TNT1 A 0 A_StopSound(6)
	ECMD H 5 A_Scream
    ECMD I 5 A_Fall
    ECMD J 5 A_SpawnItem("BodyCrash")
    ECMD K 5 
    ECMD L -1 
	Stop
  Death2:
    TNT1 A 0 A_Jump(36,"LegendarySoul2")
	TNT1 A 0 A_SetTranslucent(1)
    TNT1 A 0 A_StopSound(6)
	ECM2 H 5 A_Scream
    ECM2 I 5 A_Fall
    ECM2 J 5 A_SpawnItem("BodyCrash")
    ECM2 K 5 
    ECM2 L -1 
	Stop
  LegendarySoul2:
	TNT1 A 0 A_SetTranslucent(1)
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECM2 H 5 A_Scream
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    ECM2 I 5 A_Fall
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    ECM2 J 5 A_SpawnItem("BodyCrash")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    ECM2 K 5 
	ECM2 L 140
	ECM2 L 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	ECM2 LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	ECM2 LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	ECM2 LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("ELegSoulEventSmokeSpawner",1)
	TNT1 A 0 A_SpawnItemEx("EnragedLegendarySoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	ECM2 L -1
	Stop
	}
}

ACTOR INFEnragedLegendaryStealthTrooper2 : INFEnragedLegendaryStealthTrooper
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Stealth Trooper\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(60,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"Spawn2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECMD A 10 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ECMD Z 10 A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ChaingunSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

Actor EnragedLegendaryStealthTrooperAwakened : INFEnragedLegendaryStealthTrooper2
{
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(60,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedLegStealthTroAwakened",0)
	TNT1 A 0 A_SetUserVar("user_upgrade",user_upgrade+1)
	Goto Idle
	}
}


Actor ELSuperTurretSpawner : ELTurretSpawner
{
  States
  {
  Death:
	LSTS ABCDEF 1 A_SpawnItem("EnragedHellionSmokeSpawner")
	LSTS A 1 A_SpawnItem("EnragedLegendarySuperTurret")
	Stop
	}
}

Actor EnragedLegendarySuperTurret : EnragedLegendaryTurret
{
  Health 500
  DamageFactor 0.75
  Obituary "%o was surrounded by an Enraged Legendary Stealth Trooper's turrets."
  var int user_TurretLoop;
  States
  {
  Spawn:
  See:
	TNT1 A 0 A_SetUserVar(user_TurretLoop,0)
    SENT CCCCCCCCCCCCCCC 1 A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    TNT1 A 0 A_PlaySound("sentry/beep")
	TNT1 A 0 A_ClearTarget
    Loop
  Missile:
    TNT1 A 0 A_Jump(256,"Cannon1","Cannon2","Rockets")
  Cannon1:
    SENT CCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	SENT D 3 A_CustomMissile("ELegTurretRevBall",32,0,random(-2,2))
    SENT CCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	SENT D 3 A_CustomMissile("ELegTurretRevBall",32,0,random(-2,2))
    SENT CCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	SENT D 3 A_CustomMissile("ELegTurretRevBall",32,0,random(-2,2))
    SENT CCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	SENT D 3 A_CustomMissile("ELegTurretRevBall",32,0,random(-2,2))
    TNT1 A 0 A_Jump(128,"Pause")
    TNT1 A 0 A_CPosRefire 
    Loop
  Cannon2:
    SENT CCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_PlayWeaponSound("legendarycannon/fire")
	SENT D 3 A_CustomMissile("ELegTurretRevSmallBall3",32,0,random(-2,2))
    SENT CCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_PlayWeaponSound("legendarycannon/fire")
	SENT D 3 A_CustomMissile("ELegTurretRevSmallBall3",32,0,random(-2,2))
    SENT CCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_PlayWeaponSound("legendarycannon/fire")
	SENT D 3 A_CustomMissile("ELegTurretRevSmallBall3",32,0,random(-2,2))
    SENT CCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	TNT1 A 0 A_PlayWeaponSound("legendarycannon/fire")
	SENT D 3 A_CustomMissile("ELegTurretRevSmallBall3",32,0,random(-2,2))
    TNT1 A 0 A_Jump(128,"Pause")
    TNT1 A 0 A_CPosRefire 
    Loop
  Rockets:
	SENT CCCCCCCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	SENT D 3 A_CustomMissile("ELegTurretRocket",32)
	SENT CCCCCCCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	SENT D 3 A_CustomMissile("ELegTurretRocket",32)
	SENT CCCCCCCCC 1 A_FaceTarget
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	SENT D 3 A_CustomMissile("ELegTurretRocket",32)
    TNT1 A 0 A_Jump(128,"Pause")
    TNT1 A 0 A_CPosRefire 
	Loop
  Pause:
	SENT C 20
    TNT1 A 0 A_PlaySound("sentry/beep")
	Goto See
  Death:
	TNT1 A 0 A_SpawnItemEx("EnragedParticleSpawner") 
	TNT1 AAA 0 A_CustomMissile("EKaboomLN",0,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX2",0,0,random(0,360),2,random(0,360))
	TNT1 AAAA 0 A_SpawnItemEx("LegendaryDebris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
	TNT1 A 0 A_PlaySound("weapons/rocklx")
	TNT1 A 1 A_SpawnItem("RocketEx",0,32)
	Stop
	}
}

Actor ELegTurretRevBall : ELegRevBall { Damage 10 Damagetype "Legendary" }

Actor ELegTurretRevSmallBall3 : ELegRevSmallBall3 { Damage 8 Damagetype "Legendary" }

ACTOR ELegTurretRocket : EnragedCommandoRocket { Damagetype "Legendary" }

ACTOR EnragedLegCommandoGhostAA : EnragedLegCommandoGhostA
{
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
	ECM2 A 2 A_FadeOut(0.10)
	Wait
    }
}

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

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

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

//Enraged Legendary General 312

ACTOR EnragedLegendaryGeneral2 : EnragedLegendaryGeneral
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary General\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(60,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	EEGE A 10 Bright A_Look
	TNT1 A 0 A_PlayWeaponSound("weapons/bfg15kidle")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	EEGE "Z" 10 Bright A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ChaingunSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryFiend : NewEnragedLegendaryFiend Replaces EnragedLegendaryFiend
{
SeeSound "EnragedFiend/Sight"
ActiveSound "EnragedFiend/Active"
PainSound "EnragedFiend/Pain"
DeathSound "EnragedFiend/Death"
AttackSound "EnragedFiend/Melee"
Tag "\c[m6]Enraged\c- \c[z3]Legendary Fiend\c-"
States
{
  Lunge:
    TNT1 A 0 A_Jump(64,"Normal")
	TNT1 A 0 A_PlaySound("EnragedFiend/Melee")
	EFND EF 6 A_FaceTarget
	TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,1)
	TNT1 A 0 ThrustThingZ(0,20,0,1)
    EFND F 2 A_Recoil(-26)
	EFND F 3 A_CustomMissile("ELFLunge",18,0,0,CMF_AIMDIRECTION)
	EFND G 6
	EFND G 2 A_ScaleVelocity(0.2)
	TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,0)
	EFND G 1 A_ScaleVelocity(0)
	Goto See
  Rage:	
    EFND G 1 A_JumpIfCloser(1800,1)
    Goto Normal
    EFND G 1 A_PlaySound("EnragedFiend/Rage")
	EFND G 0 A_SetInvulnerable
	EFND G 1 A_FaceTarget
  RageWait:
    TNT1 A 0 A_JumpIf(user_ragewait >= 14,"RageGo")
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
    EFND G 0 A_JumpIfTargetInLos(2)
	EFND G 0 A_Jump(256,2)
	EFND G 0 A_FaceTarget
	EFND G 2 A_SpawnItem("ELFiendFlameSpawner")
	Loop
  RageGo:
	TNT1 A 0 A_Jump(96,"Rage2")
    TNT1 A 0 A_SetUserVar("user_ragewait",0) 
	TNT1 A 0 A_SetUserVar("user_ragecount",user_ragecount+1)
	EFND G 0 A_UnSetInvulnerable
	TNT1 A 0 ThrustThingZ(0,30,0,1)
    TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,1)
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	EFND G 9
	EFND G 0 A_JumpIfTargetInLos(2)
	EFND G 0 A_Jump(256,2)
	EFND G 0 A_FaceTarget
	EFND G 3
	TNT1 A 0 ThrustThingZ(0,25,0,1)
    EFND F 2 A_Recoil(-110)
	TNT1 A 0 A_PlaySound("EnragedFiend/Melee")
  RageLoop:
    TNT1 A 0 A_JumpIf(user_ragewait >= 20,"RageEnd")
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
	EFND G 0 A_SpawnItemEx("ELFGhost",0,0,0,0,0,0,0,128)
	EFND G 0 A_SpawnItem("ELFiendFlameSpawner")
	EFND G 0 A_CustomMissile("BigELFLunge",18,0,0,CMF_AIMDIRECTION)
	EFND G 2 A_FaceTarget
	Loop
  Rage2:	
    TNT1 A 0 A_JumpIf(user_ragecount >= 2,"RageGo")
    TNT1 A 0 A_SetUserVar("user_ragewait",0) 
	EFND G 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("ELFLungeGhost")
	EFND G 20
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("ELFLungeGhost")
	EFND G 20 
	TNT1 A 0 A_SetUserVar("user_ragecount",user_ragecount+1)
	Goto RageGo
  LungeMKII:
    TNT1 A 0 A_Jump(64,"NormalMKII")
	TNT1 A 0 A_PlaySound("EnragedFiend/Melee")
	E2ND EF 6 A_FaceTarget
	TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,1)
	TNT1 A 0 ThrustThingZ(0,20,0,1)
    E2ND F 2 A_Recoil(-26)
	E2ND F 3 A_CustomMissile("ELFLunge",18,0,0,CMF_AIMDIRECTION)
	E2ND F 6
	E2ND F 2 A_ScaleVelocity(0.2)
	TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,0)
	E2ND F 1 A_ScaleVelocity(0)
	Goto SeeMKII
  RageMKII:
    E2ND E 1 A_JumpIfCloser(1800,1)
    Goto NormalMKII
    E2ND E 1 A_PlaySound("EnragedFiend/Rage")
	E2ND G 0 A_SetInvulnerable
	E2ND E 1 A_FaceTarget
  RageMKIIWait:
    TNT1 A 0 A_JumpIf(user_ragewait >= 14,"RageMKIIGo")
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
    E2ND E 0 A_JumpIfTargetInLos(2)
	E2ND E 0 A_Jump(256,2)
	E2ND E 0 A_FaceTarget
	E2ND E 2 A_SpawnItem("ELFiendFlameSpawner")
	Loop
  RageMKIIGo:
	TNT1 A 0 A_Jump(96,"RageMKII2")
    TNT1 A 0 A_SetUserVar("user_ragewait",0) 
	TNT1 A 0 A_SetUserVar("user_ragecount",user_ragecount+1)
	E2ND E 0 A_UnSetInvulnerable
	TNT1 A 0 ThrustThingZ(0,30,0,1)
    TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,1)
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	E2ND E 9
	E2ND E 0 A_JumpIfTargetInLos(2)
	E2ND E 0 A_Jump(256,2)
	E2ND E 0 A_FaceTarget
	E2ND E 3
	TNT1 A 0 ThrustThingZ(0,25,0,1)
    E2ND F 2 A_Recoil(-110)
	TNT1 A 0 A_PlaySound("EnragedFiend/Melee")
  RageMKIILoop:
    TNT1 A 0 A_JumpIf(user_ragewait >= 20,"RageMKIIEnd")
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
	E2ND F 0 A_SpawnItemEx("ELFGhostMKII",0,0,0,0,0,0,0,128)
	E2ND F 0 A_SpawnItem("ELFiendFlameSpawner")
	E2ND F 0 A_CustomMissile("BigELFLunge",18,0,0,CMF_AIMDIRECTION)
	E2ND F 2 A_FaceTarget
	Loop
  RageMKII2:	
    TNT1 A 0 A_JumpIf(user_ragecount >= 2,"RageMKIIGo")
    TNT1 A 0 A_SetUserVar("user_ragewait",0) 
	E2ND E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("ELFLungeGhostMKII")
	E2ND E 20
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("ELFLungeGhostMKII")
	E2ND E 20 
	TNT1 A 0 A_SetUserVar("user_ragecount",user_ragecount+1)
	Goto RageMKIIGo
  EnragedLMG:
    E2ND EE 5 A_FaceTarget
	TNT1 A 0 A_CustomMissile("LegendaryRedTracer",Random(32,38),0,Random(6,-6),0)
	TNT1 A 0 A_CustomBulletAttack(42.5,14,1,Random(10,20)*3,"EnragedBulletPuff")
	E2ND F 0 A_PlaySoundEx("ELMG/Fire","Weapon")
    E2ND E 3 A_FaceTarget
	TNT1 A 0 A_CustomMissile("LegendaryRedTracer",Random(32,38),0,Random(6,-6),0)
	TNT1 A 0 A_CustomBulletAttack(42.5,14,1,Random(10,20)*3,"EnragedBulletPuff")
	E2ND F 0 A_PlaySoundEx("ELMG/Fire","Weapon")
    E2ND F 3 A_FaceTarget
    TNT1 A 0 A_SpidRefire
	TNT1 A 0 A_Jump(4,"SeeMKII","RipperrMKII")
    Goto EnragedLMG+2
	}
}

Actor InfinityELFLungeGhostMKII : ELFLungeGhostMKII Replaces ELFLungeGhostMKII
{
States
{
  Spawn:
	E2ND E 1
	TNT1 A 0 ThrustThingZ(0,35,0,1)
    TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,1)
	E2ND E 9 Bright
	E2ND E 0 A_FaceTarget
	E2ND E 3 Bright
	TNT1 A 0 ThrustThingZ(0,25,0,1)
    E2ND F 2 A_Recoil(-100)
	TNT1 A 0 A_PlaySound("EnragedFiend/Melee")
  RageLoop:
    TNT1 A 0 A_JumpIf(user_ragewait >= 10,"Death")
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
	E2ND E 0 A_SpawnItem("ELFiendFlameSpawner")
	E2ND E 0 A_CustomMissile("BigELFGhostLungeMKII",18,0,0,CMF_AIMDIRECTION)
	E2ND E 2 Bright A_FaceTarget
	Loop
	}
}

ACTOR INFEnragedLegendaryFiend2 : INFEnragedLegendaryFiend
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Fiend\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"SpawnMKII")
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    EFND R 12 A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	EFND Q 12 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Demon",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

//Angry legendary zombie 314

ACTOR AngryLegendaryZombie2 : AngryLegendaryZombie
{
Tag "\c[m6]Angry\c- \c[z3]Legendary Zombie\c-"
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(120,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
Idle:
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    LPOS A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LPOS Q 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    Loop
	}
}

//Enraged Legendary Chainsaw Zombie 315

ACTOR EnragedLegendaryChainsawZombie2 : EnragedLegendaryChainsawZombie
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Chainsaw Zombie\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  SpawnLoop:
	ECSZ A 10 Bright A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,64)
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Demon",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

//Enraged Legendary General Roasterock 316

ACTOR INFEnragedLegendaryGeneralRoasterock2 : EnragedLegendaryGeneralRoasterock
{
DropItem "ReforcedEnragedLegendaryArmor", 140 //in LNA it doesn't drop any armor
DropItem "Homing Demon Tech Devastator", 96, 1
DropItem "Legendary Demon Tech Devastator", 150, 1
DropItem "Demon Tech BFG10K", 96, 1
DropItem "EnragedLegendaryRune", 50, 1
DropItem "LegendaryRune", 40, 1
DropItem "Rocket Launcher", 120, 1
DropItem "Grenade Launcher", 120, 1
DropItem "ArmorCharge", 150, 2
DropItem "Armorplate", 186, 2
DropItem "Portablemedkit", 159, 2
DropItem "Backpack", 190, 1
DropItem "AmpGoggles", 190, 1
DropItem "SkullOfPower", 72, 1
DropItem "LegendarySyringe" 150 1
DropItem "Randomcontracttier4" 150 1
DropItem "Randomcontracttier2" 150 1
Tag "\c[m6]Enraged\c- \c[z3]Legendary General Roasterock\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  SpawnLoop:
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    ELRR A 10 A_look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELRR "Z" 10 A_look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("ChaingunSpawnerLiter",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFCerebralShadowBoss : CerebralShadowBoss Replaces CerebralShadowBoss
{
Tag "\crCerebral Shadow\c-"
}

ACTOR INFCerebralShadowBoss2 : INFCerebralShadowBoss
{
Tag "\crCerebral Shadow\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
	CSHD A 1 A_Look
	Goto Idle
  Idle:
	CSHD A 1 A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("DoomImp",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

//Rank 2 Low Tier: Enraged Legendary (priority 450 - 550)

ACTOR INFEnragedLegendarySuicideBomber : EnragedLegendarySuicideBomber Replaces EnragedLegendarySuicideBomber
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Suicide Bomber\c-"
States
{
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RawAnger") == 0,"Remove")
	TNT1 A 0 A_SetUserVar(user_fake,0)
  SpawnLoop:
	ESBM A 10 Bright A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,64)
	ESBI A 10 Bright A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,64)
	Loop
  Kill:
	TNT1 A 0 A_Die("Extreme")
	Goto XDeath
  XDeath:
    TNT1 A 0 A_Jump(36,"LegendarySoul")
	TNT1 A 0 A_Jump(48,"ButImNotDoneYet")
	ESBM M 5 Bright
	ESBM N 5 Bright A_XScream
	ESBM O 5 A_NoBlocking
	ESBM PQRST 5
	ESBM U 63000 CanRaise
	Stop
  ButImNotDoneYet:
	TNT1 A 0 A_JumpIf(user_fake == 1,"XDeath2")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_ChangeFlag("SHOOTABLE",0)
	TNT1 A 0 A_ChangeFlag("SOLID",0)
	ESBM M 5 Bright
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ESBM N 5 Bright A_Scream
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ESBM O 5
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ESBM P 5 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ESBM QRST 5
	ESBM U 175
	TNT1 A 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	TNT1 A 0 A_SpawnItemEx("EBomberBeam")
	TNT1 A 0 A_ChangeFlag("SOLID",1)
	ESBM UUUUUUUUUUUUUUU 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM UUUUUUUUUUUUUUU 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM UUUUUUUUUUUUUUU 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM TTTTTTTTTTTTTTT 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM TTTTTTTTTTTTTTT 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM TTTTTTTTTTTTTTT 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM SSSSSSSSSSSSSSS 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM SSSSSSSSSSSSSSS 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM SSSSSSSSSSSSSSS 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM RRRRRRRRRRRRRRR 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM RRRRRRRRRRRRRRR 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM RRRRRRRRRRRRRRR 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM QQQQQQQQQQQQQQQ 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM QQQQQQQQQQQQQQQ 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM QQQQQQQQQQQQQQQ 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM PPPPPPPPPPPPPPP 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM PPPPPPPPPPPPPPP 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM PPPPPPPPPPPPPPP 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM OOOOOOOOOOOOOOO 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM OOOOOOOOOOOOOOO 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM OOOOOOOOOOOOOOO 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM NNNNNNNNNNNNNNN 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM NNNNNNNNNNNNNNN 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM NNNNNNNNNNNNNNN 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM MMMMMMMMMMMMMMM 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM MMMMMMMMMMMMMMM 2 Bright A_GiveInventory("EBomberEvent",1)
	ESBM MMMMMMMMMMMMMMM 2 Bright A_GiveInventory("EBomberEvent",1)
	TNT1 A 0 A_ChangeFlag("SHOOTABLE",0)
	ESBM M 1 Bright
	TNT1 A 0 A_SetUserVar(user_fake,1)
	TNT1 A 0 A_Jump(128,"Death")
	TNT1 A 0 A_SpawnItemEx("INFEnragedLegendarySuicideBomberNoFake",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 1
	Stop
	}
}

ACTOR INFEnragedLegendarySuicideBomberNoFake : INFEnragedLegendarySuicideBomber
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Suicide Bomber\c-"
States
{
  Spawn:
	ESBM A 10 Bright A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,64)
	ESBI A 10 Bright A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,64)
	Loop
  Death:
	TNT1 A 0 A_CustomMissile("SuicideBomb",24,0,0,CMF_AIMDIRECTION)
	TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner",0,0,24,0,0,0,0,128) 
	TNT1 AAA 0 A_CustomMissile("Kaboom3",24,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("SmokeFX2",24,0,random(0,360),2,random(0,360))
	TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,24,Random(4,-4),Random(4,-4),Random(4,8),0,128)
	TNT1 A 0 A_SpawnItem("RocketEx",0,24)
	TNT1 A 0 A_Stop
	TNT1 A 0 A_PlaySound("weapons/rocklx",CHAN_BODY)
	TNT1 A 0 A_Jump(36,"LegendarySoul")
	ESBM M 5 Bright
	ESBM N 5 Bright A_Scream
	ESBM O 5 A_NoBlocking
	ESBM PQRST 5
	ESBM U 63000 CanRaise
	Stop
  XDeath:
	TNT1 A 0 A_Jump(36,"LegendarySoul")
	ESBM M 5 Bright
	ESBM N 5 Bright A_XScream
	ESBM O 5 A_NoBlocking
	ESBM PQRST 5
	ESBM U 63000 CanRaise
	Stop
	}
}

ACTOR INFEnragedLegendarySuicideBomber2 : INFEnragedLegendarySuicideBomber
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Suicide Bomber\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(128,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RawAnger") == 0,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
	TNT1 A 0 A_SetUserVar(user_fake,0)
  SpawnLoop:
	ESBM A 10 Bright A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,64)
	ESBI A 10 Bright A_Look
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,64)
	Loop
	}
}

ACTOR INFEnragedLegendaryRedeemer : NewEnragedLegendaryRedeemer Replaces NewEnragedLegendaryRedeemer2
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Redeemer\c-"
}

ACTOR INFEnragedLegendaryRedeemer2 : INFEnragedLegendaryRedeemer
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Redeemer\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Spawn2")
    ERED AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    ERED A 10 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Cacodemon",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryNecromancer : EnragedLegendaryNecromancer Replaces EnragedLegendaryNecromancer2
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Necromancer\c-"
}

ACTOR INFEnragedLegendaryNecromancer2 : INFEnragedLegendaryNecromancer
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Necromancer\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
  Idle2:
	TNT1 A 0 A_SpawnItemEx("EnragedHellionSmokeSpawner")
	EMGE A 10 Bright A_Look 
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Cacodemon",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryTormentor : NewEnragedLegendaryTormentor Replaces EnragedLegendaryTormentor
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Tormentor\c-"
States
{
  Barrage:
    EPAI D 0 A_SetInvulnerable
	EPAI D 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("EnragedTormentor/Barrage")
	TNT1 A 0 Radius_Quake(8,60,0,20,0)
  BarrageCharge:
    TNT1 A 0 A_JumpIf(user_delay == 8,"BarrageFire")
	EPAI AAA 0 A_SpawnItem("ELRedeBSmokeSpawner")
    EPAI D 3 A_FaceTarget
    TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Barrage2:
    EP2I D 0 A_SetInvulnerable
	EP2I D 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("EnragedTormentor/Barrage")
	TNT1 A 0 Radius_Quake(8,60,0,20,0)
  Barrage2Charge:
    TNT1 A 0 A_JumpIf(user_delay == 8,"Barrage2Fire")
	EP2I AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EP2I D 3 A_FaceTarget
    TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Laser:
    EPAI G 0 A_SetInvulnerable
	EPAI G 0 A_FaceTarget
	TNT1 A 0 Radius_Quake(8,51,0,20,0)
	TNT1 A 0 A_PlaySound("EnragedTormentor/PreLaser",CHAN_AUTO,1.0,False,ATTN_NONE)
  LaserReadyLoop:
    TNT1 A 0 A_JumpIf(user_delay >= 4,"LaserChargeLoop")
	EPAI AAA 0 A_SpawnItem("ELRedeBSmokeSpawner")
    EPAI G 3 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  LaserFire:
    TNT1 A 0 A_SetUserVar(user_delay,0)
	EPAI D 0 A_UnSetInvulnerable
	TNT1 A 0 A_PlaySound("EnragedTormentor/LaserFire",CHAN_AUTO,1.0,False,ATTN_NONE)
	EPAI I 0 A_FaceTarget
	EPAI IIII 4 A_CustomMissile("ELegBanishedLaserBeam",43)
	EPAI I 0 A_FaceTarget
	EPAI IIII 4 A_CustomMissile("ELegBanishedLaserBeam",43)
	EPAI I 0 A_FaceTarget
	EPAI IIII 4 A_CustomMissile("ELegBanishedLaserBeam",43)
	EPAI I 0 A_FaceTarget
	EPAI IIII 4 A_CustomMissile("ELegBanishedLaserBeam",43)
	TNT1 A 0 A_Jump(48,"LegSoulProj")
	TNT1 A 0 A_Jump(148,"Teleport")
	Goto See
  Laser2:
    EP2I G 0 A_SetInvulnerable
	EP2I G 0 A_FaceTarget
	TNT1 A 0 Radius_Quake(8,51,0,20,0)
	TNT1 A 0 A_PlaySound("EnragedTormentor/PreLaser",CHAN_AUTO,1.0,False,ATTN_NONE)
  Laser2ReadyLoop:
    TNT1 A 0 A_JumpIf(user_delay >= 4,"Laser2ChargeLoop")
	EP2I AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EP2I G 3 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Laser2Fire:
    TNT1 A 0 A_SetUserVar(user_delay,0)
	EP2I D 0 A_UnSetInvulnerable
	TNT1 A 0 A_Playsound("MasterSpark",0,1,0,ATTN_NONE)
	TNT1 A 0 A_PlaySound("EnragedTormentor/LaserFire",CHAN_AUTO,1.0,False,ATTN_NONE)
	EP2I I 0 A_FaceTarget
	EP2I IIII 4 A_CustomMissile("ELegBanishedLaserBeam",43)
	EP2I I 0 A_FaceTarget
	EP2I IIII 4 A_CustomMissile("ELegBanishedLaserBeam",43)
	EP2I I 0 A_FaceTarget
	EP2I IIII 4 A_CustomMissile("ELegBanishedLaserBeam",43)
	EP2I I 0 A_FaceTarget
	EP2I IIII 4 A_CustomMissile("ELegBanishedLaserBeam",43)
	TNT1 A 0 A_Jump(48,"LegSoulProj2","MiniDarkMatter")
	TNT1 A 0 A_Jump(148,"Teleport2")
	Goto See2
  LegSoulProj:
    EPAI G 0 A_SetInvulnerable
	EPAI G 0 A_FaceTarget
	TNT1 A 0 Radius_Quake(8,60,0,20,0)
	TNT1 A 0 A_PlaySound("EnragedTormentor/SoulFire",CHAN_AUTO,1.0,False,ATTN_NONE)
	EPAI AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EPAI G 3 A_FaceTarget
	EPAI AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EPAI G 3 A_FaceTarget
	EPAI AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EPAI G 3 A_FaceTarget
	EPAI AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
  LegSoulProjCharge:
    TNT1 A 0 A_JumpIf(user_delay >= 18,"LegSoulProjFire")
    EPAI H 3 A_FaceTarget
	EPAI AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  LegSoulProj2:
    EP2I G 0 A_SetInvulnerable
	EP2I G 0 A_FaceTarget
	TNT1 A 0 Radius_Quake(8,60,0,20,0)
	TNT1 A 0 A_PlaySound("EnragedTormentor/SoulFire",CHAN_AUTO,1.0,False,ATTN_NONE)
	EP2I AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EP2I G 3 A_FaceTarget
	EP2I AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EP2I G 3 A_FaceTarget
	EP2I AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EP2I G 3 A_FaceTarget
	EP2I AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
  LegSoulProj2Charge:
    TNT1 A 0 A_JumpIf(user_delay >= 18,"LegSoulProj2Fire")
    EP2I H 3 A_FaceTarget
	EP2I AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Detonate:
    TNT1 A 0 A_Stop
    TNT1 A 0 A_PlaySound("EnragedTormentor/Detonate")
    TNT1 A 0 Radius_Quake(12,30,0,40,0)
    EPAI MMMMMNNNNN 3 A_SpawnItem("ELRedeYSmokeSpawner")
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	TNT1 A 0 A_UnSetShootable
	TNT1 A 0 A_SpawnItemEx("EnragedDeathBallMedium")
	EPAI OPQRSTUV 2 A_GiveInventory("ELegBanishedDeathEffect",1)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAA 5 A_Wander
	EPAI VUTSRQPONM 4 
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_Jump(128,"Missile")
	Goto See	
	}
}

ACTOR INFEnragedLegendaryTormentor2 : INFEnragedLegendaryTormentor
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Tormentor\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Spawn2")
    EPAI AAA 0 A_SpawnItem("ELRedeYSmokeSpawner")
    EPAI A 10 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("PainElemental",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryBabySentient : NewEnragedLegendaryBabySentient Replaces EnragedLegendaryBabySentient
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Baby Sentient\c-"
States
{
  Cannon:
	EBBS C 0 A_SetInvulnerable
	EBBS C 1 A_FaceTarget
	EBBS CCC 2 A_SpawnItemEx("ELBabySentBlueFlameSpawner",random(-24,24),random(-24,24),-30)
	EBBS C 1 A_FaceTarget
	TNT1 A 0 A_PlayWeaponSound("ECannon/Charge")
    EBBS CCCCCCCCCCCC 2 A_SpawnItemEx("ELBabySentBlueFlameSpawner",random(-24,24),random(-24,24),-30)
	EBBS C 1 A_FaceTarget
	EBBS C 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
  CannonLoop:
    TNT1 A 0 A_JumpIf(user_delay >= 6,"CannonEnd")
	EBBS C 2 A_FaceTarget
	EBBS D 0 A_PlayWeaponSound("ECannon/Fire")
	EBBS D 4 A_CustomMissile("ELBSCannonProj",15,0,Random(2,-2))
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  CannonEnd:	
    TNT1 A 0 A_SetUserVar(user_delay,0)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	Goto See
  CannonMKII:
	EBB2 C 0 A_SetInvulnerable
	EBB2 C 1 A_FaceTarget
	EBB2 CCC 2 A_SpawnItemEx("ELBabySentBlueFlameSpawner",random(-24,24),random(-24,24),-30)
	EBB2 C 1 A_FaceTarget
	TNT1 A 0 A_PlayWeaponSound("ECannon/Charge")
    EBB2 CCCCCCCCCCCC 2 A_SpawnItemEx("ELBabySentBlueFlameSpawner",random(-24,24),random(-24,24),-30)
	EBB2 C 1 A_FaceTarget
	EBB2 C 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
  CannonMKIILoop:
    TNT1 A 0 A_JumpIf(user_delay >= 6,"CannonMKIIEnd")
	EBB2 CC 5 A_FaceTarget
	EBB2 D 0 A_PlayWeaponSound("ECannon/Fire")
	EBB2 D 5 A_CustomMissile("ELBSCannonBall",15,0,Random(2,-2))
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  ASGMKII:
	EBB2 KKKKKKKKKK 3 A_FaceTarget
  ASGMKIILoop:
    TNT1 A 0 A_JumpIf(user_delay >= 11,"ASGMKIIEnd")
	TNT1 A 0 A_PlaySound("EASG/Fire",5)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",Random(28,34),0,Random(6,-6),0)
    TNT1 A 0 A_SpawnItemEx("ELegRifleCasing", 8, -8, 18, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)	
    TNT1 A 0 A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"EnragedBulletPuff")
	EBB2 LK 3
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  LMG:
	EBBS KKKKKKKKKK 3 A_FaceTarget
  LMGLoop:
    TNT1 A 0 A_JumpIf(user_delay >= 11,"LMGEnd")
	TNT1 AA 0 A_CustomMissile("LegendaryRedTracer",9,Random(-8,8),Random(2,-2),0)
    TNT1 A 0 A_PlaySoundEx("ELMG/Fire","Weapon")
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing", 12, -6, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AA 0 A_CustomBulletAttack(6,10,1,Random(10,20)*5,"EnragedBulletPuff")
	EBBS LK 3
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  LMGEnd:
    TNT1 A 0 A_SetUserVar(user_delay,0)
	TNT1 A 0 A_RemoveChildren(1)
	Goto See
	}
}

ACTOR INFEnragedLegendaryBabySentient2 : INFEnragedLegendaryBabySentient
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Baby Sentient\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
    TNT1 A 0 A_JumpIf(user_script == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("EnragedFlameJets",0,1)
    TNT1 A 0 A_SetUserVar("user_script",1)
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"SpawnMKII")
	EBBS AAA 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24),0)
	EBBS A 8 A_Look
	EBBS BBB 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24),0)
	EBBS B 8 A_Look	
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Arachnotron",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryBehemoth : NewEnragedLegendaryBehemoth Replaces EnragedLegendaryBehemoth
{
SeeSound "EnragedBehem/Sight"
ActiveSound "EnragedBehem/Active"
PainSound "EnragedBehem/Pain"
DeathSound "EnragedBehem/Death"
Tag "\c[m6]Enraged\c- \c[z3]Legendary Behemoth\c-"
States
{
  Missile:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Missile2")
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_JumpIfHealthLower(900,"Ascension")
	TNT1 A 0 A_JumpIfCloser(350,"NotBlueFlame")
	TNT1 A 0 A_Jump(44,"Hellstorm")
	TNT1 A 0 A_Jump(156,"BFGG","Cannon","Spikes","Floor")
  Normal:
    TNT1 A 0 A_PlaySound("EnragedBehem/Normal",0,1,0,ATTN_NONE)
    EEG2 G 15 A_FaceTarget    
    TNT1 A 0 A_FaceTarget 
  CometLoop:
	TNT1 A 0 A_JumpIf(user_delay >= 5,"CometEnd")
    TNT1 A 0 A_CustomMissile("ELegBehComet",30,-30,Random(0,6))
    EEG2 H 2 A_CustomMissile("ELegBehComet",30,30,Random(0,-6))	   
    TNT1 A 0 A_CustomMissile("ELegBehComet",30,30,Random(-7,-12))
    EEG2 H 4 A_CustomMissile("ELegBehComet",30,-30,Random(7,12))
    EEG2 IG 5 A_FaceTarget    
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  BFGG:
	EEG2 G 1 A_PlaySound("EnragedBehem/BFG",1,1,0,ATTN_NONE)
	EEG2 G 0 A_SetInvulnerable
	EEG2 G 0 A_FaceTarget
    EEG2 G 2 A_SpawnItemEx("LHellionSmokeSpawner",random(-24,24),random(-24,24))
	EEG2 G 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("monsters/volattack")
	TNT1 A 0 A_PlaySound("weapons/bfgf",3,1,0)
  BFGGCharge:
	TNT1 A 0 A_JumpIf(user_delay >= 18,"BFGGFire")
	EEG2 G 0 A_FaceTarget
    EEG2 G 2 A_SpawnItemEx("LHellionSmokeSpawner",random(-24,24),random(-24,24))
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  ELegBFGG:
	EEG3 G 1 A_PlaySound("EnragedBehem/BFG",1,1,0,ATTN_NONE)
	EEG3 G 0 A_SetInvulnerable
	EEG3 G 0 A_FaceTarget
    EEG3 G 2 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24))
	EEG3 G 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("monsters/volattack")
	TNT1 A 0 A_PlaySound("weapons/bfgf",3,1,0)
  ELegBFGGCharge:
	TNT1 A 0 A_JumpIf(user_delay >= 18,"ELegBFGGFire")
	EEG3 G 0 A_FaceTarget
    EEG3 G 2 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24))
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Cannon:
	EEG2 G 1 A_PlaySound("EnragedBehem/Cannon",1,1,0,ATTN_NONE)
	EEG2 G 0 A_SetInvulnerable
	EEG2 G 1 A_FaceTarget
	EEG2 G 0 A_FaceTarget
    EEG2 G 2 A_SpawnItemEx("LHellionSmokeSpawner",random(-24,24),random(-24,24))
	EEG2 G 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("monsters/volattack")
	TNT1 A 0 A_PlaySound("ECannon/Charge",3,1,0)
  CannonCharge:
	TNT1 A 0 A_JumpIf(user_delay >= 18,"CannonLoop")
	EEG2 G 0 A_FaceTarget
	EEG2 G 2 A_SpawnItemEx("LHellionSmokeSpawner",random(-24,24),random(-24,24))
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  CannonLoop:
	TNT1 A 0 A_JumpIf(user_delay >= 23,"CannonEnd")
	EEG2 G 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_PlayWeaponSound("legendarycannon/fire")
	TNT1 A 0 A_CustomMissile("ELegBehCannonProj", 30, -30, Random(0, 6))
    EEG2 H 2 A_CustomMissile("ELegBehCannonProj", 30, 30, Random(0, -6))	   
    TNT1 A 0 A_CustomMissile("ELegBehCannonProj", 30, 30, Random(-25, -32))
    EEG2 H 6 A_CustomMissile("ELegBehCannonProj", 30, -30, Random(25, 32))
    EEG2 IG 4 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Cannon2:
	EEG3 G 1 A_PlaySound("EnragedBehem/Cannon",1,1,0,ATTN_NONE)
	EEG3 G 0 A_SetInvulnerable
	EEG3 G 1 A_FaceTarget
	EEG3 G 0 A_FaceTarget
    EEG3 G 2 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24))
	EEG3 G 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("monsters/volattack")
	TNT1 A 0 A_PlaySound("ECannon/Charge",3,1,0)
  Cannon2Charge:
	TNT1 A 0 A_JumpIf(user_delay >= 18,"Cannon2Loop")
	EEG3 G 0 A_FaceTarget
	EEG3 G 2 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24))
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Cannon2Loop:
	TNT1 A 0 A_JumpIf(user_delay >= 23,"Cannon2End")
	EEG3 G 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_PlayWeaponSound("legendarycannon/fire")
	TNT1 A 0 A_CustomMissile("ELegBehCannonProj",30,-30,Random(0,6))
    EEG3 H 2 A_CustomMissile("ELegBehCannonProj",30,30,Random(0,-6))	   
    TNT1 A 0 A_CustomMissile("ELegBehCannonProj",30,30,Random(-25,-32))
    EEG3 H 6 A_CustomMissile("ELegBehCannonProj",30,-30,Random(25,32))
    EEG3 IG 4 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  NotBlueFlame:
	TNT1 A 0 A_PlaySound("EnragedBehem/FlameReady",2,1,0)
	EEG2 GG 5 A_FaceTarget
	TNT1 A 0 A_PlaySound("EnragedBehem/FlameFire",4,1,0)
  BlueFlameLoop:
	TNT1 A 0 A_JumpIf(user_delay >= 21,"BlueFlameEnd")
    TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_CustomMissile("ELegBehFlame", 30, 30, Random(6, -6), CMF_AIMOFFSET)
    EEG2 H 1 A_CustomMissile("ELegBehFlame", 30, -30, Random(6, -6), CMF_AIMOFFSET)
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Floor:
	TNT1 A 0 A_PlaySound("EnragedBehem/Floor",1,1,0,ATTN_NONE)
    EEG2 GGGG 10 A_FaceTarget   
  FloorLoop:
	TNT1 A 0 A_JumpIf(user_delay >= Random(2,4),"FloorEnd")
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,22)
    TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,45)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,67)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,90)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,112)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,135)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,157)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,180)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-157)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-135)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-112)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-90)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-67)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-45)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-22)
    EEG2 H 8 A_CustomMissile("EnragedStompFireSpawner",30)
    EEG2 IG 8 A_FaceTarget    
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Floor2:
	TNT1 A 0 A_PlaySound("EnragedBehem/Floor",1,1,0,ATTN_NONE)
    EEG3 GGGG 10 A_FaceTarget   
  Floor2Loop:
	TNT1 A 0 A_JumpIf(user_delay >= 4,"Floor2End")
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,22)
    TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,45)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,67)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,90)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,112)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,135)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,157)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,180)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-157)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-135)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-112)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-90)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-67)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-45)
	TNT1 A 0 A_CustomMissile("EnragedStompFireSpawner",30,0,-22)
    EEG3 H 8 A_CustomMissile("EnragedStompFireSpawner",30)
    EEG3 IG 8 A_FaceTarget    
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
  Spikes:
	TNT1 A 0 A_PlaySound("EnragedBehem/Spikes",1,1,0,ATTN_NONE)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("EnragedSpike",Random(-512,512),Random(-512,512), 0, 0, 0, 0, 0, 34, 0)
	EEG2 GGGGGGG 4 A_FaceTarget
	EEG2 HHIIGGGG 4 A_FaceTarget
	Goto See
  Spikes2:
	TNT1 A 0 A_PlaySound("EnragedBehem/Spikes",1,1,0,ATTN_NONE)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("EnragedSpike",Random(-512,512),Random(-512,512), 0, 0, 0, 0, 0, 34, 0)
	EEG3 GGGGGGG 4 A_FaceTarget
	EEG3 HHIIGGGG 4 A_FaceTarget
	Goto See2
  Hellstorm:
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	TNT1 A 0 A_PlaySound("EnragedBehem/Hellstorm",1,1,0,ATTN_NONE)
	TNT1 A 0 A_Jump(128,"StreetSweeperCharge")
  HellstormCharge:
	TNT1 A 0 A_JumpIf(user_delay >= 23,"HellstormFire")
	EEG2 G 0 A_FaceTarget
    EEG2 G 2 A_SpawnItemEx("LHellionSmokeSpawner",random(-24,24),random(-24,24))
	TNT1 A 0 A_SetUserVar(user_delay,user_delay+1)
	Loop
	}
}

ACTOR INFEnragedLegendaryBehemoth2 : INFEnragedLegendaryBehemoth
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Behemoth\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Spawn2")
    EEG2 AAA 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24))
	EEG2 C 8 A_Look
	EEG2 AAA 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24))
	EEG2 C 8 A_Look
	EEG2 AAA 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24))
	EEGI C 8 A_Look
	EEGI AAA 0 A_SpawnItemEx("EnragedHellionSmokeSpawner",random(-24,24),random(-24,24))
	EEGI C 8 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Fatso",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryRevenant : NewEnragedLegendaryRevenant Replaces NewEnragedLegendaryRevenant2
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Revenant\c-"
States
{
  Fake:
  	TNT1 A 0 A_JumpIf(user_fake >= 2,"See")	 
    TNT1 A 0 A_SetUserVar("user_fake",user_fake+1)
	TNT1 A 0 A_ChangeFlag("SHOOTABLE",0)
    TNT1 A 0 A_ChangeFlag("SOLID",0)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	EREV LM 7
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SetUserVar("user_music",0)
	EREV N 7 A_PlaySoundEx("ELEGRev/Ded","body",0,1)
    EREV O 7
	EREV P 0 A_SpawnItemEx("BossArmorBonusMax")
	EREV P 7 A_SpawnItemEx("BossLifeEssence")
    EREV Q 17
	TNT1 A 0 A_Jump(54,"FakeDone")
	EREV QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128))
	EREV QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128))
	TNT1 A 0 A_Jump(54,"FakeDone")
	EREV QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128))
	EREV QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128))
	EREV QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128))
	EREV Q 175
  FakeDone:
	EREV Q 0 A_PlaySound("misc/gibbed")
  	EREV Q 0 A_SpawnItemEx("EnragedRevenantRes",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	EREV Q 0 A_ChangeFlag("SHOOTABLE",1)
	TNT1 A 0 A_ChangeFlag("BRIGHT",1)
    EREV Q 5 A_ChangeFlag("SOLID",1)
	EREV P 0 A_PlaySound("ELEGRev/See","Body",1,0,ATTN_NONE)
    EREV PONML 3
    Goto See
  FakeMKII:
  	TNT1 A 0 A_JumpIf(user_fake >= 4,"SeeMKII")	 
    TNT1 A 0 A_SetUserVar("user_fake",user_fake+1)
	TNT1 A 0 A_ChangeFlag(SHOOTABLE,0)
    TNT1 A 0 A_ChangeFlag(SOLID,0)
	TNT1 A 0 A_ChangeFlag(BRIGHT,0)
	ER2V LM 7
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SetUserVar("user_music",0)
	ER2V N 7 A_PlaySoundEx("ELEGRev/Ded","body",0,1)
    ER2V O 7
	ER2V P 0 A_SpawnItemEx("BossArmorBonusMax")
	ER2V P 7 A_SpawnItemEx("BossLifeEssence")
    ER2V Q 17
	ER2V QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128),-9999)
	ER2V QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128))
	TNT1 A 0 A_Jump(32,"FakeMKIIDone")
	ER2V QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128),-9999)
	ER2V QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128))
	TNT1 A 0 A_Jump(32,"FakeMKIIDone")
	ER2V QQQQQQQQQQQQQ 2 A_SpawnItemEx("LRUndeadHand",random(-128,128),random(-128,128),-9999)
	ER2V QQQQQQQ 30 A_Jump(32,"FakeMKIIDone")
  FakeMKIIDone:
	ER2V Q 0 A_PlaySound("misc/gibbed")
  	ER2V Q 0 A_SpawnItemEx("EnragedRevenantRes",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	ER2V Q 0 A_ChangeFlag(SHOOTABLE,1)
	TNT1 A 0 A_ChangeFlag(BRIGHT,1)
    ER2V Q 5 A_ChangeFlag(SOLID,1)
	ER2V P 0 A_PlaySound("ELEGRev/See","Body",1,0,ATTN_NONE)
    ER2V PONML 3
    Goto See
	}
}

ACTOR INFEnragedLegendaryRevenant2 : INFEnragedLegendaryRevenant
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Revenant\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
    TNT1 A 0 A_JumpIf(user_upgrade == 2,"SpawnMKIII")
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"SpawnMKII")
  	TNT1 AAA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    EREV A 10 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Revenant",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryHellKnight : NewEnragedLegendaryHellKnight Replaces EnragedLegendaryHellKnight2
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Hell Knight\c-"
}

ACTOR INFEnragedLegendaryHellKnight2 : INFEnragedLegendaryHellKnight
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Hell Knight\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Spawn2")
    TNT1 AAA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    ENBL A 14 A_Look
	TNT1 AAA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ENBL Z 14 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("HellKnight",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryAfrit : EnragedLegendaryAfrit Replaces EnragedLegendaryAfrit
{
DropItem "Enraged Legendary Plasmatic Cannon" 64 1
DropItem "EnragedLegendaryUltraSphere" 38 1
DropItem "LegendaryRune" 145 1
DropItem "EnrLegGreaterDemonicEnergy" 256 
DropItem "EnrLegDemonicEnergy" 256 
DropItem "LegendaryBossLifeEssence" 256
DropItem "LegendaryBossArmorBonusMax" 256
DropItem "LegendaryBossLifeEssence" 128
DropItem "LegendaryBossArmorBonusMax" 128
DropItem "Enraged Legendary Plasmatic Rifle" 256 
Tag "\c[m6]Enraged\c- \c[z3]Legendary Afrit\c-"
States
{
  XDeath:
  Death:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Death2")
	TNT1 A 0 A_Playsound("LegAfrit/Death2",7,1,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItem("ELegAfritDeathFireSpawner",0,0,0,0)
    EGAF I 6 A_Scream
	TNT1 A 0 A_SpawnItem("ELegAfritDeathFireSpawner",0,0,0,0)
    EGAF J 6 A_NoBlocking
    EGAF KLMNOPQR 6 A_SpawnItem("ELegAfritDeathFireSpawner",0,0,0,0)
	TNT1 A 1 A_KillMaster
    Stop
  Death2:
	TNT1 A 0 A_Playsound("LegAfrit/Death2",7,1,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItem("ELegAfritDeathFireSpawner",0,0,0,0)
    EG2F I 6 A_Scream
	TNT1 A 0 A_SpawnItem("ELegAfritDeathFireSpawner",0,0,0,0)
    EG2F J 6 A_NoBlocking
    EG2F KLMNOPQR 6 A_SpawnItem("ELegAfritDeathFireSpawner",0,0,0,0)
	TNT1 A 1 A_KillMaster
    Stop
	}
}

ACTOR INFEnragedLegendaryAfrit2 : INFEnragedLegendaryAfrit
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Afrit\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_script == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("ELegAfritFire",0)
	TNT1 A 0 A_SetUserVar("user_script",1)
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Spawn2")
    TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    EGAF A 4 A_Look
    TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    EGAF B 4 A_Look
    TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    EGAF C 4 A_Look
    TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    EGAF D 4 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Baronofhell",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryArchon : EnragedLegendaryArchon Replaces EnragedLegendaryArchon
{
DamageFactor 0.4 //0.55
DropItem "EnragedLegendarySphere" 192 1
DropItem "EnragedLegendaryUltraSphere" 120 1
DropItem "LegendaryRune" 145 1
DropItem "Enraged Legendary Plasmatic Cannon" 64 1
DropItem "EnrLegGreaterDemonicEnergy" 256 
DropItem "EnrLegDemonicEnergy" 256 
DropItem "LegendaryBossLifeEssence" 256
DropItem "LegendaryBossArmorBonusMax" 256
DropItem "LegendaryBossLifeEssence" 128
DropItem "LegendaryBossArmorBonusMax" 128
DropItem "Enraged Legendary Plasmatic Rifle" 155 1
Tag "\c[m6]Enraged\c- \c[z3]Legendary Archon\c-"
States
{
  XDeath:
  Death:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Death2")
	TNT1 A 0
	EGRC Q 4 Bright
	EGRC Q 4 Bright A_Scream
	EGRC QQQQQQQQQQQQQQQQQQQQQQQQQQQQQ 2 Bright A_SpawnItemEx("EKaboomLN",random(-32,32),random(-40,40),random(16,48),random(-4,4),random(-4,4),random(0,4),0,SXF_TRANSFERPOINTERS)
	EGRC R 8 Bright
	EGRC S 7 Bright
	//TNT1 A 0 A_Jump(100,3)
	//TNT1 A 0 A_SpawnItem("MiniDeathBall")
	//TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_SpawnItem("EnragedDeathBallMedium")
	TNT1 AAA 0 A_SpawnItemEx("EnragedParticleSpawner",0,0,40,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
	EGRC U 5 Bright A_NoBlocking 
	EGRC VW 5 Bright
	TNT1 AAAA 0 A_CustomMissile("SmokeFX",Random(30,60),0,random(0,360),2,random(0,360))
	EGRC X 4 Bright A_CustomMissile("ELegArchonSoul",86,0,0,2,90)
	EGRC Z 4 Bright
	TNT1 A 1 A_KillMaster
	Stop
  Death2:
	TNT1 A 0
	EGR2 Q 4 Bright
	EGR2 Q 4 Bright A_Scream
	EGR2 QQQQQQQQQQQQQQQQQQQQQQQQQQQQQ 2 Bright A_SpawnItemEx("EKaboomLN",random(-32,32),random(-40,40),random(16,48),random(-4,4),random(-4,4),random(0,4),0,SXF_TRANSFERPOINTERS)
	EGR2 R 8 Bright
	EGR2 S 7 Bright
	TNT1 A 0 A_SpawnItemEx("EnragedCommandoStarShock",0,0,15)
	TNT1 A 0 A_SpawnItem("EnragedDTBFGEx",0,-10)
	TNT1 A 0 A_SpawnItem("EnragedDeathBallMedium")
	TNT1 AAA 0 A_SpawnItemEx("EnragedParticleSpawner",0,0,40,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
	EGR2 U 5 Bright A_NoBlocking 
	EGR2 VW 5 Bright
	TNT1 AAAA 0 A_CustomMissile("SmokeFX",Random(30,60),0,random(0,360),2,random(0,360))
	EGR2 X 4 Bright A_CustomMissile("ELegArchonSoul",86,0,0,2,90)
	EGR2 Z 4 Bright
	TNT1 A 1 A_KillMaster
	Stop
	}
}

ACTOR INFEnragedLegendaryArchon2 : INFEnragedLegendaryArchon
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Archon\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_upgrade >= 1,"Spawn2")
    TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    EGRC A 7 A_Look
    TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    EGRC A 7 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Baronofhell",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

//Enraged Legendary Belphegor 461

ACTOR INFEnragedLegendaryBelphegor2 : EnragedLegendaryBelphegor
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Belphegor\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
    TNT1 AAA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    ELHP A 10 Bright A_Look
	TNT1 AAA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Baronofhell",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendaryCybruiser : EnragedLegendaryCybruiser Replaces EnragedLegendaryCybruiser
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Cybruiser\c-"
DamageFactor 0.4 //0.55
 DropItem "ReforcedEnragedLegendaryArmor" 147 1
  DropItem "EnragedLegendarySphere" 100 1
  DropItem "EnragedLegendaryAmmoSphere" 130 1
  DropItem "LegendaryRune" 165 1
  DropItem "ILDemonAmmoBox" 256
  DropItem "ILDemonAmmo" 256
  DropItem "Enraged Legendary Plasmatic Cannon" 128 
  DropItem "Enraged Legendary Assault Shotgun" 128
  DropItem "EnragedLegendaryShell" 256 4
  DropItem "Demon Tech Railgun" 256
  DropItem "EnragedLegendaryShellBox" 128
States
{
  LegendaryAsg:
    TNT1 A 0 A_JumpIf(user_upgrade == 2,"LegendaryASGMKIII")
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"LegendaryASGMKII")
    ERUS E 5 A_FaceTarget
	ERUS E 4 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",44,24,Random(6,-6),0)
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,4,Random(3,12)*6,"EnragedBulletPuff")
	ERUS F 2 A_PlaySoundEx("EASG/Fire","Weapon")
    TNT1 A 0 A_Jump(45,"Pause")
    TNT1 A 0 A_SpidRefire
	Goto LegendaryAsg+2
  LegendaryAsgMKII:
    ERU2 EE 4 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", 0, 32, 36, Random(-2, -6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",44,24,Random(6,-6),0)
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",44,-24,Random(6,-6),0)
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,8,Random(3,12)*6,"EnragedBulletPuff")
	TNT1 AA 0 A_PlaySoundEx("EASG/Fire","Weapon")
	ERU2 F 2 A_Jump(45,"PauseMKII")
    TNT1 A 0 A_SpidRefire
	Loop
  LegendaryAsgMKIII:
    ERU3 EE 2 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", 0, 32, 36, Random(-2, -6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_CustomMissile("ECBShotgunRail",70,-20,Random(-4,4))
	TNT1 A 0 A_CustomMissile("ECBShotgunRail",70,20,Random(-4,4))
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",44,24,Random(6,-6))
	TNT1 AAAA 0 A_CustomMissile("LegendaryRedTracer",44,-24,Random(6,-6))
	TNT1 A 0 A_CustomBulletAttack(22.5,18.3,8,Random(3,12)*6,"EnragedBulletPuff")
	TNT1 AA 0 A_PlaySoundEx("EASG/Fire","Weapon")
	TNT1 A 0
	TNT1 A 0
	ERU3 F 2 A_Jump(45,"PauseMKIII")
    TNT1 A 0 A_SpidRefire
	Loop
  LegCannon1:
    TNT1 A 0 A_JumpIf(user_upgrade == 2,"LegCannon1MKIII")
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"LegCannon1MKII")
    ERUS E 0 A_FaceTarget
	ERUS E 20 A_PlaySound("ECannon/Charge")
  LegCannonLoop:
    ERUS Q 0 A_JumpIf(user_missile >= 11,"LegCannonEnd")
	TNT1 A 0 A_PlaySound("ECannon/Fire")
	ERUS F 2 A_CustomMissile("EnragedCYNCannonProj",44,24)
    ERUS EE 2 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  LegCannonEnd:
    TNT1 A 0 A_SetUserVar(user_missile,0)
	TNT1 A 0 A_Jump(87,"BFG10K","Railgun")
	Goto See
  LegCannon1MKII:
    ERUS E 0 A_FaceTarget
	ERU2 E 20 A_PlaySound("ECannon/Charge")
  LegCannonLoopMKII:
    ERUS Q 0 A_JumpIf(user_missile >= 11,"LegCannonEndMKII")
	TNT1 A 0 A_PlaySound("ECannon/Fire")
	TNT1 A 0 A_CustomMissile("EnragedCYNCannonProj",44,-24)
	ERU2 F 2 A_CustomMissile("EnragedCYNCannonProj",44,24)
    ERU2 EE 2 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  LegCannonEndMKII:
    TNT1 A 0 A_SetUserVar(user_missile,0)
	TNT1 A 0 A_Jump(90,"LegCannon2MKII")
	TNT1 A 0 A_Jump(87,"SeekersLoopMKII","BFG10KMKII","RailgunMKII")
	Goto SeeMKII
  LegCannon1MKIII:
    ERUS E 0 A_FaceTarget
	ERU3 E 20 A_PlaySound("ECannon/Charge")
  LegCannonLoopMKIII:
    ERUS Q 0 A_JumpIf(user_missile >= 18,"LegCannonEndMKIII")
	TNT1 A 0 A_Jump(56,"LegCannon2MKIII")
	TNT1 A 0 A_PlaySound("ECannon/Fire")
	TNT1 A 0 A_CustomMissile("EnragedCYNCannonProj",70,-20)
	ER3S A 2 A_CustomMissile("EnragedCYNCannonProj",70,20)
    ERU3 EE 1 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  LegCannon2MKIII:
    TNT1 A 0 A_PlaySound("lrball3/shot")
	TNT1 A 0 A_CustomMissile("ELegRevBall3",44,-24)
    ER3S B 2 A_CustomMissile("ELegRevBall3",44,24)
	ER3S B 6 A_FaceTarget
	ERU3 E 6 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+3)
	Goto LegCannonLoopMKIII
  LegCannonEndMKIII:
    TNT1 A 0 A_SetUserVar(user_missile,0)
	TNT1 A 0 A_Jump(87,"SeekersLoopMKIII","BFG10KMKIII","RailgunMKIII")
	Goto SeeMKIII
	}
}

ACTOR INFEnragedLegendaryCybruiser2 : INFEnragedLegendaryCybruiser
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Cybruiser\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle: 
    TNT1 A 0 A_JumpIf(user_upgrade == 2,"SpawnMKIII")
	TNT1 A 0 A_JumpIf(user_upgrade == 1,"SpawnMKII")
    TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    ERUS A 7 A_Look
	TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ERUS A 7 A_Look
	TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ERUS Z 7 A_Look
	TNT1 AA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
	ERUS Z 7 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Baronofhell",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFEnragedLegendarySummoner : EnragedLegendarySummoner Replaces EnragedLegendarySummoner
{
DropItem "EnragedLegendarySphere" 180 1
DropItem "EnragedLegendaryPowerShard" 80 1
DropItem "LegendarySalvationSphere" 250 1
DropItem "LegendaryRune" 190 1
DropItem "EnrLegGreaterDemonicEnergy" 250 
DropItem "EnrLegDemonicEnergy" 250 
DropItem "LegendaryPowerShard" 100 1
DropItem "LegendaryBossLifeEssence" 256 
DropItem "LegendaryBossArmorBonusMax" 256 
DropItem "LegendaryBossLifeEssence" 128
DropItem "LegendaryBossArmorBonusMax" 128
DropItem "Enraged Legendary Plasmatic Cannon" 140 1
DropItem "Enraged Legendary Plasmtaic Rifle" 140 1
Tag "\c[m6]Enraged\c- \c[z3]Legendary Summoner\c-"
}

ACTOR INFEnragedLegendarySummoner2 : INFEnragedLegendarySummoner
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Summoner\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(100,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
  	EVLL AAA 0 A_SpawnItem("EnragedHellionSmokeSpawner")
    EVLL AB 10 Bright A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Archvile",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

Actor INFHellfireBabySentientStandAlone : HellfireBabySentientStandAlone Replaces HellfireBabySentientStandAlone
{
Tag "\c[z4]Hellfire \c[v9]Baby Sentient\c-"
}

ACTOR INFManipulatorStandalone : NewManipulatorStandalone Replaces NewManipulatorStandalone
{
DropItem "BossLifeEssence" 256 25
DropItem "BossArmorBonusMax" 256 1
DropItem "GreaterDemonicEnergy" 128 200
DropItem "SkullOfPower" 128
DropItem "DemonicChalice" 128
DropItem "Ultrasphere" 200
DropItem "PhaseArmor" 200
DropItem "PhaseSphere" 100
DropItem "BFG10k " 128
DropItem "Demon Tech BFG10k" 128
DropItem "CommanderDTShotgunUpgrade" 128
DropItem "CommanderExpMinigunUpgrade" 128
DropItem "CommanderDevUpgrade" 128
DropItem "CommanderD-BFGUpgrade" 64
Tag "\c[s9]Manipulator\c-"
}

ACTOR INFManipulatorStandalone2 : INFManipulatorStandalone
{
Tag "\c[s9]Manipulator\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_JumpIf(user_script == 1,3)
    TNT1 A 0 ACS_NamedExecuteAlways("ManipulatorSmokeSpawner",0)
	TNT1 A 0 A_SetUserVar("user_script",1)
	MANP A 2 Bright A_Look
	MANP B 2 Bright A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Arachnotron",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFLordAsmodeus : LordAsmodeus Replaces LordAsmodeus
{
Tag "\c[g5]Lord Asmodeus\c-"
States
{
  Missile:
    TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag(NODAMAGE,0)
    TNT1 A 0 A_JumpIfInventory("DontSpampls",1,2)
    TNT1 A 0 A_JumpIfHealthLower(1500,"HellShield")
	TNT1 A 0 A_Jump(128,"Combo","FloorHugger","Stand","BladeOfAgony","SeekerBlades","2Zedek4Me","SeekerComets","CometCombo","Tracers")
	TNT1 A 0 A_Jump(55,"BladesGenerator")
	TNT1 A 0 A_Jump(40,"Gungnir")
	TNT1 A 0 A_Jump(15,"FINALFLASH")
	TNT1 A 0 A_Jump(10,"COMEHERE")
  Missile1:
    TNT1 A 0 A_JumpIf(user_berserk >= 1,"BerserkFireBall")
    TNT1 A 0 A_Jump(128,"Missile2")
    LRAS EF 8 A_FaceTarget
	TNT1 A 0 A_CustomMissile("LordAsmodeusBall", 32, 0, 6)
	TNT1 A 0 A_CustomMissile("LordAsmodeusBall", 32, 0, -6)
	TNT1 A 0 A_CustomMissile("LordAsmodeusBall", 32, 0, 4)
	TNT1 A 0 A_CustomMissile("LordAsmodeusBall", 32, 0, -4)
    LRAS G 7 Bright A_CustomMissile("LordAsmodeusBall", 32, 0, 0)
    TNT1 A 0 A_Jump(87,"Combo","SeekerComets","CometCombo")
    Goto See
  HellShield:
	//TNT1 A 0 ACS_NamedExecuteAlways("LordAsmodeusMemeMusic")
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,697,901)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,1)
    TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_GiveInventory("DontSpampls",1)
    LRAS J 20 A_FaceTarget
	LRAS I 10 A_FaceTarget
	TNT1 A 0 A_SpawnItem("AsmodeusFireSpawner",0,0,0,0)
	LR45 H 6 A_ChangeFlag(Reflective,1)
	TNT1 A 0 A_ChangeFlag(DontRip,1)
	TNT1 A 0 A_ChangeFlag(DontBlast,1)
	TNT1 A 0 A_ChangeFlag(CantSeek,1)
	TNT1 A 0 A_ChangeFlag(NoTelefrag,1)
	TNT1 A 0 ACS_NamedExecuteAlways("HellShield")
	TNT1 A 0 A_GiveInventory("Health",1500)
	TNT1 A 0 A_Blast(0, 100, 400, 24)
	TNT1 A 0 A_SpawnItemEx("HellShieldSignal", 0, 0, 80, 0, 0, 0, 0, SXF_SETMASTER | SXF_NOCHECKPOSITION)
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag(NODAMAGE,0)
    Goto ComeHere
	}
}

ACTOR INFLordAsmodeus2 : INFLordAsmodeus
{
Tag "\c[g5]Lord Asmodeus\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
    LRAS A 10 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Baronofhell",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFMakaiSlut : MakaiSlut Replaces MakaiSlut
{
Tag "\cgThe Goddess of Makai, \c[l3]Shinki\c-"
States
{
  Phase2:
	//TNT1 A 0 ACS_NamedExecuteAlways("ShinkiTurnsIntoPhase2",0)
	TNT1 A 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 A_GiveInventory("NemesisSoulEvent",1)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 A_GiveInventory("NemesisSoulEvent",1)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 A_GiveInventory("NemesisSoulEvent",1)
	TNT1 A 0 A_SpawnItemEx("NemesisLightning")
	MYS4 EEEEEEEEEEEE 2 Bright A_SpawnItemEx("VexedNemesisFlameSpawner")
	MYS4 F 10
	TNT1 A 0 A_SpawnItemEx("INFUndeadMakaiSlut",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0
	Stop
	}
}

ACTOR INFMakaiSlut2 : INFMakaiSlut
{
Tag "\cgThe Goddess of Makai, \c[l3]Shinki\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Disable2hu") == 1, "BegoneThot")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto BegoneThot
  SpawnLoop:
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
    MYST ABCDEFGHIJ 3 A_LookEX(LOF_FULLVOLSEESOUND,0,0,0,360,"Prepare")
	Loop
	}
}

ACTOR INFUndeadMakaiSlut : UndeadMakaiSlut
{
tag "\c[u2]The Resurrected One, \c[u9]Undead Shinki\c-"
}

ACTOR INFSchabbs : Schabbs Replaces Schabbs
{
Tag "Dr. Schabbs"
-LOOKALLAROUND
}

ACTOR INFOriginalSchabbs : OriginalSchabbs Replaces OriginalSchabbs
{
Tag "Dr. Schabbs"
-LOOKALLAROUND
States
{
  Spawn:
	SBBS A 10 A_Look
	Loop
  Idle:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_ChangeFlag(FRIGHTENED,0)
	TNT1 A 0 A_SetUserVar("user_music",0)
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	SBBS AA 6 A_Wander
	TNT1 A 0 A_Look
	SBBS BB 6 A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	SBBS CC 6 A_Wander
	TNT1 A 0 A_Look
	SBBS DD 6 A_Wander
	TNT1 A 0 A_Look
	Loop
  See:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,800)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_CheckFlag(FRIGHTENED,"See2Loop")
	TNT1 A 0 A_JumpIfTargetInLOS(2,90,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,500,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0
	SBBS AABB 3 A_Chase("","Missile")
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	SBBS CCDD 3 A_Chase("","Missile")
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	TNT1 A 0 A_JumpIfInTargetInventory("D-BFG",1,"See2")
	TNT1 A 0 A_JumpIfInTargetInventory("Nemesis",1,"See2")
	TNT1 A 0 A_JumpIfInTargetInventory("Unmaker",1,"See2")
	TNT1 A 0 A_JumpIfHealthLower((ACS_NamedExecuteWithResult("Hem_SpawnHealth")*0.30),"See2")
	Loop
  See2:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(FRIGHTENED,1)
  See2Loop:
	TNT1 A 0 A_JumpIfInTargetLOS(3,45,JLOSF_DEADNOJUMP,500)
	TNT1 A 0 A_JumpIfTargetInLOS(2,90,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,600,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0
	SBBS AABB 3 A_Chase("","Missile")
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	SBBS CCDD 3 A_Chase("","Missile")
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	TNT1 A 0 A_JumpIfInventory("Tic",100,"PainSummon2")
	TNT1 A 0 A_GiveInventory("Tic",1)
	Loop
  Missile:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	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,12,0,CMF_TRACKOWNER|CMF_CHECKTARGETDEAD)
	SBBS EEEEEEEEEE 1 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory("ProjHitCheck",1,3)
	TNT1 A 0 A_JumpIfInventory("ProjMissCheck",1,"See")
	TNT1 A 0 A_Jump(256,"Summon")
	TNT1 A 0 A_PlaySound("Original/Attack",CHAN_WEAPON)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
	SBBS E 4 A_FaceTarget
	TNT1 A 0 A_PlaySound("Original/Attack",CHAN_WEAPON)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
	SBBS E 4 A_FaceTarget
	TNT1 A 0 A_PlaySound("Original/Attack",CHAN_WEAPON)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
	SBBS E 4 A_FaceTarget
	TNT1 A 0 A_PlaySound("Original/Attack",CHAN_WEAPON)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
  PainMissile:
	SBBS E 4 A_FaceTarget
	TNT1 A 0 A_PlaySound("Original/Attack",CHAN_WEAPON)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
  Summon:
	SBBS E 4 A_FaceTarget
	//TNT1 A 0 A_JumpIfInventory("SchabbsSpawnAmmount",10,"See")
	TNT1 A 0 A_Jump(8,"Summon1","Summon1","Summon2")
	Goto See
  Pain:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_ChangeFlag(FRIENDLY,0)
	TNT1 A 0 A_JumpIfHealthLower((ACS_NamedExecuteWithResult("Hem_SpawnHealth")*0.25),"PainShield")
	TNT1 A 0 A_Jump(64,"NoPainShield")
  PainShield:
	TNT1 A 0 A_GiveInventory("SuperZombieShieldSphere",1)
  NoPainShield:
	SBBS P 6 A_Pain
	TNT1 A 0 A_TakeInventory("SchabbsSpawnAmmount",2)
	TNT1 A 0 A_CheckFlag(FRIGHTENED,"PainSummon2")
	TNT1 A 0 A_Jump(64,"PainMissile")
	TNT1 A 0 A_Jump(200,"Summon1","Summon1","Summon2","Summon7")
	Goto See
  Death:
	"####" "#" 0
	"####" "#" 53 A_Scream
	SBBS GH 6
	SBBS I 6 A_NoBlocking
	SBBS A 0 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_BossDeath
	SBBS J -1
	Stop
  XDeath:
	TNT1 A 0
	TNT1 A 0 A_XScream
	SBBS G 6 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	SBBS H 6
	SBBS I 6 A_NoBlocking
	TNT1 A 0 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_BossDeath
	SBBS J -1
	Stop
	}
}

ACTOR INFCustomSchabbs : CustomSchabbs Replaces CustomSchabbs
{
Tag "Dr. Schabbs"
-LOOKALLAROUND
States
{
  Spawn:
	SBBS A 10 A_Look
	Loop
  Idle:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_ChangeFlag(FRIGHTENED,0)
	TNT1 A 0 A_SetUserVar("user_music",0)
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	SBBS AA 6 A_Wander
	TNT1 A 0 A_Look
	SBBS BB 6 A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	SBBS CC 6 A_Wander
	TNT1 A 0 A_Look
	SBBS DD 6 A_Wander
	TNT1 A 0 A_Look
	Loop
  See:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,800)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_CheckFlag(FRIGHTENED,"See2Loop")
	TNT1 A 0 A_JumpIfTargetInLOS(2,90,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,500,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0
	SBBS AABB 3 A_Chase("","Missile")
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	SBBS CCDD 3 A_Chase("","Missile")
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	TNT1 A 0 A_JumpIfInTargetInventory("D-BFG",1,"See2")
	TNT1 A 0 A_JumpIfInTargetInventory("Nemesis",1,"See2")
	TNT1 A 0 A_JumpIfInTargetInventory("Unmaker",1,"See2")
	TNT1 A 0 A_JumpIfHealthLower((ACS_NamedExecuteWithResult("Hem_SpawnHealth")*0.30),"See2")
	Loop
  See2:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(FRIGHTENED,1)
  See2Loop:
	TNT1 A 0 A_JumpIfInTargetLOS(3,45,JLOSF_DEADNOJUMP,500)
	TNT1 A 0 A_JumpIfTargetInLOS(2,90,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,600,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0
	SBBS AABB 3 A_Chase("","Missile")
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	SBBS CCDD 3 A_Chase("","Missile")
	TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
	TNT1 A 0 A_JumpIfInventory("Tic",100,"PainSummon2")
	TNT1 A 0 A_GiveInventory("Tic",1)
	Loop
  Missile:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	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,12,0,CMF_TRACKOWNER|CMF_CHECKTARGETDEAD)
	SBBS EEEEEEEEEE 1 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory("ProjHitCheck",1,3)
	TNT1 A 0 A_JumpIfInventory("ProjMissCheck",1,"See")
	TNT1 A 0 A_Jump(256,"Summon")
	TNT1 A 0 A_PlaySound("CustomSchabbs/Throw",7)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
	SBBS E 4 A_FaceTarget
	TNT1 A 0 A_PlaySound("CustomSchabbs/Throw",7)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
	SBBS E 4 A_FaceTarget
	TNT1 A 0 A_PlaySound("CustomSchabbs/Throw",7)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
	SBBS E 4 A_FaceTarget
	TNT1 A 0 A_PlaySound("CustomSchabbs/Throw",7)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
  PainMissile:
	SBBS E 4 A_FaceTarget
	TNT1 A 0 A_PlaySound("CustomSchabbs/PainTaunt",7)
	SBBS F 6 A_CustomMissile("PoisonSyringe",32,12,random(-1,1),CMF_TRACKOWNER)
  Summon:
	SBBS E 4 A_FaceTarget
	//TNT1 A 0 A_JumpIfInventory("SchabbsSpawnAmmount",10,"See")
	TNT1 A 0 A_Jump(8,"Summon1","Summon1","Summon2")
	Goto See
  Pain:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_ChangeFlag(FRIENDLY,0)
	TNT1 A 0 A_JumpIfHealthLower((ACS_NamedExecuteWithResult("Hem_SpawnHealth")*0.25),"PainShield")
	TNT1 A 0 A_Jump(64,"NoPainShield")
  PainShield:
	TNT1 A 0 A_GiveInventory("SuperZombieShieldSphere",1)
  NoPainShield:
	SBBS P 6 A_Pain
	TNT1 A 0 A_TakeInventory("SchabbsSpawnAmmount",2)
	TNT1 A 0 A_CheckFlag(FRIGHTENED,"PainSummon2")
	TNT1 A 0 A_Jump(64,"PainMissile")
	TNT1 A 0 A_PlaySound("CustomSchabbs/PainTaunt",7)
	TNT1 A 0 A_Jump(200,"Summon1","Summon1","Summon2","Summon7")
	Goto See
  Death:
	"####" "#" 0
	"####" "#" 53 A_Scream
	SBBS GH 6
	SBBS I 6 A_NoBlocking
	SBBS A 0 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_BossDeath
	SBBS J -1
	Stop
  XDeath:
	TNT1 A 0
	TNT1 A 0 A_XScream
	TNT1 A 0 A_PlaySoundEx("CustomSchabbs/XDeath", "Voice", 0, 2)
	SBBS G 6 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	SBBS H 6
	SBBS I 6 A_NoBlocking
	TNT1 A 0 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_BossDeath
	SBBS J -1
	Stop
	}
}

//Goliath 470

//Gangsta Grosse 471

ACTOR INFHEMDeathKnight : NewHEMDeathKnight Replaces HEMDeathKnight
{
Tag "\cmDeath \cgKnight"
-LOOKALLAROUND
}

ACTOR INFHEMDeathKnight2 : INFHEMDeathKnight
{
Tag "\cmDeath \cgKnight"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
	DTKN A 1 A_SetUserVar("user_Acounter",430)
	TNT1 A 0 A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
  SpawnLoop:
	DTKN A 10 A_Look
	TNT1 A 0 A_JumpIf(user_currenthp > ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"),"Idle")
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("WolfensteinSS",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

//Enraged Legendary Krieger 473

ACTOR EnragedLegendaryKrieger2 : EnragedLegendaryKrieger
{
Tag "\c[z3]Der \c[m6]Enraged \c[z3]Legendare Krieger\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  SpawnLoop:
	ELMF A 3 Bright A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("WolfensteinSS",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR INFIncubusKaiser : IncubusKaiser Replaces IncubusKaiser
{
Tag "\c[b1]Incubus Kaiser\c-"
-LOOKALLAROUND
States
{
  Spawn:
	EHML A 3 Bright A_Look
	Loop
  Idle:
	TNT1 A 0 A_GiveInventory("ResetMonsterInvul",1)
	TNT1 A 0 A_ChangeFlag("FRIGHTENED",0)
	TNT1 A 0 A_ChangeFlag("NOFEAR",1)
	TNT1 A 0 A_ChangeFlag("FRIENDLY",0)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
  Idle2:
	EHML AAAA 3 Bright A_Wander
	TNT1 A 0 A_Look
	EHML BBBB 3 Bright A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	EHML CCCC 3 Bright A_Wander
	TNT1 A 0 A_Look
	EHML DDDD 3 Bright A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	Loop
  Taunt:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	TNT1 A 0 A_PlaySound("EnragedLegKrieger/KillTaunt",2,1.0,0,ATTN_NONE)
	TNT1 A 0 A_TakeInventory("MarineKilled",1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	Goto Idle2
  See:
	TNT1 A 0 A_GiveInventory("ResetMonsterInvul",1)
	TNT1 A 0 A_ChangeFlag("FRIGHTENED",0)
	TNT1 A 0 A_ChangeFlag("NOFEAR",1)
	TNT1 A 0 A_ChangeFlag("FRIENDLY",0)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,3012)
	TNT1 A 0 A_SetUserVar("user_music",1)
	EHML AAAA 3 Bright A_Chase
	EHML BBBB 3 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	EHML CCCC 3 Bright A_Chase
	EHML DDDD 3 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("DeathKnightStep",0,0,5,0,0,-20)
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	Loop
  Melee:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	EHML F 4 Bright A_FaceTarget
	EHML G 1 Bright A_PlaySound("weapons/hsgfire",CHAN_WEAPON,1.0,0)
	EHML G 4 Bright A_PlaySound("weapons/hsgfire",7,1.0,0)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("LegendaryRedTracer",Random(36,44),24,Random(6,-6),0)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("LegendaryRedTracer",Random(36,44),-24,Random(6,-6),0)
	TNT1 A 0 A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML I 1 Bright A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	TNT1 A 0 A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML I 4 Bright A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML F 4 Bright A_FaceTarget
	TNT1 AAAAAA 0 A_SpawnItemEx("RedShellCasing",10,24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 AAAAAA 0 A_SpawnItemEx("RedShellCasing",10,-24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	EHML F 4 Bright A_FaceTarget
	EHML G 1 Bright A_PlaySound("weapons/hsgfire",CHAN_WEAPON,1.0,0)
	EHML G 4 Bright A_PlaySound("weapons/hsgfire",7,1.0,0)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("LegendaryRedTracer",Random(36,44),24,Random(6,-6),0)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("LegendaryRedTracer",Random(36,44),-24,Random(6,-6),0)
	TNT1 A 0 A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML I 1 Bright A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	TNT1 A 0 A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML I 4 Bright A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML F 2 Bright A_FaceTarget
	TNT1 AAAAAA 0 A_SpawnItemEx("RedShellCasing",10,24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 AAAAAA 0 A_SpawnItemEx("RedShellCasing",10,-24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	EHML FFF 1 A_Facetarget
	TNT1 A 0 A_Jump(100,3)
	TNT1 A 0 A_PlaySound("EnragedLegKrieger/Attack",CHAN_VOICE,1.0,0)
	TNT1 A 0 A_SetUserVar("user_taunt",0)
	EHML E 7 A_FaceTarget
	Goto See
  Missile:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_Jump(256,"Missile1","Missile2")
	TNT1 A 0 A_PlaySound("DeathKnight/action",CHAN_VOICE,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SetUserVar("user_taunt",0)
	Goto See
  Missile1:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_PlaySound("EnragedLegKrieger/Missile1",CHAN_WEAPON)
	EHML FFFFF 7 Bright A_Facetarget
  Refire1:
	TNT1 A 0 A_PlaySound("ELegChaingun/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_CustomMissile("ELegKriegerRail",62,-18,random(8,-8),CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("ELegKriegerRail",62,18,random(8,-8),CMF_TRACKOWNER)
	TNT1 AA 0 A_CustomMissile("ELegKriegerExplosiveTracer",random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("RifleCasing",10,24,40,Random(2,6),0,Random(1,3),Random(80,90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	EHML H 2 Bright A_Facetarget
	TNT1 A 0 A_PlaySound("ELegChaingun/fire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_CustomMissile("ELegKriegerRail",59,26,random(14,-14),CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("ELegKriegerRail",59,-26,random(14,-14),CMF_TRACKOWNER)
	TNT1 AA 0 A_CustomMissile("ELegKriegerExplosiveTracer",random(36,44),0,Random(5,-5),0)
	TNT1 A 0 A_SpawnItemEx("RifleCasing",10,-24,40,Random(2,6),0,Random(1,3),Random(-80,-90),SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	EHML J 2 Bright A_Facetarget
	TNT1 A 0 A_MonsterRefire(230,"MissileEnd")
	Loop
  Missile2:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_PlaySound("EnragedLegKrieger/Missile2",CHAN_WEAPON)
	EHML FFFFF 7 Bright A_Facetarget
  Refire2:
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_CustomMissile("IncuKaiserMissile",62,-18,random(20,-20),CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("IncuKaiserMissile",62,18,random(20,-20),CMF_TRACKOWNER)
	TNT1 AA 0 A_CustomMissile("ELegKrieger10KProjectile",random(36,44),0,Random(15,-15),0)
	EHML H 2 Bright A_Facetarget
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_CustomMissile("IncuKaiserMissile",59,-26,random(20,-20),CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("IncuKaiserMissile",59,26,random(20,-20),CMF_TRACKOWNER)
	TNT1 AA 0 A_CustomMissile("ELegKrieger10KProjectile",random(36,44),0,Random(15,-15),0)
	EHML J 2 Bright A_Facetarget
	TNT1 A 0 A_MonsterRefire(230,"MissileEnd")
	Loop
  MissileEnd:
	EHML FFFFF 4 Bright A_Facetarget
	TNT1 A 0 A_SetUserVar("user_taunt",1)
	TNT1 A 0 A_Jump(128,"DoubleHexa2")
	Goto See
  DoubleHexa:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	EHML E 5 A_FaceTarget
	EHML E 1 A_PlaySound("weapons/hsgfire",CHAN_WEAPON,1.0,0)
	EHML E 4 A_PlaySound("weapons/hsgfire",7,1.0,0)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("LegendaryRedTracer",Random(36,44),24,Random(6,-6),0)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("LegendaryRedTracer",Random(36,44),-24,Random(6,-6),0)
	EHML G 1 Bright A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML I 4 Bright A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML E 10 A_FaceTarget
	TNT1 AAAAAA 0 A_SpawnItemEx("RedShellCasing",10,24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 AAAAAA 0 A_SpawnItemEx("RedShellCasing",10,-24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	EHML E 5
	EHML A 0 A_Jump(192,3)
	TNT1 A 0 A_PlaySound("EnragedLegKrieger/Attack",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)
	EHML E 5 A_FaceTarget
	EHML E 1 A_PlaySound("weapons/hsgfire",CHAN_WEAPON,1.0,0)
	EHML E 4 A_PlaySound("weapons/hsgfire",7,1.0,0)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("LegendaryRedTracer",Random(36,44),24,Random(6,-6),0)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("LegendaryRedTracer",Random(36,44),-24,Random(6,-6),0)
	EHML G 1 Bright A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML I 4 Bright A_CustomBulletAttack(15.4,10.6,78,Random(5,15)*6,"LegModdedBulletPuff")
	EHML E 10 A_FaceTarget	
	TNT1 AAAAAA 0 A_SpawnItemEx("RedShellCasing",10,24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 AAAAAA 0 A_SpawnItemEx("RedShellCasing",10,-24,40,Random(2,4),Random(-3,-6),Random(3,6),0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	EHML E 5
	Goto See
  Pain:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	TNT1 A 0 A_Pain
	EHML E 6 Bright
	TNT1 A 0 A_Jump(165,"PainAttack")
	TNT1 A 0 A_SetUserVar("user_taunt",1)
	Goto See
  PainAttack:
	TNT1 A 0
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("DeathKnight/jump",CHAN_BODY,1.0,0)
	EHML E 10 A_Recoil(-40)
	TNT1 A 0 A_SetUserVar("user_taunt",1)
	Goto DoubleHexa
  Death:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory("Tic",999999)
	EHML A 35 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	TNT1 A 0 A_PlaySound("DeathKnight/step",5,1.0,0)
	EHML E 105 A_Scream
	EHML E 4 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	EHML K 4 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	TNT1 A 0 A_PlaySound("DeathKnight/step",6,1.0,0)
	EHML L 4 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	EHML M 4 A_Fall
	TNT1 A 0 A_BossDeath
	TNT1 A 0 A_RemoveChildren
	TNT1 A 0 A_SpawnItemEx("PowerStimpack",0,0,8,random(0,8),random(0,8),2,random(0,360),0,32)
	TNT1 A 0 A_SpawnItemEx("AmmoSphere",0,0,8,random(0,8),random(0,8),2,random(0,360),0,32)
	TNT1 A 0 A_SpawnItemEx("RadarItem",0,0,8,random(0,8),random(0,8),2,random(0,360),0,32)
	TNT1 A 0 A_SpawnItemEx("Megapack",0,0,8,random(0,8),random(0,8),2,random(0,360),0,32)
	TNT1 A 0 A_SpawnItemEx("NemesisArmorSphere",0,0,8,random(0,8),random(0,8),2,random(0,360),0,32)
	EHML N -1
	Stop
	}
}

ACTOR INFIncubusKaiser2 : INFIncubusKaiser
{
Tag "\c[b1]Incubus Kaiser\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  SpawnLoop:
	EHML A 3 Bright A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("WolfensteinSS",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}