Actor RepeaterZombie 
{
Monster
Health 210
Height 56
Radius 20
Speed 5
Reactiontime 35
PainChance 50
Painchance "Mine", 128
Decal "MummyScorch"
+FloorClip
+DONTHARMSPECIES
Species "EliteZombies"
Damagefactor "Acid", 2.5
Damagefactor "Explosion", 0.5
Damagefactor "Extreme", 0.2
//No Infighting
Damagefactor "ZExplosiveBullets", 0.0
Damagefactor "HTZombie", 0.0
DamageFactor "ZombieCannon", 0.0
DamageFactor "MiniRocket", 0.0
Damagefactor "ZGrenade", 0.0
DropItem "PortableMedkit", 200, 1
DropItem "HealthFlask", 250, 2
DropItem "ArmorPlate", 200, 1
DropItem "AmmoPack", 100, 2
DropItem "HandGrenadeAmmo", 100, 1
DropItem "MineAmmo", 100, 1
DropItem "AMCell", 200
SeeSound "Grunt/Sight"
ActiveSound "Grunt/Active"
PainSound "Grunt/Pain"
DeathSound "Grunt/Death"
Obituary "%o was vapourized by a Zombie with a Plasma Repeater."
Tag "\ccRepeater Zombie\c-"
States
	{
	Spawn:
		RPZM A 10 A_Look
		Loop
	Idle:
		TNT1 A 0 A_JumpIfInventory("RepeaterZombieFiring",1,"SpinDown")
		TNT1 A 0 A_ChangeFlag(NOPAIN,0)
		RPZM A 10 A_Look
		TNT1 A 0 HealThing(1)
		Loop
	See:
		TNT1 A 0 A_JumpIfInventory("RepeaterZombieFiring",1,"SpinDown")
		TNT1 A 0 A_ChangeFlag(NOPAIN,0)
		RPZM AAAA 1 A_Chase("","")
		RPZM A 1 A_Chase
		RPZM BBBB 1 A_Chase("","")
		RPZM B 1 A_Chase
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,2,0,0,-20)
		RPZM CCCC 1 A_Chase("","")
		RPZM C 1 A_Chase
		RPZM DDDD 1 A_Chase("","")
		RPZM D 1 A_Chase
		TNT1 A 0 HealThing(1)
		TNT1 A 0 A_SpawnItemEx("FootStep2",0,0,2,0,0,-20)
		Loop 
	Missile:
		//TNT1 A 0 A_CustomMissile("BribeCaco",1,0,0,2,-90)
		//TNT1 A 0 A_ChangeFlag(NoTarget,1)
		TNT1 A 0 A_ChangeFlag(NOPAIN,1)
		TNT1 A 0 A_GiveInventory("RepeaterZombieFiring",1)
		TNT1 A 0 A_PlaySound("Weapons/RepeaterSpinUp",7)
		RPZM EEEFFFEEFFEFEF 4 A_FaceTarget(45)
	Normal:
		TNT1 A 0 A_JumpIfInventory("RepeaterZombieHeat",20,"Overload")
		TNT1 A 0 A_GiveInventory("RepeaterZombieHeat",1)
		TNT1 A 0 A_PlaySound("Weapons/RepeaterFire")
		TNT1 A 0 A_CustomMissile("MonsterExplosiveTracer2",random(30,32),random(4,8),random(-2,2),0,random(-2,2))
		RPZM G 1 Bright A_CustomBulletAttack(5,4,2,6,"RepPuff",10240,CBAF_AIMFACING)
		RPZM F 1 A_FaceTarget
		TNT1 A 0 A_PlaySound("Weapons/RepeaterFire")
		TNT1 A 0 A_CustomMissile("MonsterExplosiveTracer2",random(30,32),random(4,8),random(-2,2),0,random(-2,2))
		RPZM E 1 Bright A_CustomBulletAttack(5,4,2,6,"RepPuff",10240,CBAF_AIMFACING)
		RPZM E 1 A_FaceTarget
		TNT1 A 0 A_Monsterrefire(36,"See")
		Loop
	SpinDown:
		TNT1 A 0 A_PlaySound("Weapons/RepeaterSpinDown",7)
		TNT1 A 0 A_TakeInventory("RepeaterZombieFiring",1)
		TNT1 A 0 A_TakeInventory("RepeaterZombieHeat",20)
		RPZM EFEFEEFF 4
		Goto See
	Overload:
		TNT1 A 0 A_PlaySound("Weapons/RepeaterSpinDown",7)
		TNT1 A 0 A_PlaySound("RepeaterZombie/Steam",CHAN_WEAPON)
		TNT1 A 0 A_TakeInventory("RepeaterZombieFiring",1)
		TNT1 A 0 A_TakeInventory("RepeaterZombieHeat",20)
		RPZM EEEEEFFFFFF 1 A_SpawnItemEx("RepeaterZombieSteam",-5,Random(12,14),Random(31,33),4,0,(0.1)*Random(-5,5),Random(85,90),SXF_CLIENTSIDE,0)
		RPZM EEEEEEFFFFF 1 A_SpawnItemEx("RepeaterZombieSteam",-5,Random(12,14),Random(31,33),4,0,(0.1)*Random(-5,5),Random(85,90),SXF_CLIENTSIDE,0)
		RPZM EEEEEFFFFFF 1 A_SpawnItemEx("RepeaterZombieSteam",-5,Random(12,14),Random(31,33),4,0,(0.1)*Random(-5,5),Random(85,90),SXF_CLIENTSIDE,0)
		RPZM EEEEEEFFFFF 1 A_SpawnItemEx("RepeaterZombieSteam",-5,Random(12,14),Random(31,33),4,0,(0.1)*Random(-5,5),Random(85,90),SXF_CLIENTSIDE,0)
		RPZM EEEEEFFFFFF 1 A_SpawnItemEx("RepeaterZombieSteam",-5,Random(12,14),Random(31,33),4,0,(0.1)*Random(-5,5),Random(85,90),SXF_CLIENTSIDE,0)
		RPZM EEEEEEFFFFF 1 A_SpawnItemEx("RepeaterZombieSteam",-5,Random(12,14),Random(31,33),4,0,(0.1)*Random(-5,5),Random(85,90),SXF_CLIENTSIDE,0)
		RPZM EEEEEFFFFFF 1 A_SpawnItemEx("RepeaterZombieSteam",-5,Random(12,14),Random(31,33),4,0,(0.1)*Random(-5,5),Random(85,90),SXF_CLIENTSIDE,0)
		Goto See
	Pain:
		TNT1 A 0
		TNT1 A 0 A_ChangeFlag(NOPAIN,1)
		//TNT1 A 0 A_ChangeFlag(NoTarget,1)
		TNT1 A 0 A_StopSound(7)
		//TNT1 A 0 A_CustomMissile("BribeCaco",1,0,0,2,-90)
		RPZM I 3
		//TNT1 A 0 A_ChangeFlag(NoTarget,0)
		RPZM I 3 A_Pain 
		Goto See 
	Death:
		TNT1 AAA 0 A_StopSound(7)
		RPZM I 4
		RPZM J 5
		RPZM K 5 A_Scream 
		RPZM L 5 A_Fall
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(298) == 1, "AlwaysDrop")
		TNT1 A 0 A_SpawnItemEx("Repeater",0,0,8,random(0,8),random(0,8),2,random(0,360),0,224)
		TNT1 A 0 A_SpawnItemEx("AMBox",0,0,8,random(0,8),random(0,8),2,random(0,360),0,64)
		Goto EndDrop
	AlwaysDrop:
		TNT1 A 0 A_SpawnItemEx("Repeater",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
		TNT1 A 0 A_SpawnItemEx("AMBox",0,0,8,random(0,8),random(0,8),2,random(0,360),0,224)
		Goto EndDrop
	EndDrop:
		RPZM M 5
		RPZM N 63000 CanRaise
		Stop
	XDeath:
		TNT1 AAA 0 A_StopSound(7)
		RPZM O 5
		TNT1 A 0 A_GiveInventory("XDeathCheck",1)
		TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,30)
		RPZM P 5 A_XScream
		RPZM Q 5
		RPZM R 5 A_Fall
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(298) == 1, "XAlwaysDrop")
		TNT1 A 0 A_SpawnItemEx("Repeater",0,0,8,random(0,8),random(0,8),2,random(0,360),0,224)
		TNT1 A 0 A_SpawnItemEx("AMBox",0,0,8,random(0,8),random(0,8),2,random(0,360),0,32)
		Goto XEndDrop
	XAlwaysDrop:
		TNT1 A 0 A_SpawnItemEx("Repeater",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
		TNT1 A 0 A_SpawnItemEx("AMBox",0,0,8,random(0,8),random(0,8),2,random(0,360),0,128)
		Goto XEndDrop
	XEndDrop:
		RPZM STUV 5
		RPZM W 63000 CanRaise
		Stop
	Raise:
		TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		TNT1 A 0 A_JumpIfInventory("XDeathCheck",1,"XRaise")
		RPZM NMLKJI 5
		Goto See
	XRaise:
		TNT1 A 0 A_TakeInventory("XDeathCheck",1)
		RPZM VUTSRQPO 4
		GoTo See
	} 
}

