ACTOR EnragedLegendaryDevastatorZombie : LegendaryZombie 
{ //unused for now
//Creator: Eshkere_Jason
//Origin: Nexus Infinity
//Sprite: ELDZ
//Title: "Enraged Legendary Devastator Zombie"  
health 2500
speed 14
painchance 22
BloodColor "Red"
DropItem "HandGrenadeAmmo" 235 2
DropItem "MineAmmo" 235 2
DropItem "Backpack" 198 1
DropItem "LDemonAmmo" 250
DropItem "LDemonAmmoBox" 200
DropItem "LegAmmoSphere" 108 1
DropItem "LegendaryArmor" 105 1
DropItem "Legendary Demon Tech Devastator", 70 1
DropItem "LegendaryRune" 45 1
DropItem "LegendaryPowerShard" 50 1 
DropItem "LegendaryBeaconLow", 256, 1
DropItem "LegendaryBeaconMid", 128, 1
DamageFactor 0.5
DamageFactor "PDTBFG", 0.15
DamageFactor "PDTBFGTracer", 0.25
DamageFactor "PlayerDevBall", 0.110
DamageFactor "PlayerDevBall2", 0.110
DamageFactor "PlayerDTBFGRailgunSlug", 0.110
DamageFactor "PlayerDevTracer", 0.110
DamageFactor "Legendary", 0.0
DamageFactor "LegendaryPlayer", 0.2
DamageFactor "LegendaryGuru", 0.0
DamageFactor "LegendaryGuruPlayer", 0.2
DamageFactor "LACGrenade", 0.0
DamageFactor "LegendaryZombie", 0.0
DamageFactor "GeneralTracer", 0.0
DamageFactor "DBFG10K2", 0.50
DamageFactor "PlayerDBFG10K2", 0.50
DamageFactor "DBFG2", 0.5
DamageFactor "PlayerDBFG2", 0.50
DamageFactor "PlayerDTRG", 0.4
DamageFactor "Cyber10K", 0.0
obituary "%o was pulverized by a zombie's Legendary Demon Tech Devastator."
Tag "\c[m6]Enraged\c- \c[z3]Legendary Devastator Zombie\c-"
SeeSound "lcmdo/sight"
AttackSound "Null"
PainSound "lcmdo/pain"
DeathSound "lcmdo/death"
ActiveSound "lcmdo/active"
AttackSound "Null"
var int user_music;
states
{
  Spawn:
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    ELDZ A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELDZ "Z" 10 Bright A_Look
 	TNT1 A 0 A_PlaySound("devastator/idle",6,1.0,1)
	Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,6770)
	TNT1 A 0 A_SetUserVar("user_music",1)
    ELDZ A 0 A_JumpIfTargetInLOS("Strafing")
    ELDZ AABB 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELDZ A 0 A_JumpIfTargetInLOS("Strafing")
	ELDZ CCDD 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	ELDZ A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    Loop
  Rush:
    ELDZ A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("EnragedLegDevastatorGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELDZ A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegDevastatorGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELDZ A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegDevastatorGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELDZ B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegDevastatorGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELDZ B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("EnragedLegDevastatorGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELDZ C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegDevastatorGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELDZ C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegDevastatorGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELDZ D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("EnragedLegDevastatorGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	ELDZ D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ELDZ AA 3 Bright A_GiveInventory("LegZombieStrafing2",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ELDZ BB 3 Bright A_GiveInventory("LegZombieStrafing2",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    ELDZ CC 3 Bright A_GiveInventory("LegZombieStrafing2",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ELDZ DD 3 Bright A_GiveInventory("LegZombieStrafing2",1)
	Goto See
  Pause:
	ELDZ EEEEE 3 Bright A_GiveInventory("LegZombieStrafing2",1)
	Goto See	
  Missile:
    ELDZ E 0 A_FaceTarget
	TNT1 A 0 A_StopSound(6)
    ELDZ E 0 A_PlaySound ("devastator/charge")
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
    ELDZ EEEEEEEEEEEEEEEEEEE 2 Bright A_FaceTarget
	ELDZ F 8 Bright
    ELDZ F 0 A_PlaySound ("devastator/fire")
    ELDZ F 10 Bright A_Custommissile("EnragedBabySentientDTBFG10KBall")
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
    ELDZ E 50
    goto See
  Pain:
    ELDZ G 3
    ELDZ G 3 A_Pain
    goto See
  Death:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("TrueLegMode") == 0,3)
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem",1,"TrueLeg")
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem2",1,"TrueLeg")
  Death2:
    TNT1 A 0 A_Jump(36,"LegendarySoul")
    TNT1 A 0 A_StopSound(6)
	ELDZ H 5 A_Scream
    ELDZ I 5 A_Fall
    ELDZ J 5 A_SpawnItem("BodyCrash",0,0,0,0)
    ELDZ KLM 5
    ELDZ N -1 
    stop
  LegendarySoul:
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	ELDZ H 5 A_Scream
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	ELDZ I 5 A_Fall
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	ELDZ J 5 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	ELDZ K 5 
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	ELDZ L 5
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	LCOS M 5
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	ELDZ N 140
	ELDZ N 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	ELDZ NNNNNNNNNNNNNNNNN 2 Bright A_GiveInventory("ELegSoulEventSmokeSpawner",1)
	ELDZ NNNNNNNNNNNNNNNNN 2 Bright A_GiveInventory("ELegSoulEventSmokeSpawner",1)
	ELDZ NNNNNNNNNNNNNNNNN 2 Bright A_GiveInventory("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)
	ELDZ N -1
	Stop
  XDeath:
	TNT1 A 0 A_Jump(36,"LegendarySoul")
    TNT1 A 0 A_StopSound(6)
	ELDZ H 5 A_Scream
    ELDZ I 5 A_Fall
    ELDZ J 5 A_SpawnItem("BodyCrash",0,0,0,0)
    ELDZ KLM 5
    ELDZ N -1 
  }
}

Actor INFEnragedLegendaryDevastatorZombie : EnragedLegendaryDevastatorZombie
{
Tag "\c[m6]Enraged\c- \c[z3]Legendary Devastator Zombie\c-"
States
{
  Spawn:
    TNT1 A 0 A_Jump(110,"Remove")
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier1SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("EnragedHellionSmokeSpawner",0,0,0,0)
    ELDZ A 10 Bright A_Look
 	TNT1 A 0 A_PlaySound("devastator/idle",6,1.0,1)
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Chaingunguy",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

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

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

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

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