actor SSTShotgunGuy : ShotgunGuy //replaces ShotgunGuy
{
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", 42

maxtargetrange 1700
  //spawnid 1
  obituary "%o was caught by a shotgun zombie."
  health 30
  radius 20
  height 56
  mass 50//100
  speed 8
  painchance 170
  seesound "shotguy/sight"
  //attacksound "shotguy/attack"
  painsound "shotguy/pain"
  deathsound "shotguy/death"
  activesound "shotguy/active"
  dropitem "SSTShotgun" 256
  MONSTER
  +FLOORCLIP
  states
  {
  Spawn:
    SPOS AB 10 A_Look
    loop
  See:
    SPOS AABBCCDD 3 A_Chase
    loop
  Missile:
    SPOS E 14 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLOS (2)
	SPOS E 1
    Goto See
    SPOS E 0 bright A_PlaySound("weapons/shotgf")//A_playsound("shotguy/attack")
    NULL A 0 A_SpawnItemEx ("ShotgunEcho", 0,0,0, 0,0,0, 0, 160)
    SPOS FF 0 bright A_CustomMissile ("TracerShotGun", 32, 0, random(-70,70)*0.1, CMF_OFFSETPITCH, random(-2,2))
    SPOS FFF 0 bright A_CustomMissile ("TracerShotGun", 32, 0, random(-60,60)*0.1, CMF_OFFSETPITCH, random(-2,2))
    SPOS F 10 bright A_CustomMissile ("TracerShotGun", 32, 0, random(-45,45)*0.1, CMF_OFFSETPITCH, random(-2,2))
    SPOS E 4
    POSS F 0 bright A_CustomMissile ("ShellCasingSpawner", 32, 0, 0, 0, 0)
    SPOS E 6
    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:
    SPOS G 3
    SPOS G 3 A_Pain
    goto See
  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
  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
  XDeath.NewBullet:
    SPOS H 1
  Death:
    SPOS H 0 A_Jump (128, "DeathB", "DeathC")
	SPOS H 0 ThrustThingZ(0, random(16,32), 0, 0)
    SPOS H 5
    SPOS I 5 A_Scream
    SPOS J 5 A_NoBlocking
    SPOS K 5
    SPOS L -1
    stop
  DeathB:
    SPOS H 3
  	SPSS V 6 A_Scream
	SPSS W 6 A_NoBlocking
	SPSS X 5
	SPSS Y 4
	SPSS Z -1
  DeathC:
    SPOS H 3
  	SPSS V 6 A_Scream
	SPSS A 6 A_NoBlocking
	SPSS B 5
	SPSS C 4
	SPSS Z -1
  XDeath.Plasma:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 10,0,0)
	SPOS M 1 BRIGHT
  XDeath:
    SPOS M 0 A_NoBlocking
    SPOS M 0 A_Facetarget
    NULL A 0 A_Jump(32, "XDeathB")
	NULL O 0 A_SpawnItemEx ("ShotgunnerBloodFXSpawner", 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:
    SPOS G 0 A_Facetarget
	POSS G 0 A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
    SPOS GHM 5 A_Scream
    SPOS M 2 A_NoBlocking
    SPOS N 2 //A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
	NULL A 0 A_SpawnItemEx ("BloodFXSpawner", 0, 0, 0, 0, 0, 0, 0, 160) 
    SPOS OOOO 1 A_DropItem("SSTHealthBonus",1,127)
    NULL A 0 A_SpawnDebris ("BloodSpotSilent")
    SPOS PPQQRRSSTT 3 A_SpawnItemEx ("BloodFXSpawner", 0,0,random(0,40), 0,0,0, 0, 160,127) 
    SPOS U -1
    stop
  XDeathB:	
    SPOS M 3
    SPOS N 3 A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
	NULL A 0 A_SpawnItemEx ("BloodFXSpawner", 0, 0, 0, 0, 0, 0, 0, 160) 
    SPOS O 3
    NULL A 0 A_SpawnDebris ("BloodSpotSilent")
    SPOS PPQQRRSSTT 1 A_SpawnItemEx ("BloodFXSpawner", 0,0,random(0,40), 0,0,0, 0, 160,127) 
    SPOS U -1
    stop
  Death.Shotgun:
    TROO H 0 A_JumpIfCloser(56,1)//41
	Goto Death
    NULL A 0 A_Jump(64, "XDeath")
    TROO H 0 A_NoBlocking
    tnt1 H 70 A_SpawnItemEx ("ShotgunnerRagdoll", 0,0,0, momx*2,momy*2,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 ("ShotgunnerRagdoll", 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:
    SPOS LKJIH 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
  }
}
