ACTOR SSTDemon : Demon //replaces Demon
{
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", 45

  Game Doom
  SpawnID 8
  Health 150
  PainChance 80
  Speed 12
  Radius 30
  Height 56
  Mass 400
  Monster
  +FLOORCLIP
  SeeSound "demon/sight"
  AttackSound "demon/melee"
  PainSound "demon/pain"
  DeathSound "demon/death"
  ActiveSound "demon/active"
  Obituary "$OB_DEMONHIT" // "%o was crunched by a demon."
  States
  {
  Spawn:
    SARG AB 10 A_Look
    Loop
  See:
    SARG AABBCCDD 2 A_Chase
    Loop
  Melee:
    SARG EF 2 A_FaceTarget
    SARG G 8 A_SargAttack
    SARG FE 5 A_FaceTarget
    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:
    SARG H 2
    SARG H 2 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)
	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
  Death:
    SARG I 0 A_Jump(128, "DeathB")
    SARG I 8
    SARG J 8 A_Scream
    SARG K 4 //A_SpawnDebris ("BloodSpotSilent")
    SARG L 4 A_NoBlocking
    SARG M 4 A_SpawnDebris ("BloodSpotSilent")
    //SARG M 0 A_SpawnDebris ("BloodSpotSilent")
    SARG N -1
    Stop
  DeathB:
	SAR8 I 8
	SAR8 J 8 A_Scream
	SAR8 K 4 //A_SpawnDebris ("BloodSpotSilent")
	SAR8 L 4 A_NoBlocking
	SAR8 M 4 A_SpawnDebris ("BloodSpotSilent")
    //SARG M 0 A_SpawnDebris ("BloodSpotSilent")
	SAR8 N -1
	Stop
  Death.Rocket:
    sarg H 0 A_NoBlocking
    sarg H 0 A_SpawnItemEx ("DemonRagdoll", 0,0,0, momx*1.7,momy*1.7,(momz*1.5)+8, 0, SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION) 
	Stop
  Raise:
    SARG N 5
    SARG MLKJI 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
  }
}
