Actor PioneerSpreadCannon : Weapon
{
  Obituary "%o was obliterated by %k's Spread Cannon!"
  Weapon.SelectionOrder 2500
  Weapon.AmmoUse 2
  Weapon.AmmoGive 8
  Weapon.AmmoType "Rocketammo"
  +Weapon.NoAutoFire
  +Weapon.NoAutoAim
  Inventory.PickupMessage "You got the Spread Cannon"
  Inventory.RestrictedTo "PioneerClass"
  tag "Spread Cannon"
  States
  {
  Ready:
    SPRD A 1 A_WeaponReady
    Loop
  Deselect:
  SPRD AA 0 A_Lower
    SPRD A 1 A_LoweR
    Loop
  Select:
    SPRD AA 0 A_Raise
	SPRD A 1 A_Raise
    Loop
  Fire:
    SPFD A 2 OFFSET(0,33) Bright A_GunFlash
    TNT1 A 0 A_PlayWeaponSound("SPRDFIR")
	SPFD B 0 A_GUNFLASH
    TNT1 A 0 A_FireCustomMissile("HellStormBomb1", Random(-9, 9), 0, 0, 0, 0, Random(-2, 6))
    TNT1 A 0 A_FireCustomMissile("HellStormBomb1", Random(-9, 9), 0, 0, 0, 0, Random(-2, 6))
    TNT1 A 0 A_FireCustomMissile("HellStormBomb2", Random(-9, 9), 0, 0, 0, 0, Random(-2, 6))
    TNT1 A 0 A_FireCustomMissile("HellStormBomb2", Random(-9, 9), 0, 0, 0, 0, Random(-2, 6))
    TNT1 A 0 A_FireCustomMissile("HellStormBomb3", Random(-9, 9), 0, 0, 0, 0, Random(-2, 6))
    TNT1 A 0 A_FireCustomMissile("HellStormBomb3", Random(-9, 9), 0, 0, 0, 0, Random(-2, 6))
    TNT1 A 0 A_FireCustomMissile("HellStormBomb4", Random(-9, 9), 0, 0, 0, 0, Random(-2, 6))
    SPFD B 2 OFFSET(0,35) Bright A_FireCustomMissile("HellStormBomb4", Random(-9, 9), 1, 0, 0, 0, Random(-2, 6))
    SPFD C 2 OFFSET(0,37) Bright
    SPFD D 2 OFFSET(0,34) Bright
	SPRD A 2 OFFSET(0,33) Bright
    Goto Ready
	  AltFire:
	PIPW CB 1 A_SpawnItemEx("SentryGunShadow", 35, 0, 4, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION|SXF_CLIENTSIDE)
  AltHold:
	TNT1 A 0 ACS_NamedExecute("SentryPlacing",0)
	PIPW A 1 A_SpawnItemEx("SentryGunShadow", 35, 0, 4, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION|SXF_CLIENTSIDE)
	TNT1 A 0 A_Refire("AltHold")
	TNT1 A 0 A_ChangeFlag(ISMONSTER,1)
	TNT1 A 0 A_SpawnItemEx("PioneerSentryGun", 35, 0, 4, 0, 0, 0, 0, SXF_SETMASTER|SXF_TRANSFERTRANSLATION)
	TNT1 A 0 A_ChangeFlag(ISMONSTER,0)
	PIPW BCDEFGHI 1
	TNT1 A 6
	Goto Ready
  Flash:
    TNT1 A 1
    Stop
  Spawn:
    HSTM A -1
    Stop
  }
}

Actor HellStormBomb1 : Rocket
{
  Radius 11
  Height 8
  Speed 50
  Damage 10
  Gravity 0.3
  Scale 0.5
  Projectile
  -NoGravity
  Decal RevenantScorch
  States
  {
  Spawn:
    PIMS A 1 Bright
    Loop
  Death:
    MISL B 0 Bright A_ChangeFlag("NoGravity", 1)
    MISL B 8 Bright A_Explode(52, 64, 1)
    MISL C 6 Bright
    MISL D 4 Bright
    Stop
  }
}

Actor HellStormBomb2 : HellStormBomb1
{
  Speed 45
  Gravity 0.28
}

Actor HellStormBomb3 : HellStormBomb1
{
  Speed 40
  Gravity 0.26
}

Actor HellStormBomb4 : HellStormBomb1
{
  Speed 35
  Gravity 0.24
}


