ACTOR CorruptedZombie : LegendaryZombie
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: C0RZ
//Title: "Corrupted Zombie" 
Health 2300
Radius 20
Height 56
Speed 35
Mass 100
PainChance 25
PainChance "ZombieDemonTech", 0
BloodColor "Red"
DropItem "HandGrenadeAmmo" 256 2
DropItem "MineAmmo" 256 2
DropItem "Backpack" 256 1
DropItem "Armorplate" 256 1
DropItem "Portablemedkit" 256 1
Dropitem "D-BFG", 100, 1
Dropitem "MarineSquadBeacon", 80, 1
Dropitem "MarineDBFGBeacon", 55, 1
Dropitem "DCellPack", 256, 32
Dropitem "DCellPack", 128, 30
Dropitem "DCell", 256, 10
Dropitem "DCell", 256, 10
Dropitem "DCell", 256, 10
DamageFactor 0.5
DamageFactor "Explosion", 0.2
DamageFactor "PlayerDTRG", 0.4
DamageFactor "DTRailgun", 0.4
DamageFactor "Player",0.1
DamageFactor "LegendaryPlayer",0.5
DamageFactor "Legendary",0.1
DamageFactor "CChainTracer",0.0
DamageFactor "DBFG2",0.0
DamageFactor "SuperWeapon", 0.75
DamageFactor "LegendaryPlayer", 0.75
DamageFactor "LegendaryGuru", 0.75
DamageFactor "LegendaryGuruPlayer", 0.75
DamageFactor "PlayerDevBall", 0.65
DamageFactor "PlayerDevTracer", 0.15
DamageFactor "PowerDoubleDamage", 0.35
DamageFactor "BFG10K", 0.65
DamageFactor "BFG9500Ball", 0.1
DamageFactor "CustomSpray", 0.1
DamageFactor "BFGSplash", 0.1
DamageFactor "BFGSpray", 0.1
DamageFactor "Explosion", 0.1
DamageFactor "PDTBFG", 0.1
DamageFactor "PDTBFGTracer", 0.1
DamageFactor "PlayerDTBFGRailgunSlug", 0.1
DamageFactor "PDTPuff", 0.1
MONSTER
SeeSound "NemesisZombie/sight"
PainSound "NemesisZombie/pain"
DeathSound "NemesisZombie/death"
ActiveSound "NemesisZombie/active"
Obituary "%o was vaporized by an \c[l5]Corrupted Zombie\c- overheated plasma."
Tag "\c[l5]Corrupted Zombie\c-"
+NOTIMEFREEZE
+NOFEAR
+BOSS
+BOSSDEATH
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+NOICEDEATH
+NODROPOFF
+DONTGIB
+NOTARGET
+BRIGHT
var int user_music;
var int user_protection;
var int user_protected;
var int user_missile;
States
{
  Spawn:
    TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
    C0RZ A 10 A_Look
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	C0R2 A 10 A_Look
    Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
    TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,6790,30)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
    C0RZ A 0 A_JumpIfTargetInLOS("Strafing")
    C0RZ AA 3 A_Chase
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	C0RZ BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_SpawnItem("FootStep")
	C0RZ A 0 A_JumpIfTargetInLOS("Strafing")
	C0RZ CC 3 A_Chase
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	C0RZ DD 3 A_Chase
	C0RZ A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_SpawnItem("FootStep")
    Loop
  Rush:
    C0RZ A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_SpawnItemEx("CorruptedZombieGhostAA")
	C0RZ A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("CorruptedZombieGhostAA")
	C0RZ A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("CorruptedZombieGhostBB")
	C0RZ B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("CorruptedZombieGhostBB")
	C0RZ B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
    TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_SpawnItemEx("CorruptedZombieGhostCC")
	C0RZ C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("CorruptedZombieGhostCC")
	C0RZ C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("CorruptedZombieGhostDD")
	C0RZ D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("CorruptedZombieGhostDD")
	C0RZ D 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(84,"See")
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	C0RZ AA 3 A_GiveInventory("CorruptetStrafingg3",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	C0RZ BB 3 A_GiveInventory("CorruptetStrafingg3",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    C0RZ CC 3 A_GiveInventory("CorruptetStrafingg3",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	C0RZ DD 3 A_GiveInventory("CorruptetStrafingg3",1)
	Goto See
  Pause:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	C0RZ E 0 A_PlaySound("weapons/demontechsteam")
	C0RZ EEEEE 3 A_GiveInventory("CorruptetStrafingg3",1)
	Goto See	
  Missile:
	C0RZ EEEE 3 A_GiveInventory("CorruptetStrafingg3",1)
	TNT1 A 0 A_Jump(20,"Rapid")
	C0RZ E 3 A_GiveInventory("CorruptetStrafingg3",1)
	TNT1 A 0 A_GiveInventory("CorruptetStrafingg3",1)
	TNT1 AA 0 A_CustomMissile("LegendaryProjectile",32,0,Frandom(-1,1),0)
	C0RZ F 3 A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
    TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	Goto Missile+4	
  Rapid:
	TNT1 A 0 A_PlaySound("ELegCommando/Star",0,1,0,ATTN_NONE)
    C0RZ EEEEEEEE 3 A_GiveInventory("CorruptetStrafingg3",1)
  RapidLoop:
    TNT1 A 0 A_JumpIf(user_missile == 20,"Pause")
    C0RZ E 1 A_GiveInventory("CorruptetStrafingg3",1)
	TNT1 AA 0 A_CustomMissile("LegendaryProjectile",32,0,Frandom(-1,1),0)
	C0RZ F 3 A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
	TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	Loop
  Pain:
	TNT1 A 0 A_Jump(10,"Protection")
  Pain2:
	TNT1 A 0 A_Jump(192,"PainMissile")
    C0RZ G 3 A_GiveInventory("CorruptetStrafingg3",1)
    TNT1 A 0 A_Pain
	C0RZ G 3 A_GiveInventory("CorruptetStrafingg3",1)
    Goto See
  PainMissile: 
	C0RZ G 3 A_GiveInventory("CorruptetStrafingg3",1)
	TNT1 A 0 A_Pain
	C0RZ G 3 A_GiveInventory("CorruptetStrafingg3",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
	C0RZ E 2 ACS_NamedExecuteAlways("EnragedLegendaryProtection")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	Goto See	
  Death:
    TNT1 A 0 A_ChangeFlag("BRIGHT",0)
    TNT1 A 0 A_StopSound(6)
    TNT1 A 0 A_Jump(36,"LegendarySoul")
	C0RZ H 5 A_Scream
    C0RZ I 5 A_NoBlocking
    C0RZ J 5 A_SpawnItem("BodyCrash")
    C0RZ K 5 
    C0RZ L -1 
	Stop
  LegendarySoul:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	C0RZ H 5 A_Scream
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
    C0RZ I 5 A_Fall
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
    C0RZ J 5 A_SpawnItem("BodyCrash")
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
    C0RZ KLL 5 A_SpawnItem("BHellionSmokeSpawner")
	C0RZ L 140
	C0RZ N 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	C0RZ LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("BlueLightning",1)
	C0RZ LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("BlueLightning",1)
	C0RZ LLLLLLLLLLLLLLLLL 2 Bright A_SpawnItem("BlueLightning",1)
	TNT1 A 0 A_SpawnItemEx("CorruptedSoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	C0RZ L -1
	Stop	
  XDeath:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItemEx("BlueGibbedGenerator")
    C0RZ O 3 A_XScream
    C0RZ P 3 A_NoBlocking
    C0RZ QRSTU 3 
    C0RZ U -1 
    Stop
    }
}

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

ACTOR CorruptedZombieGhostBB : CorruptedZombieGhostAA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    C0RZ B 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}

ACTOR CorruptedZombieGhostCC : CorruptedZombieGhostAA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    C0RZ C 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}

ACTOR CorruptedZombieGhostDD : CorruptedZombieGhostAA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    C0RZ D 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}

ACTOR CorruptedZombieGhostEE : CorruptedZombieGhostAA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    C0RZ E 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}

ACTOR CorruptedZombieGhostFF : CorruptedZombieGhostAA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    C0RZ F 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}

Actor CorruptetStrafingg3 : LegZombieStrafing
{
States
{
  Pickup:
    NULL A 1 
	NULL A 1 A_SpawnItem("CBoysFireSpawner")
	NULL A 1 A_Jump(188,2)
	NULL A 1 A_GiveInventory("LegZombieJumping",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("LegCommandoStrafeSens",1,3)
	NULL A 1 A_GiveInventory("LegCommandoStrafeSens",1)
	NULL A 1 A_Jump(256,2)	
	NULL A 1 A_TakeInventory("LegCommandoStrafeSens",1)
	NULL A 1 A_JumpIfInventory("LegCommandoStrafeSens",1,3)
	NULL A 1 ThrustThing(angle*256/360+38.7,5,0,0)
	NULL A 1 A_Jump(256,2)	
	NULL A 1 ThrustThing(angle*256/360+38.7,-5,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	
  }
}