ACTOR PGNZombie
{
MONSTER
Health 550
Height 56
Radius 20
Mass 300
Speed 3
MaxStepHeight 64
PainChance 30
Reactiontime 25
Painchance "Mine", 256
+NOFEAR
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+DONTHARMSPECIES
Species "EliteZombies"
Damagefactor "Acid", 5.25
Damagefactor "Explosion", 0.5
Damagefactor "Extreme", 0.2
Damagefactor "Rocket", 0.4
//No Infighting
DamageFactor "RST", 0.0
DamageFactor "SoapOpera", 0.0
DamageFactor "ZombieDev", 0.0
Damagefactor "ZExplosiveBullets", 0.0
Damagefactor "HTZombie", 0.0
Damagefactor "ZGrenade", 0.0
DamageFactor "ZombieCannon", 0.0
DamageFactor "MiniRocket", 0.0
DamageFactor "Zap", 0.0
DropItem "PortableMedCell", 150, 1
DropItem "StimKit", 180, 2
DropItem "ClipBox", 180
DropItem "HealthFlask", 200, 6
DropItem "ArmorPlate", 160
DropItem "HandGrenadeAmmo", 120, 1
DropItem "MineAmmo", 90, 1
DropItem "AmmoPack", 160, 1
DropItem "ShieldSphere", 64, 1
SeeSound "PNZombie/See"
ActiveSound "PNZombie/Act"
PainSound "PNZombie/Pain"
DeathSound "PNZombie/Die"
Obituary "%o was fucked up and blown appart by an Elite Zombie Leader."
Tag "\cqElite Zombie Leader\c-"
States
	{
	Spawn:
		PNGZ A 10 A_Look
		Loop
	Idle:
		PNGZ AAAA 1 A_Wander
		TNT1 A 0 A_Look
		PNGZ BBBB 1 A_Wander
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
		PNGZ CCCC 1 A_Wander
		TNT1 A 0 A_Look
		PNGZ DDDD 1 A_Wander
		TNT1 A 0 HealThing(random(2,3))
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
		PNGZ AAAA 1 A_Wander
		TNT1 A 0 A_Look
		PNGZ BBBB 1 A_Wander
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
		PNGZ CCCC 1 A_Wander
		TNT1 A 0 A_Look
		PNGZ DDDD 1 A_Wander
		TNT1 A 0 HealThing(random(2,3))
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
		Loop
	See:
		TNT1 A 0 A_JumpIfInventory("SnipeOn",1,"SnipeSee")
		PNGZ AAAABBBB 1 A_Chase
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
		PNGZ CCCCDDDD 1 A_Chase
		TNT1 A 0 HealThing(random(1,2))
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
		Loop
	SnipeSee:
		PNGZ AAAA 1 A_Chase("","SnipeFire")
		TNT1 A 0 A_FastChase
		TNT1 A 0 A_JumpIfCloser(192,"StopSnipe")
		PNGZ AAAA 1 A_Chase("","SnipeFire")
		TNT1 A 0 A_JumpIfCloser(192,"StopSnipe")
		PNGZ BBBB 1 A_Chase("","SnipeFire")
		TNT1 A 0 A_Jump(20,"Heal")
		TNT1 A 0 A_JumpIfCloser(192,"StopSnipe")
		PNGZ BBBB 1 A_Chase("","SnipeFire")
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
		TNT1 A 0 A_JumpIfCloser(192,"StopSnipe")
		PNGZ CCCC 1 A_Chase("","SnipeFire")
		TNT1 A 0 A_Jump(20,"Heal")
		TNT1 A 0 A_JumpIfCloser(192,"StopSnipe")
		PNGZ CCCC 1 A_Chase("","SnipeFire")
		TNT1 A 0 A_FastChase
		TNT1 A 0 A_JumpIfCloser(192,"StopSnipe")
		PNGZ DDDD 1 A_Chase("","SnipeFire")
		TNT1 A 0 A_JumpIfCloser(192,"StopSnipe")
		TNT1 A 0 A_FastChase
		PNGZ DDDD 1 A_Chase("","SnipeFire")
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,5,0,0,-20)
		Loop
	Missile:
		TNT1 A 0
		TNT1 A 0 HealThing(1)
		TNT1 A 0 A_Jump(25,"Rage")
		TNT1 A 0 A_Jump(60,"Heal")
		TNT1 A 0 A_JumpIfCloser(128,"SpreadFire")
		PNGZ EEEEEEEEEE 1 A_FaceTarget(45)
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,frandom(-2.0,2.0),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 5 Bright A_CustomMissile("ZPulseNail",34,9,frandom(-2.0,2.0),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_JumpIfInventory("LowHealthCheck",1,"MissileEnd")
		TNT1 A 0 A_Jump(16,"MabySee")
		PNGZ E 5 A_SpidRefire
		Goto Missile
	MissileEnd:
		PNGZ E 5 A_FaceTarget
		TNT1 AAA 0 A_FastChase
		Goto See
	Rage:
		PNGZ EEEEEEEEEE 1 A_FaceTarget(45)
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 Bright A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-4,4),CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ F 3 Bright A_CustomMissile("ZPulseNail",34,9,random(4,-4),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-2.0,2.0))
		PNGZ E 3 A_FaceTarget
		TNT1 A 0 A_FastChase
		GoTo See
	SpreadFire:
		TNT1 A 0
		TNT1 A 0 A_FastChase
		PNGZ EEEEEEEEEE 1 A_FaceTarget
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		TNT1 A 0 A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
		TNT1 A 0 A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
		TNT1 A 0 A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
		TNT1 A 0 A_CustomMissile("MonsterExplosiveTracer3",34,9,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
		TNT1 A 0 A_CustomMissile("ZPulseNail",random(32,36),random(8,10),random(-8,8),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-4.0,4.0))
		TNT1 A 0 A_CustomMissile("ZPulseNail",random(32,36),random(8,10),random(-8,8),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-4.0,4.0))
		TNT1 A 0 A_CustomMissile("ZPulseNail",random(32,36),random(8,10),random(-8,8),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-4.0,4.0))
		PNGZ F 5 Bright A_CustomMissile("ZPulseNail",random(32,36),random(8,10),random(-8,8),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-4.0,4.0))
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_JumpIfInventory("LowHealthCheck",1,"SpreadFireEnd")
		TNT1 A 0 A_Jump(16,"MabySee")
		PNGZ E 5 A_SpidRefire
		TNT1 A 0 A_Jump(30,"Heal")
		Goto Missile
	SpreadFireEnd:
		PNGZ E 5 A_FaceTarget
		Goto See
	MabySee:
		TNT1 A 0 A_JumpIfInventory("LowHealthCheck",1,"See")
		TNT1 A 0 A_JumpIfCloser(384,"See")
		Goto StartSnipe
	SnipeFire:
		TNT1 A 0 A_ChangeFlag(NOPAIN,1)
		TNT1 A 0 A_Jump(64,2)
		PNGZ E 2 A_FaceTarget
		TNT1 A 0 A_Jump(64,2)
		PNGZ E 2 A_FaceTarget
		TNT1 A 0 A_Jump(64,2)
		PNGZ E 2 A_FaceTarget
		TNT1 A 0 A_Jump(64,2)
		PNGZ E 2 A_FaceTarget
		TNT1 A 0 A_Jump(64,2)
		PNGZ E 2 A_FaceTarget
		TNT1 A 0 A_Jump(64,2)
		PNGZ E 2 A_FaceTarget
		TNT1 A 0 A_Jump(64,2)
		PNGZ E 2 A_FaceTarget
		TNT1 A 0 A_Jump(64,2)
		PNGZ E 2 A_FaceTarget
		PNGZ E 2 A_FaceTarget
		TNT1 A 0 A_PlaySound("PulseNail/fire")
		PNGZ F 5 Bright
		TNT1 A 0 A_CustomMissile("MonsterExplosiveTracer3",34,9,0)
		TNT1 AA 0 A_CustomMissile("ZPulseNail",34,9,0,CMF_TRACKOWNER)
		TNT1 A 0 A_FaceTarget
		PNGZ E 15 A_SpidRefire
		TNT1 A 0 A_ChangeFlag(NOPAIN,0)
		TNT1 A 0 A_Jump(40,"Heal")
		Goto SnipeFire
	Pain:
		TNT1 A 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("ZombieShieldSphere",1)
	NoPainShield:
		PNGZ G 3
		PNGZ G 3 A_Pain
		TNT1 A 0 A_JumpIfInventory("LowHealthCheck",1,3)
		TNT1 A 0 A_JumpIfHealthLower((ACS_NamedExecuteWithResult("Hem_SpawnHealth")*0.25),"LowHealth")
		TNT1 A 0 A_JumpIfInventory("SnipeOn",1,"SnipePain")
		TNT1 A 0 A_Jump(20,"Heal")
		Goto See
	Pain.Mine:
		PNGZ A 1 A_Recoil(-16)
		TNT1 A 0 ThrustThingZ(0,11,0,0)
		PNGZ A 4
		GoTo See
	Heal:
		PNGZ A 5
		TNT1 A 0 A_Jump(40,"Heal2")
		TNT1 A 0 A_Jump(15,"Heal3")
		TNT1 A 0 HealThing(10)
		TNT1 A 0 A_PlaySound("pickups/flask",0,1.0,0)
		TNT1 A 0 A_JumpIf(Health >= 110,"UnFright")
		GoTo See
	Heal2:
		TNT1 A 0
		TNT1 A 0 HealThing(25)
		TNT1 A 0 A_PlaySound("pickups/pstimpack",0,1.0,0)
		TNT1 A 0 A_JumpIf(Health >= 110,"UnFright")
		GoTo See
	Heal3:
		TNT1 A 0
		TNT1 A 0 HealThing(45)
		TNT1 A 0 A_PlaySound("pmed/use",0,1.0,0)
		TNT1 A 0 A_JumpIf(Health >= 110,"UnFright")
		GoTo See
	SnipePain:
		TNT1 A 0
		TNT1 A 0 A_Jump(128,"StopSnipe")
	StartSnipe:
		TNT1 A 0 A_GiveInventory("SnipeOn",1)
		TNT1 A 0 A_ChangeFlag(MISSILEMORE,1)
		TNT1 A 0 A_ChangeFlag(MissileEvenMore,1)
		TNT1 A 0 A_ChangeFlag(NOFEAR,0)
		TNT1 A 0 A_ChangeFlag(FRIGHTENED,1)
		Goto SnipeSee
	StopSnipe:
		TNT1 A 0 A_TakeInventory("SnipeOn",1)
		TNT1 A 0 A_ChangeFlag(MISSILEMORE,0)
		TNT1 A 0 A_ChangeFlag(MissileEvenMore,0)
		TNT1 A 0 A_ChangeFlag(NOFEAR,1)
		TNT1 A 0 A_ChangeFlag(FRIGHTENED,0)
	LowHealth:
		TNT1 A 0 A_GiveInventory("LowHealthCheck",1)
		TNT1 A 0 A_ChangeFlag(NOFEAR,0)
		TNT1 A 0 A_ChangeFlag(FRIGHTENED,1)
		Goto See
	UnFright:
		TNT1 A 0 A_TakeInventory("LowHealthCheck",1)
		TNT1 A 0 A_ChangeFlag(NOFEAR,1)
		TNT1 A 0 A_ChangeFlag(FRIGHTENED,0)
		Goto See
	Death:
		PNGZ H 5
		PNGZ I 5 A_Scream
		PNGZ J 5 A_Fall
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(298) == 1, "AlwaysDrop")
		TNT1 A 0 A_SpawnItemEx("ExplosiveRifle",0,0,8,random(0,8),random(0,8),2,random(0,360),0,224)
		Goto EndDrop
	AlwaysDrop:
		TNT1 A 0 A_SpawnItemEx("ExplosiveRifle",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
		Goto EndDrop
	EndDrop:
		PNGZ KLM 5
		TNT1 A 0 A_SpawnItem("BodyCrash",0,0,0,0)
		PNGZ N 63000 CanRaise
		Stop
	XDeath:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
		PNGZ O 5 A_GiveInventory("XDeathCheck",1)
		PNGZ P 5 A_XScream
		PNGZ Q 5 A_Fall
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(298) == 1, "XAlwaysDrop")
		TNT1 A 0 A_SpawnItemEx("ExplosiveRifle",0,0,8,random(0,8),random(0,8),2,random(0,360),0,224)
		Goto XEndDrop
	XAlwaysDrop:
		TNT1 A 0 A_SpawnItemEx("ExplosiveRifle",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
		Goto XEndDrop
	XEndDrop:
		PNGZ RSTU 5
		PNGZ V 63000 CanRaise
		Stop
	Raise:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		TNT1 A 0 A_JumpIfInventory("XDeathCheck",1,"XRaise")
		PNGZ MLKJIH 5
		Goto See
	XRaise:
		PNGZ VUTSRQP 5
		PNGZ O 5 A_TakeInventory("XDeathCheck",1)
		Goto See
	}
}

