actor SSTZombieMan : zombieman //replaces zombieman
{
damagefactor "RedPaint", 0.3
damagefactor "OrangePaint", 0.3
damagefactor "YellowPaint", 0.3
damagefactor "GreenPaint", 0.3
damagefactor "BluePaint", 0.3
damagefactor "PurplePaint", 0.3
damagefactor "WhitePaint", 0.3
damagefactor "BlackPaint", 0.3
  PainChance "ShotgunWeak", 50

maxtargetrange 2500
  spawnid 4
  obituary "%o was killed by a zombie."
  health 20
  gibhealth -20
  radius 20
  height 56
  mass 50//100
  speed 8
  painchance 200
  seesound "grunt/sight"
  attacksound "grunt/attack"
  painsound "grunt/pain"
  deathsound "grunt/death"
  activesound "grunt/active"
  dropitem "Clip" 256
  MONSTER
  +FLOORCLIP
  states
  {
  Spawn:
    POSS AB 10 A_Look
    loop
  See:
    POSS AABBCCDD 4 A_Chase
    loop
  Missile:
    POSS E 14 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLOS (2)
	POSS E 1
    Goto See
    NULL A 0 A_SpawnItemEx ("PistolEcho", 0,0,0, 0,0,0, 0, 160)
    CPOS E 0 bright A_playsound("grunt/attack")
    POSS F 1 bright A_CustomMissile ("TracerShot", 32, 0, random(-4,4), CMF_OFFSETPITCH, random(-1,0))
    POSS E 2 A_CustomMissile ("BulletCasingSpawner", 32, 0, 0, 0, 0)
	
    NULL A 0 A_SpawnItemEx ("PistolEcho", 0,0,0, 0,0,0, 0, 160)
    CPOS E 0 bright A_playsound("grunt/attack")
    POSS F 1 bright A_CustomMissile ("TracerShot", 32, 0, random(-4,4), CMF_OFFSETPITCH, random(-1,0))
    POSS E 2 A_CustomMissile ("BulletCasingSpawner", 32, 0, 0, 0, 0)
	
    NULL A 0 A_SpawnItemEx ("PistolEcho", 0,0,0, 0,0,0, 0, 160)
    CPOS E 0 bright A_playsound("grunt/attack")
    POSS F 1 bright A_CustomMissile ("TracerShot", 32, 0, random(-4,4), CMF_OFFSETPITCH, random(-1,0))
    POSS E 2 A_CustomMissile ("BulletCasingSpawner", 32, 0, 0, 0, 0)
    POSS E 8
    goto See
  Pain.Fire:
  	TNT1 AAAA 0 A_SpawnItemEx("imonfire", random(-8,-2),Random(-8,8),random(20, 38), 0, random(-30,30)*0.1, random(10,30)*0.1, 0, 160)
	Goto Pain
  Pain:
    POSS G 3
    POSS G 3 A_Pain
    goto See
  Death.Plasma:
	TNT1 A 0 A_Stop
    TNT1 A 0 ACS_ExecuteAlways(926,0, 10,0,0)
	NULL O 0 A_SpawnItemEx ("PlasmaDeathFX", 0,0,0, momx,momy,momz, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_ABSOLUTEMOMENTUM)
    TROO H 0 A_JumpIfHealthLower(-15,"XDeath")
	goto Death
  Death.Fire:
	TNT1 A 0 A_Stop
    TNT1 A 0 ACS_ExecuteAlways(926,0, 10,0,0)
	NULL O 0 A_SpawnItemEx ("BurnDeathFX", 0,0,0, momx,momy,momz, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_ABSOLUTEMOMENTUM)
	Goto Death
  XDeath.NewBullet:
    POSS H 1
  Death:
    POSS H 0 A_Jump(128, "DeathB")
	POSS H 0 ThrustThingZ(0, random(16,32), 0, 0)
    POSS H 5
    POSS I 5 A_Scream
    POSS J 5 A_NoBlocking
    POSS K 5
    POSS L -1
    stop
  DeathB:
    POSS H 2
    POOS V 5 A_Scream
    POOS W 5 A_NoBlocking
    POOS X 5
    POOS Y 5
    POOS Z -1
    stop
  XDeath.Plasma:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 10,0,0)
    POSS M 1 BRIGHT
  XDeath:
    POSS M 0 A_NoBlocking//1
    POSS M 0 A_Facetarget
    NULL A 0 A_Jump(16, "XDeathB")
	NULL O 0 A_SpawnItemEx ("ZombiemanBloodFXSpawner", 0,0,0, momx,momy,momz, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_TRANSFERTRANSLATION|SXF_ABSOLUTEMOMENTUM)

    NULL A 0 A_SpawnDebris ("BloodSpotSilent")
    NULL OPQ 2 A_SpawnItemEx ("BloodFXSpawner", 0,0,random(0,40), 0,0,0, 0, 160,127) 
	Stop
  Death.Chainsaw:
    POSS G 0 A_Facetarget
	POSS G 0 A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
    POSS GHM 5 A_Scream
    POSS M 2 A_NoBlocking
	POSS N 2 //A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
	NULL A 0 A_SpawnItemEx ("BloodFXSpawner", 0, 0, 0, 0, 0, 0, 0, 160) 
    POSS OOOO 1 A_DropItem("SSTHealthBonus",1,127)
    NULL A 0 A_SpawnDebris ("BloodSpotSilent")
    POSS PPQQRRSSTT 3 A_SpawnItemEx ("BloodFXSpawner", 0,0,random(0,40), 0,0,0, 0, 160,127) 
    POSS U -1
    stop
  XDeathB:
    POSS M 1
	POSS N 2 A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
	NULL A 0 A_SpawnItemEx ("BloodFXSpawner", 0, 0, 0, 0, 0, 0, 0, 160) 
    POSS O 2
    NULL A 0 A_SpawnDebris ("BloodSpotSilent")
    POSS PPQQRRSSTT 1 A_SpawnItemEx ("BloodFXSpawner", 0,0,random(0,40), 0,0,0, 0, 160,127) 
    POSS U -1
    stop
  Death.Shotgun:
    TROO H 0 A_JumpIfCloser(56,1)//41
	Goto Death
    NULL A 0 A_Jump(32, "XDeath")
    TROO H 0 A_NoBlocking
    TNT1 H 70 A_SpawnItemEx ("ZombiemanRagdoll", 0,0,0, momx*2.5,momy*2.5,2, 0, SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION) 
	Stop
  Death.Rocket:
    TROO H 0 A_JumpIfHealthLower(-15,"XDeath")
    TROO H 0 A_NoBlocking
    TNT1 H 70 A_SpawnItemEx ("ZombiemanRagdoll", 0,0,0, momx*random(1.25,1.75),momy*random(1.25,1.75),momz*3.0, 0, SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION) 
	Stop
  Raise:
    POSS KJIH 5
    goto See

    Crush:
	TNT1 A 0 A_SpawnItemEx ("Gibs", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR|SXF_CLIENTSIDE)
	TNT1 AAAAAAAA 0 A_SpawnItemEx ("SuperDuperClientsideBloodSpotSpawner", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR|SXF_CLIENTSIDE)
    TNT1 AAAAAAAA 1 A_SpawnItemEx ("Bloodsquirt3", 0,0,0, 0,0,0, random(-180,180), SXF_USEBLOODCOLOR|SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
    TNT1 A -1
    Stop
	  Pain.GreenPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 0,0,0)
	Goto Pain
  Pain.BluePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 1,0,0)
	Goto Pain
  Pain.RedPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 2,0,0)
	Goto Pain
  Pain.OrangePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 3,0,0)
	Goto Pain
  Pain.PurplePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 4,0,0)
	Goto Pain
  Pain.WhitePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 5,0,0)
	Goto Pain
  Pain.YellowPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 6,0,0)
	Goto Pain
  Pain.BlackPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 7,0,0)
	Goto Pain
  }
}