Actor RepeaterZombieFiring : Inventory { Inventory.MaxAmount 1 }
Actor RepeaterZombieHeat : Inventory { Inventory.MaxAmount 20 }

Actor RepeaterZombieSteam
{
Height 1
Radius 1
Speed 4
RenderStyle Add
Scale 0.3
Alpha 0.65
+MISSILE
+DROPOFF
+PAINLESS
+NOGRAVITY
+NOBLOCKMAP
+NOTELEPORT
+BLOODLESSIMPACT
-BLOODSPLATTER
+CLIENTSIDEONLY
+NONETID
States
	{
	Spawn:
		TNT1 A 0 Bright
		TNT1 A 0 Bright A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
		STEM A 1 A_SetTranslucent(0.6,1)
		STEM B 2 A_SetTranslucent(0.55,1)
		STEM C 1 A_SetTranslucent(0.5,1)
		STEM D 2 A_SetTranslucent(0.45,1)
		STEM E 1 A_SetTranslucent(0.4,1)
		STEM F 2 A_SetTranslucent(0.35,1)
		STEM G 1 A_SetTranslucent(0.3,1)
		STEM H 2 A_SetTranslucent(0.25,1)
		STEM I 1 A_SetTranslucent(0.2,1)
		STEM J 2 A_SetTranslucent(0.15,1)
		STEM K 1 A_SetTranslucent(0.1,1)
		STEM L 2 A_SetTranslucent(0.05,1)
		Stop
	Toaster:
		TNT1 A 1 Bright
		Stop
	}
}