ACTOR ZPulseNail : FastProjectile
{
height 4
radius 2
Scale 0.5
Speed 380
Renderstyle Add
Alpha 0.85
Decal "bulletchip"
Damage (random(10,15))
+DONTREFLECT
+FORCERADIUSDMG
+EXTREMEDEATH
+DONTHURTSPECIES
+DONTHARMSPECIES
+THRUSPECIES
+MTHRUSPECIES
Damagetype "ZExplosiveBullets"
Seesound ""
Deathsound ""
States
	{
	Spawn:
		TNT1 A 0 Bright
		TNT1 A 0 Bright A_CheckFlag(FRIENDLY,2,AAPTR_TARGET)
		TNT1 A 0 Bright
		Goto SpawnLoop
		TNT1 A 0 Bright A_SetDamageType("None")
	SpawnLoop:		
		TNT1 A 1 Bright
		Loop
	Death:
		TNT1 A 1 Bright
		TNT1 A 0 A_Playsound("PulseNail/hit",CHAN_AUTO,1.0,0)
		TNT1 A 0 A_Explode(18,85,0,0,69)
		TNT1 AAA 0 A_SpawnItemEX("Kaboom9",0,0,0,random(-2,2),random(-2,2),random(-2,2),random(0,360),SXF_CLIENTSIDE,0)
		TNT1 AAA 0 A_SpawnItemEX("SmokeFX4",0,0,0,random(-2,2),random(-2,2),random(-2,2),random(0,360),SXF_CLIENTSIDE,0)
		TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner",0,0,1,0,0,0,0,SXF_CLIENTSIDE,0)
		TNT1 A 0 A_SetTranslucent(0.85,1)
		MISL BBBBCC 1 Bright A_Explode(2,85,0,0,69)
		MISL CDE 3 Bright
		Stop
	}
}