//For use with some minigames which will be added later...
actor HandCuffedZombieman : SSTZombieman 28646
{
	//$Category SST Minigames
//+STANDSTILL
	States
	{
	Spawn:
	See:
	Missile:
	Melee:
		TVR1 A 0
		TVR1 A 1
		Loop
	Pain:
		TVR1 B 10 A_Pain
		goto Spawn
	Death.Plasma:
	Death.Rocket:
	Death.Chainsaw:
	Death.Shotgun:
	Death:
	XDeath.Plasma:
	XDeath.Rocket:
	XDeath.Chainsaw:
	XDeath.Shotgun:
	XDeath:
    TROO H 0 A_NoBlocking
    TNT1 A 20 A_SpawnItemEx ("ZombiemanRagdoll", 0,0,0, momx*2,momy*2,4, 0, SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION) 
	Stop
	
  Pain.GreenPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 0,0,0)
	Goto Pain
  Pain.BluePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 1,0,0)
	Goto Pain
  Pain.RedPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 2,0,0)
	Goto Pain
  Pain.OrangePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 3,0,0)
	Goto Pain
  Pain.PurplePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 4,0,0)
	Goto Pain
  Pain.WhitePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 5,0,0)
	Goto Pain
  Pain.YellowPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 6,0,0)
	Goto Pain
  Pain.BlackPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 7,0,0)
	Goto Pain
	}
}