Actor SSTHellKnight : HellKnight replaces HellKnight
{
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

bloodtype "BaronBlood"//"Onegative"
Bloodcolor "00 FF 00"
dropitem "GreenArmor" 8 // formerly 2, then 4
  states
  {
    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
  Spawn:
    BOS2 AB 10 A_Look
    loop
  See:
    BOS2 AABBCCDD 3 A_Chase
    loop
  Melee:
  Missile:
    BOS2 EF 8 A_FaceTarget
    BOS2 G 8 A_BruisAttack  // See BaronBall
    goto See
  Pain:
    BOS2 H 2
    BOS2 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:
	//TNT1 A 0
	//Goto DeathC
    BOS2 I 0 A_Jump(128, "DeathB")
    BOS2 I 0 A_Jump(56, "DeathC")
    BOS2 I 7
    BOS2 J 7 A_Scream
    BOS2 K 7
    BOS2 L 7 A_NoBlocking
    BOS2 MN 7
    BOS2 O -1 A_BossDeath
    stop
  DeathB:
    BOS2 P 6
    BOS2 Q 6 A_Scream
    BOS2 R 6
    BOS2 S 6 A_NoBlocking
    BOS2 TU 6
    BOS2 V -1 A_BossDeath
    stop
  Death.Chainsaw:
  DeathC:
    BOS2 I 1
	//BOS2 O 0 A_SpawnDebris("HKTorso")
	NULL O 0 A_SpawnItemEx("HKTorso", 0,0,34, random(-4,4),random(-4,4),random(8,12), 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_TRANSFERTRANSLATION)
    BOS2 I 0 A_Scream
    BBO1 AAAABC 7
    BBO1 D 7 A_NoBlocking
    BBO1 D -1 A_BossDeath
    stop
  Death.Rocket:
    BOS2 I 1 A_NoBlocking
    TROO H 0 A_SpawnItemEx ("HKRagdoll", 0,0,34, momx*2,momy*2,4, 0, SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERTRANSLATION) 
    BOS2 I 0 //A_Scream
    BBO1 AAAABC 7
    BBO1 D 7
    BBO1 D -1 A_BossDeath
    stop
  Raise:
    BOS2 ONMLKJI 7
    goto See
  Pain.GreenPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 0,0,0)
	Goto See
  Pain.BluePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 1,0,0)
	Goto See
  Pain.RedPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 2,0,0)
	Goto See
  Pain.OrangePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 3,0,0)
	Goto See
  Pain.PurplePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 4,0,0)
	Goto See
  Pain.WhitePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 5,0,0)
	Goto See
  Pain.YellowPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 6,0,0)
	Goto See
  Pain.BlackPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 7,0,0)
	Goto See
  }
}

ACTOR HKTorso
{
  -RANDOMIZE
  +CORPSE
  -SOLID
  -SHOOTABLE
  +NOBLOCKMAP
  +CLIENTSIDEONLY
	+FORCEXYBILLBOARD
  bloodcolor "green"
  radius 8
  height 8
  health 1
  alpha 1.0
	+movewithsector
  States
  {
  Spawn:
    BTO1 A 0
    //BTO1 C 0 ThrustThingZ(0, random(16,24), 0, 0)
  Kufi:
    BTO1 A 1 A_SpawnItemEx("BetterBlood_BH",0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR|SXF_CLIENTSIDE)
	Loop
  Crash:
    BTO1 B 0 A_PlaySound ("hellknight/torsoland")
    BTO1 BBBBBBB 1 A_SpawnItemEx ("SuperDuperClientsideBloodSpotSpawner", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR|SXF_CLIENTSIDE)
	BTO1 C 7
    TNT1 A 0 //Thing_ChangeTID (0, 1330) 
    BTO1 DDD 350
  derp:
    BTO1 D 1 //a_fadeout(0.01)
	loop
    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
  }
}