ACTOR SSTHectebus : Hectebus replaces Hectebus
{
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", 3

	SeeSound "hectebus/sight"
	PainSound "hectebus/pain"
	DeathSound "hectebus/death"
	activesound "hectebus/active"
  SpawnID 158
  Health 1200
  PainChance 12
  BloodColor "73 00 00"
  Obituary "$OB_HECTEBUS" // "%o was cremated by a hectebus."
  dropitem "Medikit" 32
  Scale 1.15
  +QUICKTORETALIATE
  +DONTHURTSPECIES
  +BOSS
  States
  {
  Spawn:
    HECT AB 15 A_Look
    Loop
  See:
    HECT AABBCCDDEEFF 4 A_Chase
    Loop
  Pain:
    HECT J 3
    HECT J 3 A_Pain
    Goto See
  Missile:
    //These Next 2 states replace A_FatRaise and A_HectRaise
    HECT G 0 A_PlaySoundEx("Hectebus/Attack", "SoundSlot6", 0)
	HECT G 0 A_JumpIfCloser(304, "Stomp") //384
  Missile2:
    HECT G 20 A_FaceTarget
    HECT H 0 A_CustomMissile("HectShot",28,0,0,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,5.625,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,11.25,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,16.875,1)
    HECT H 10 Bright
    HECT IG 5 A_FaceTarget
    HECT H 0 A_CustomMissile("HectShot",28,0,0,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,-5.625,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,-11.25,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,-16.875,1)
    HECT H 10 Bright
    HECT IG 5 A_FaceTarget
    HECT H 0 A_CustomMissile("HectShot",28,0,-11.25,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,-5.625,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,0,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,5.625,1)
    HECT H 0 A_CustomMissile("HectShot",28,0,11.25,1)
    HECT H 10 Bright
    HECT IG 5 A_FaceTarget
    Goto See
  Stomp:
    HECT G 0
	HECT G 0 A_Jump(32, "Missile2")
    HECT G 0 A_FaceTarget
  Stomp2:
    HECT GI 5
    HECT G 0 A_PlaySoundEx("Hectebus/Stomp", "SoundSlot5", 0)
    HECT G 0 A_PlaySoundEx("Hectebus/Stomp", "SoundSlot7", 0)
    HECT G 0 A_CustomMissile("HectQuake",8,0,0,1)
	HECT D 16 Radius_Quake (random(3,6), random(8,14), 6, 9, 0)
    HECT GI 5
    HECT G 0 A_PlaySoundEx("Hectebus/Stomp", "SoundSlot5", 0)
    HECT G 0 A_PlaySoundEx("Hectebus/Stomp", "SoundSlot7", 0)
    HECT G 0 A_CustomMissile("HectQuake",8,0,0,1)
	HECT A 16 Radius_Quake (random(3,6), random(8,14), 6, 9, 0)
	HECT G 0 A_Jump(72, "Stomp2")
	Goto See
  Death:
    HECT K 6 A_BossDeath
    HECT L 6 A_Scream
    HECT M 6 A_NoBlocking
    HECT NOPQRS 6
    HECT T -1
    Stop
  Raise:
    HECT RQPONMLK 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 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 HectQuake
{
  Speed 1
  radius 128
  height 1
  Damage 0
  damagetype "Rocket"
  renderstyle add
  Alpha 1.0
  scale 3
  +NODAMAGETHRUST 
  +THRUACTORS
  +NODROPOFF
  gravity 5
  Obituary "%o was stomped by a hectebus."
  States
  {
  Spawn:
    PLSE A 1 BRIGHT
    PLSE B 1 BRIGHT A_Explode(random(2,14),320,0)
  //Death:
    PLSE CCDDEEE 1 BRIGHT A_FadeOut(0.1)
    Stop
  }
}
ACTOR SSTHectShot : FatShot replaces HectShot
{
  Speed 22
  Damage 12
  damagetype "fire"
  alpha 0.33
	+FORCEXYBILLBOARD
  States
  {
  Spawn:
    HECF AAAABBBB 1 bright A_SpawnItemEx("hectshottrail", random(-2,2), random(-2,2), random(-2,2), random(-1,1), random(-1,1), random(-1,1), 0, 160)
    Loop
  Death:
    HECF C 4 Bright
    HECF D 6 Bright A_SpawnItemEx("hectshotflare", 0,0,0, 0,0,0, 0, 160)
    HECF E 8 Bright
    Stop
  }
}


ACTOR hectshottrail
{
	+NOTELEPORT
  //Translation "112:127=212:223"
   Radius 1
   Height 1
   Speed 0
   Damage 0
   PROJECTILE
	+FORCEXYBILLBOARD
   RENDERSTYLE ADD
   ALPHA 0.19
   Scale 0.25
   States
   {
   Spawn:
    PSNE A 0
    	TNT1 A 0 Thing_ChangeTID (0, 1330) 
    //PSNE A 0 A_CheckSight("Spawn2") 
      PSNE HHHIIIJJJKKKLLLMMM 1 Bright A_Fadeout(0.01)
      Stop
	Spawn2:
		NULL A 0
		stop
   }
}
