ACTOR Chameleon : LegendaryZombie
{
//Creator: Dr. Sticky
//Origin: NoJoke
//Sprite: LPOS/TLZO/IPOS/NSZO
//Title: "Chameleon"
Health 2999
DropItem "RandomArmorSpawner" 85 1
DropItem "LegAmmoSphere" 88 1
DropItem "RandomPowerShardSpawner" 35 1
DropItem "HandGrenadeAmmo" 235 2
DropItem "MineAmmo" 235 2
DropItem "Backpack" 198 1
DropItem "Armorplate" 205 1
DropItem "Portablemedkit" 210 1
DropItem "LDemonAmmoBox" 200 
DropItem "LDemonAmmo" 250 
DropItem "RandomRuneSpawner" 30 1
DropItem "RandomPlasmaticRifleSpawner" 155 1
DropItem "HellsExpensiveContract", 128
DropItem "ExoticWeaponEnhancerModuleGiver", 100
DamageFactor "LegendaryZombie", 0.0
DamageFactor "PDTBFG", 0.25
DamageFactor "PDTBFGTracer", 0.25
DamageFactor "PlayerDevBall", 0.125
DamageFactor "PlayerDevBall2", 0.125
DamageFactor "PlayerDTBFGRailgunSlug", 0.125
DamageFactor "PlayerDevTracer", 0.125
DamageFactor 0.75
DamageFactor "Legendary", 0.0
DamageFactor "LegendaryPlayer", 0.3
DamageFactor "LegendaryGuru", 0.0
DamageFactor "LegendaryGuruPlayer", 0.3
DamageFactor "DBFG10K2", 0.65
DamageFactor "PlayerDBFG10K2", 0.65
DamageFactor "DBFG2", 0.65
DamageFactor "PlayerDBFG2", 0.65
DamageFactor "PlayerDTRG", 0.5
Obituary "%o was left confused of what he was killed by."
Tag "\c[z3]C\c- \c[b5]H\c- \c[g3]A\c- \c[s4]M\c- \c[h1]E\c- \c[t5]L\c- \c[z3]E\c- \c[h9]O\c- \c[t5]N\c-"
var int user_missile;
States
{
Spawn:
    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
See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
    TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,2135)
	TNT1 A 0 A_SetUserVar("user_music",1)
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    LPOS A 0 A_JumpIfTargetInLOS("Strafing")
    LPOS AA 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LPOS BB 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	LPOS A 0 A_JumpIfTargetInLOS("Strafing")
	LPOS CC 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LPOS DD 3 Bright A_Chase
	LPOS A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    Loop
Rush:
    LPOS A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LegZombieGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	LPOS A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegZombieGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	LPOS A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegendaryZombieGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	LPOS B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegendaryZombieGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	LPOS B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LegZombieGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	LPOS C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegZombieGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	LPOS C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegendaryZombieGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	LPOS D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegendaryZombieGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	LPOS D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	Loop
Strafing:
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	LPOS AA 3 Bright A_GiveInventory("LegZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	LPOS BB 3 Bright A_GiveInventory("LegZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    LPOS CC 3 Bright A_GiveInventory("LegZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	LPOS DD 3 Bright A_GiveInventory("LegZombieStrafing",1)
	Goto See
Pause:
	LPOS E 0 A_PlaySound("weapons/demontechsteam")
	LPOS EEEEE 3 Bright A_GiveInventory("LegZombieStrafing",1)
	Goto See	
Missile:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	LPOS EEE 3 Bright A_GiveInventory("LegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("LegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("LegendaryProjectile",32,0,random(-2,2),0)
	LPOS F 3 Bright A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_Jump(50,"Blue","Red","Black","White")
	TNT1 A 0 A_SpidRefire
    TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	Goto Missile+5
  Pause:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	IPOS E 0 A_PlaySound("weapons/demontechsteam")
	IPOS EEEEE 3 A_GiveInventory("LegZombieStrafingg",1)
	Goto See	
  Blue:
    TLZO EEE 2 Bright A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("SuperLegPlasma",32,0,random(-6,6),0)
	TLZO F 2 Bright A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
    TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	TLZO EEE 2 Bright A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("SuperLegPlasma",32,0,random(-6,6),0)
	TLZO F 2 Bright A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
    TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	TLZO EEE 2 Bright A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("SuperLegPlasma",32,0,random(-6,6),0)
	TLZO F 2 Bright A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
    TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	TLZO EEE 2 Bright A_GiveInventory("TLegZombieStrafing",1)
	Goto See
  Red:
    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("weapons/DemonTechRifle","Weapon")
	TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	Loop
  Black:
    NSZO E 4 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("NemesisRifleShotEnemy",32,0,random(-2,2),0)
	NSZO F 4 Bright A_PlaySoundEx("NemesisRifle/Fire","Weapon")
	TNT1 A 0 A_Jump(10,"Blue")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
	Goto See
  White:
    VNZO E 2 Bright A_GiveInventory("VexedNemesisLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("VexedNemesisLegZombieStrafing",1)
	TNT1 AA 0 A_CustomMissile("NemesisRifleShotEnemy",32,0,random(-4,4),0)
	VNZO F 2 Bright A_PlaySoundEx("NemesisRifle/Fire","Weapon")
	TNT1 A 0 A_Jump(10,"Red")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
	Loop
Pain:
    TNT1 A 0 A_Jump(10,"Protection")
	TNT1 A 0 A_Jump(192,"PainMissile")
    LPOS G 3 Bright A_GiveInventory("LegZombieStrafing",1)
    LPOS G 0 A_Pain
	LPOS G 3 Bright A_GiveInventory("LegZombieStrafing",1)
    Goto See
PainMissile: 
    LPOS G 3 Bright A_GiveInventory("LegZombieStrafing",1)
    LPOS G 0 A_Pain
	LPOS G 3 Bright A_GiveInventory("LegZombieStrafing",1)
    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
	LPOS E 2 Bright ACS_NamedExecuteAlways("LegendaryProtection",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	Goto See	
Death:
    TNT1 A 0 A_Jump(36,"LegendarySoul")
    TNT1 A 0 A_StopSound(6)
	LPOS H 5 A_Scream
    LPOS I 5 A_Fall
    LPOS J 5 A_SpawnItem("BodyCrash",0,0,0,0)
    LPOS K 5 
    LPOS L -1 
	Stop
LegendarySoul:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	LPOS H 5 A_Scream
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    LPOS I 5 A_Fall
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    LPOS J 5 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    LPOS K 5 
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
    LPOS L 140
	LPOS L 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	LPOS LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("LegSoulEvent",1)
	LPOS LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("LegSoulEvent",1)
	LPOS LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("LegSoulEvent",1)
	TNT1 A 0 A_SpawnItemEx("LegendarySoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	LPOS L -1
	Stop
XDeath:
    TNT1 A 0 A_StopSound(6)
	LPOS O 3 A_SpawnItemEx("BlueGibbedGenerator",0,0,0,0,0,0,0,128,0)
    LPOS P 3 A_XScream
    LPOS R 3 A_Fall
    LPOS STUV 3 
    LPOS W -1 
    Stop
    }
}

ACTOR RandomArmorSpawner : RandomSpawner
{
DropItem "LegendaryArmor", 256, 80
DropItem "EnragedLegendaryArmor", 256, 70
DropItem "VengefulNemesisArmor", 256, 55
DropItem "TrueLegendaryArmor", 256, 20
DropItem "NemesisArmor", 256, 10
}

ACTOR RandomPowerShardSpawner : RandomSpawner
{
DropItem "LegendaryPowerShard", 256, 80
DropItem "EnragedLegendaryPowerShard", 256, 50
DropItem "NemesisPowerShard", 256, 30
}

ACTOR RandomRuneSpawner : RandomSpawner
{
DropItem "LegendaryRune2", 256, 55
DropItem "VitalityRune", 256, 55
DropItem "AgilityRune", 256, 55
DropItem "LegendaryRandomSphere", 256, 20
DropItem "NexusNemesisRune", 256, 10
}

ACTOR RandomPlasmaticRifleSpawner : RandomSpawner
{
DropItem "Legendary Plasmatic Rifle", 256, 80
DropItem "Enraged Legendary Plasmtaic Rifle", 256, 50
DropItem "Nemesis Rifle", 256, 30
}