ACTOR SSTSuperShotgunGuy : SuperShotgunGuy //replaces SuperShotgunGuy
{
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

  Game Doom
  SpawnID 157
  Health 120
  Radius 20
  Height 56
  Mass 100
  Speed 8
  PainChance 170
  SEESOUND "SSGUNER/sight"
  PAINSOUND "grunt/pain"
  DEATHSOUND "SSGUNER/death"
  ACTIVESOUND "SSGUNER/idle"
  AttackSound "ssgguy/attack"
  maxtargetrange 700
  MONSTER
  +FLOORCLIP
  Obituary "$OB_SSGGUY" // "%o was jacked by a super shotgun guy."
  DropItem "SSTSSG"
  dropitem "SSTAutoStim" 64
  //+MISSILEMORE
  States
  {
    Spawn:
      GPOS EE 10 A_LookEx(LOF_NOSEESOUND,0,768,384, 90, "AmbushCheck")
      Loop
	AmbushCheck:
		GPOS A 0 A_JumpIfCloser(280, "Surprise")
		GPOS A 1
		TNT1 A 0 A_PlaySound("SSGUNER/sight", CHAN_6)
		Goto See
    See:
      GPOS AABBCCDD 4 A_Chase
      Loop
	Surprise:
	TNT1 A 0 A_PlaySound("surpriseMF", CHAN_6)
	Goto Missile+3
    Missile:
      GPOS EEEE 5 A_FaceTarget
    NULL A 0 A_SpawnItemEx ("SSGEcho", 0,0,0, 0,0,0, 0, 160)
    GPOS FFFFFFFFFF 0 bright A_CustomMissile ("TracerRoundShotgun", 32, 0, random(-80,80)*0.1, CMF_OFFSETPITCH, random(-70,70)*0.1)
      GPOS F 8 Bright A_CustomBulletAttack(8, 7, 10, 3, "SSTShotgunPuff")
      GPOS E 8
    POSS F 0 bright A_CustomMissile ("ShellCasingSpawner2", 32, 0, 0, 0, 0)
    POSS F 0 bright A_CustomMissile ("ShellCasingSpawner2", 32, 0, 0, 0, 0)
      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:
      GPOS G 3
      GPOS 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(-60,"XDeath")
	goto Death
    Death:
      GPOS H 5
      GPOS I 5 A_Scream
      GPOS J 5 A_NoBlocking
      GPOS KLM 5
      GPOS N -1
      Stop
  Death.Chainsaw:
    GPOS G 0 A_Facetarget
	POSS G 0 A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
    GPOS GHM 5 A_Scream
    GPOS OOOO 1 A_DropItem("SSTHealthBonus",1,127)
    GPOS P 4 //A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
	NULL A 0 A_SpawnItemEx ("BloodFXSpawner", 0, 0, 0, 0, 0, 0, 0, 160) 
    GPOS Q 6 A_NoBlocking
    NULL A 0 A_SpawnDebris ("BloodSpotSilent")
    GPOS RRSS 3 A_SpawnItemEx ("BloodFXSpawner", 0,0,random(0,40), 0,0,0, 0, 160,127) 
    GPOS T -1
    stop
  XDeath.Plasma:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 10,0,0)
	GPOS O 1 BRIGHT
  XDeath:
    GPOS O 2
    GPOS P 3 A_Playsoundex("misc/slop2", "soundslot5")//A_XScream
	NULL A 0 A_SpawnItemEx ("BloodFXSpawner", 0, 0, 0, 0, 0, 0, 0, 160) 
    GPOS Q 3 A_NoBlocking
    NULL A 0 A_SpawnDebris ("BloodSpotSilent")
    GPOS RRRSSS 1 A_SpawnItemEx ("BloodFXSpawner", 0,0,random(0,40), 0,0,0, 0, 160,127) 
    GPOS T -1
    stop
  Death.Shotgun:
    TROO H 0 A_JumpIfCloser(56,1)//41
	Goto Death
    TROO H 0 A_NoBlocking
    tnt1 H 70 A_SpawnItemEx ("SSGerRagdoll", 0,0,0, momx*2,momy*2,2, 0, SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION) 
	Stop
  Death.Rocket:
    TROO H 0 A_JumpIfHealthLower(-60,"XDeath")
    TROO H 0 A_NoBlocking
    tnt1 H 70 A_SpawnItemEx ("SSGerRagdoll", 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:
      GPOS 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
  }
}
