ACTOR TrueLegendaryPyroZombie : LegendaryPyroZombie
{
//Creator: Titanium
//Origin: Nexus Infinity
//Sprite: TPYZ
//Title: "True Legendary Pyro Zombie"
  Obituary "%o became rotten as hell by a \c[l5]True\c- \c[z3]Legendary Pyro Zombie\c-."
  Health 2250
  Radius 20
  Height 56
  Mass 100
  Speed 12
  FastSpeed 14
  PainChance 20
  PainChance "Melee", 128
  BloodColor "Blue"
  MONSTER
  DropItem "LegendaryBossLifeEssence" 256
  DropItem "LegendaryBossArmorBonusMax" 256
  DropItem "Legendary Assault Shotgun" 120
  DropItem "TrueLegUpgradeSpawnerWeak" 80 1
  DropItem "LegendaryShell" 128 4
  DropItem "LegendaryShellBox" 80
  DropItem "HandGrenadeAmmo" 235 2
  DropItem "MineAmmo" 235 2
  DropItem "Armorplate" 205 1
  DropItem "Portablemedkit" 210 1
  DropItem "Backpack" 198 1
  DropItem "Gas" 250
  DropItem "BigGas" 200
  DropItem "LegAmmoSphere" 128 1
  DropItem "LegendaryArmor" 105 1
  DropItem "Welder" 250 1
  DropItem "LegendaryRune" 70 1
  DropItem "LegendaryPowerShard" 70 1 
  DropItem "TrueLegendaryRune" 10 1
//Nexus Drops
  DropItem "TrueLegTimeFreezeSphere" 100 1
  DropItem "TrueLegAmmoSphere" 128 1
  DropItem "TrueLegendaryArmor" 120 1
  DropItem "LegendaryFusionCell" 55 1
  DamageFactor 0.5
  DamageFactor "LegMind", 0.0
  DamageFactor "VileFires", 0.0
  DamageFactor "Baby15K", 0.0
  DamageFactor "SoulToxic", 0.0
  DamageFactor "BombBreath", 0.0
  DamageFactor "CacoComet", 0.0
  DamageFactor "CadaverRocket", 0.0
  DamageFactor "BeheComet", 0.0
  DamageFactor "NobleComet", 0.0
  DamageFactor "DemolisherEx", 0.0
  DamageFactor "DarkDemoEx", 0.0
  DamageFactor "Hell", 0.0
  DamageFactor "UltimateLegendary", 0.0
  DamageFactor "PlayerPyro", 0.4
  DamageFactor "HellComet", 0.4
  DamageFactor "PlayerNemesisPlasma", 0.4
  DamageFactor "TrueLegendaryDamage", 0.0
  DamageFactor "TrueLegendaryPlayer", 0.0
  Species "UltimateLegendary"
  SeeSound "lgeneral/sight"
  PainSound "lgeneral/pain"
  DeathSound "lgeneral/death"
  ActiveSound "lgeneral/active"
  Tag "\c[l5]True\c- \c[z3]Legendary Pyro Zombie\c-"
  var int user_music;
  var int user_protection;
  var int user_protected;
  states
  {
  Spawn:
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    TPYZ A 10 A_Look
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TPYZ "X" 10 A_Look
    Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,2080)
	TNT1 A 0 A_SetUserVar("user_music",1)
    TPYZ A 0 A_JumpIfTargetInLOS("Strafing")
    TPYZ AABB 3 A_Chase
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TPYZ A 0 A_Jump(30,"Rush","Arson")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TPYZ A 0 A_JumpIfTargetInLOS("Strafing")
	TPYZ CCDD 3 A_Chase
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TPYZ A 0 A_Jump(80,"Rush","Arson")
    TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    Loop
Rush:
    TPYZ A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("TrueLegPyroGhost",0,0,0,0,0,0,0,128)
	TPYZ A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegPyroGhost",0,0,0,0,0,0,0,128)
	TPYZ A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegPyroGhostB",0,0,0,0,0,0,0,128)
	TPYZ B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegPyroGhostB",0,0,0,0,0,0,0,128)
	TPYZ B 1 A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("TrueLegPyroGhostC",0,0,0,0,0,0,0,128)
	TPYZ C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegPyroGhostC",0,0,0,0,0,0,0,128)
	TPYZ C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegPyroGhostD",0,0,0,0,0,0,0,128)
	TPYZ D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegPyroGhostD",0,0,0,0,0,0,0,128)
	TPYZ D 1 A_Chase
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TPYZ AA 3 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TPYZ BB 3 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    TPYZ CC 3 A_GiveInventory("TLegZombieStrafing2",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TPYZ DD 3 A_GiveInventory("TLegZombieStrafing2",1)
	Goto See
  Pause:
	TPYZ EEEEE 3 A_GiveInventory("TLegZombieStrafing2",1)
	Goto See	
  Arson:
    TPYZ EEE 3
    TPYZ C 0 A_JumpIfTargetInLos("Missile")
    LASG C 0 A_JumpIfCloser(300,"Missile")
	TNT1 AAAAA 0 A_CustomMissile("LegendaryFlamethrowerShot",36,0,random(-6,6),CMF_TRACKOWNER)
	TNT1 AAA 0 A_CustomMissile("TrueLegendaryFlamethrowerShot",36,0,random(-6,6),CMF_TRACKOWNER)
    TPYZ F 15
	//TPYZ F 12 A_SetAngle(random(0,360))
    //TPYZ E 3 A_Jump(64,"See")
    //Goto Arson+1
	Goto See
  Missile:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_JumpIfCloser(500,"MissileClose")
	TNT1 A 0 A_Jump(72,"Napalm")
	Goto Normal
  MissileClose:
    TNT1 A 0 A_Jump(88,"Normal","Normal","Napalm")
  Close:
	TNT1 A 0 A_CheckRange(500,"Normal")
	TPYZ EEEE 3 A_GiveInventory("TLegZombieStrafing2",1)
	TPYZ FF 1 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("Weapons/PyroSGShot")
	TNT1 AAAAA 0 A_CustomMissile("LegendaryFlamethrowerShot",36,0,random(-6,6),CMF_TRACKOWNER)
	TNT1 AAA 0 A_CustomMissile("TrueLegendaryFlamethrowerShot",36,0,random(-6,6),CMF_TRACKOWNER)
	TPYZ EEEE 3 A_GiveInventory("TLegZombieStrafing2",1)
	TPYZ FF 1 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("Weapons/PyroSGShot")
	TNT1 AAAAA 0 A_CustomMissile("LegendaryFlamethrowerShot",36,0,random(-6,6),CMF_TRACKOWNER)
	TNT1 AAA 0 A_CustomMissile("TrueLegendaryFlamethrowerShot",36,0,random(-6,6),CMF_TRACKOWNER)
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
	Loop
  Normal:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TPYZ EEE 3 A_GiveInventory("TLegZombieStrafing2",1)
	TPYZ E 3 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_CustomMissile("LegendaryFlameBall",32,0,random(-1,1),0)
	TNT1 AA 0 A_CustomMissile("LegendaryFlameBall",32,0,random(-3,3),0)
	TNT1 AA 0 A_CustomMissile("LegendaryFlameBall",32,0,random(-10,10),0)
	TPYZ F 3 A_PlaySoundEx("Weapons/PyroSGShot","Weapon")
	TNT1 A 0 A_Jump(10,"Pause")
	TNT1 A 0 A_JumpIfCloser(500,"Close")
	TNT1 A 0 A_SpidRefire
	Goto Normal+6
  Napalm:
	TPYZ EEEE 3 A_GiveInventory("TLegZombieStrafing2",1)
	TPYZ FF 1 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_CustomMissile("TureLegendaryNapalmBall",32,0,0)
	TPYZ EEEE 3 A_GiveInventory("TLegZombieStrafing2",1)
	TPYZ FF 1 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_CustomMissile("TureLegendaryNapalmBall",32,0,0)
	TPYZ EEEE 3 A_GiveInventory("TLegZombieStrafing2",1)
	TPYZ FF 1 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_CustomMissile("TureLegendaryNapalmBall",32,0,0)
	TPYZ EEEE 3 A_GiveInventory("TLegZombieStrafing2",1)
	TPYZ FF 1 A_GiveInventory("TLegZombieStrafing2",1)
	TNT1 A 0 A_CustomMissile("TureLegendaryNapalmBall",32,0,0)
	//TNT1 A 0 A_Jump(24,"Pause")
	//TNT1 A 0 A_SpidRefire
	Goto See
  Pain:
	TNT1 A 0 A_Jump(30,"Protection")
	TNT1 A 0 A_Jump(192,"PainMissile")
	TPYZ G 3
	TPYZ G 3 A_Pain
	Goto See
  PainMissile:
	TPYZ G 3
	TPYZ G 3 A_Pain
	TNT1 A 0 A_Jump(64,"Arson")
	Goto Missile	
  Protection:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	TPYZ E 2 ACS_NamedExecuteAlways("LegendaryProtection",0,0,0,0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	Goto See	
  Death:
	TNT1 A 0 A_Jump(36,"TrueLegendarySoul")
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
    TPYZ H 5 A_Scream
	TPYZ I 5
    TPYZ J 5 A_NoBlocking
    TPYZ KL 5
	TPYZ M 5
	TPYZ N 0 A_SpawnItem("BodyCrash",0,0,0,0)
    TPYZ N -1
    Stop
  TrueLegendarySoul:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    TPYZ H 5 A_Scream
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TPYZ I 5
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    TPYZ J 5 A_NoBlocking
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    TPYZ K 5
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TPYZ L 5
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TPYZ M 5
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TPYZ N 0 A_SpawnItem("BodyCrash",0,0,0,0)
    TPYZ N 140
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	TPYZ NNNNNNNNNNNNNNNNN 2 Bright A_GiveInventory("LegSoulEvent",1)
	TPYZ NNNNNNNNNNNNNNNNN 2 Bright A_GiveInventory("LegSoulEvent",1)
	TPYZ NNNNNNNNNNNNNNNNN 2 Bright A_GiveInventory("LegSoulEvent",1)
	TNT1 A 0 A_SpawnItemEx("INFTrueLegendarySoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	TPYZ N -1
    Stop
  XDeath:
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
    TNT1 A 0 A_StopSound(6)
	TPYZ O 3 A_SpawnItemEx("BlueGibbedGenerator",0,0,0,0,0,0,0,128,0)
    TPYZ P 3 A_XScream
	TPYZ Q 5 A_NoBlocking
    TPYZ R 5
    TPYZ S 5 
    TPYZ T -1 
    Stop
  }
}

ACTOR TrueLegPyroGhost
{
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")
    TPYZ A 2 A_FadeOut(0.10)
    Wait
	}
}

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

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

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