ACTOR SFortShotgun : Shotgun
{
  Weapon.SelectionOrder 800
  AttackSound "weapons/shotgf"
  Decal BulletChip
  Tag "Shotgun"
  DamageType "Bullet"
  +WEAPON.NOAUTOAIM
  +WEAPON.NOLMS
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
  States
  {
  Ready:
	//TNT1 A 0 A_JumpIfInventory("ShotgunReload",1,"FireReload")
    SHTG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
    Loop
  Deselect:
    SHTG A 0 A_Lower
    Loop
  Select:
    SHTG A 1 A_Raise
    Loop
  Fire:
  FireNormal:
	//TNT1 A 0 A_JumpIfInventory("ShotgunReload",1,"FireReload")
    //TNT1 A 0 A_GiveInventory("ShotgunReload")
	TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
    //SHTG A 3
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_FireBullets(0.0,0.0,1,12,"SFortBulletPuff",FBF_NORANDOM)
    TNT1 A 0 A_FireBullets(4.2,1.75,9,12,"SFortBulletPuff",FBF_NORANDOM|FBF_USEAMMO)
	SHTG A 2 Offset(0,38)
	SHTG A 2 Offset(0,35)
	SHTG A 3 Offset(0,33)
  FireReload:
    SHTG BC 5 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
	//TNT1 A 0 A_TakeInventory("ShotgunReload")
	TNT1 A 0 A_PlaySound("weapons/shotgr",CHAN_WEAPON)
    SHTG D 4 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
    SHTG CB 5 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
    SHTG A 6 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB) //3
    SHTG A 1 A_ReFire
    Goto Ready
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto FireNormal+2
  Flash:
    SHTF A 2 Bright A_Light2
    SHTF B 2 Bright A_Light2
	TNT1 A 3 Bright A_Light1
    Goto LightDone
  }
}

ACTOR SFortSuperShotgun : SuperShotgun
{
  AttackSound "weapons/sshotf"
  Decal BulletChip
  Tag "Super Shotgun"
  DamageType "Bullet"
  +WEAPON.NOAUTOAIM
  +WEAPON.NOLMS
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
  States
  {
  Ready:
	//TNT1 A 0 A_JumpIfInventory("SuperShotgunReload",1,"FireReload")
    SHT2 A 1 A_WeaponReady(WRF_ALLOWRELOAD)
    Loop
  Deselect:
    SHT2 A 0 A_Lower
    Loop
  Select:
    SHT2 A 1 A_Raise
    Loop
  Fire:
	//TNT1 A 0 A_JumpIfInventory("SuperShotgunReload",1,"FireReload")
    //TNT1 A 0 A_GiveInventory("SuperShotgunReload")
	TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
    //SHT2 A 3
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_FireBullets(0.0,0.0,1,12,"SFortBulletPuff",FBF_NORANDOM)
	TNT1 A 0 A_FireBullets(11.2,7.1,19,12,"SFortBulletPuff",FBF_NORANDOM|FBF_USEAMMO)
    SHT2 A 3 Offset(0,40)
    SHT2 A 2 Offset(0,36)
    SHT2 A 2 Offset(0,33)
	TNT1 A 0 A_CheckReload
  FireReload:
    SHT2 B 7 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
    SHT2 C 7 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
	TNT1 A 0 A_OpenShotgun2
    SHT2 D 7 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
    SHT2 E 7 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
	TNT1 A 0 //A_TakeInventory("SuperShotgunReload")
	TNT1 A 0 A_LoadShotgun2
    SHT2 F 7 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
    SHT2 G 6 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
	TNT1 A 0 A_CloseShotgun2
    SHT2 H 6 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
    SHT2 A 5 A_ReFire("Hold") //A_Refire
    Goto Ready
  Hold:
    SHT2 A 3
    Goto Fire
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire+2
  Flash:
    SHT2 J 3 Bright A_Light2
    SHT2 I 2 Bright A_Light2
	TNT1 A 2 Bright A_Light1
    Goto LightDone
  }
}

ACTOR SFortScatterPistol : Weapon
{
  Weapon.SelectionOrder 900
  Weapon.AmmoType "Shell"
  Weapon.AmmoUse 1
  Weapon.AmmoGive 8
  DamageType "Bullet"
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "You got the scatter pistol!"
  Tag "Scatter Pistol"
  Obituary "%o was peppered by %k's scatter pistol."
  AttackSound "weapons/scatterf"
  Decal BulletChip
  +WEAPON.NOAUTOAIM
  +WEAPON.NOLMS
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
  States
  {
  Spawn:
    SPPP A -1
	Stop
  Ready:
    //TNT1 A 0 A_JumpIfInventory("ScatterPistolCooldown",1,"NotReady")
    SPRP A 1 A_WeaponReady(WRF_ALLOWRELOAD)
	Loop
  NotReady:
    SPRP A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD)
	Goto Ready
  Select:
    SPRP A 0 A_Raise
    SPRP A 1 A_Raise
	Loop
  Deselect:
    SPRP A 0 A_Lower
	Loop
  Fire:
  FireNormal:
	//TNT1 A 0 A_JumpIfInventory("ScatterPistolCooldown",1,"Ready")
    //TNT1 A 0 A_GiveInventory("ScatterPistolCooldown")
	TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
	TNT1 A 0 A_PlaySound("weapons/scatterf",CHAN_WEAPON)
    //SPRP A 3
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	TNT1 A 0 A_FireBullets(0.0,0.0,1,12,"SFortBulletPuff",FBF_NORANDOM)
	TNT1 A 0 A_FireBullets(5.6,3.5,9,12,"SFortBulletPuff",FBF_NORANDOM|FBF_USEAMMO)
	TNT1 A 0 A_GunFlash
	SPRP B 2 Bright
	SPRP G 5
	SPRP CB 4 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
	SPRP A 9 //A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB) //6
	TNT1 A 0 A_Refire
	Goto Ready
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	Goto Fire+3
  Flash:
    SPRP FE 1 Bright A_Light1
	TNT1 A 2 A_Light1
	Goto LightDone
  }
}

ACTOR ShotgunReload : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR SuperShotgunReload : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR ScatterPistolCooldown : Powerup
{
	Powerup.Duration 24
}