
ACTOR SSTBloodDemon : BloodDemon replaces BloodDemon
{
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", 15

  SpawnID 156
  Health 300
  speed 15
  PainChance 60
  dropitem "SSTMaxHealthBonus" 32
  dropitem "SSTMaxHealthBonus" 32
  dropitem "SSTMaxHealthBonus" 16
  SEESOUND "monster/sg2sit" 
  ATTACKSOUND "monster/sg2atk" 
  DEATHSOUND "monster/sg2die"
  Obituary "$OB_BLOODDEMON_MELEE" // "%o was chomped on by a blood demon."
  States
  {
  Spawn:
    SAR2 AB 10 A_Look
    Loop
  See:
    SAR2 AABBCCDD 2 A_Chase
    Loop
  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:
    SAR2 H 0 A_Jump(128, "Pain2")
    SAR2 H 1
    SAR2 H 1 A_Pain
	Goto See
  Pain2:
    SAR2 X 0 A_Chase
    SAR2 X 0 A_FaceTarget
	SAR2 X 0 ThrustThingZ(0, random(4,12), 0, 1)
    SAR2 X 0 A_Recoil(-7)
    SAR2 X 2 A_Pain
    Goto See
  Melee:
    SAR2 EF 2 A_FaceTarget
    SAR2 G 8 A_SargAttack
    SAR2 FE 5 A_FaceTarget
	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:
    SAR2 I 8
    SAR2 J 8 A_Scream
    SAR2 K 4 A_SpawnDebris ("BloodSpotSilent")
    SAR2 L 4 A_NoBlocking
    SAR2 M 4 A_SpawnDebris ("BloodSpotSilent")
    //SAR2 MM 0 A_SpawnDebris ("BloodSpotSilent")
    SAR2 N -1
    Stop
  Death.Rocket:
    SAR2 H 0 A_NoBlocking
    sarg H 0 A_SpawnItemEx ("BloodDemonRagdoll", 0,0,0, momx*1.7,momy*1.7,(momz*1.5)+8, 0, SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION) 
	Stop
  Raise:
    SAR2 NMLKJI 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
  }
}
