
ACTOR SSGShell : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 2
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 2
  +INVENTORY.IGNORESKILL
}

ACTOR SSG : DefaultDukeWeapon Replaces SuperShotgun 19337
{
  Weapon.SelectionOrder 18
  Weapon.AmmoUse1 0
  Weapon.AmmoGive1 10
  Weapon.AmmoType1 "ShotgunAmmo"
  Weapon.AmmoUse2 0
  Weapon.AmmoGive2 0
  Weapon.AmmoType2 "SSGShell"
  Obituary "%o was utterley splattered by %k's Super Shotgun."
  Inventory.PickupMessage "$D3D_SSG"
  Inventory.PickupSound "misc/backpack"
  weapon.upsound "SuperShotGun/Load"
  Scale 0.7
  decal bulletchip
  +NOALERT
  +WEAPON.NOAUTOFIRE
  Tag " "
  States
  {
  RReady2:
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" A 0 A_JumpIfInventory("SSGShell",1,1)
    Goto Reload
    "####" A 0 A_WeaponReady
    "####" "#" 0 A_JumpIfInventory("Reloading",1,"Reload")
    "####" A 1 A_WeaponReady
    goto RReady
  NoAmmo:
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" A 5 A_WeaponReady(WRF_NOFIRE)
    "####" A 5 A_WeaponReady
    "####" "#" 0 A_JumpIfInventory("Reloading",1,"Reload")
    "####" "#" 0 A_JumpIfInventory("SSGShell",1,"RReady")
    "####" "#" 0 A_JumpIfInventory("ShotgunAmmo",1,"Reload")
    Loop
  Deselect:
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    goto Super::Deselect
  Select:
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    goto Super::Select
  Fire:
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" A 1
    "####" "#" 0 A_JumpIfInventory("SSGShell", 1,2)
    "####" A 10 A_PlaySound("DRYFIRE", 1)
    Goto RReady
    "####" "#" 0 A_JumpIfInventory("SSGShell", 2,1)
    Goto AltFire
    "####" AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 3, 2, 0, 0)
    "####" AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 4, 2, 0, 0)
    "####" AA 0 A_FireCustomMissile("MuzzleFlashMedium",0,0,0)
    "####" "#" 0 A_FireBullets (7.2, 5.2, 20, 6, "SSGPuff")
    "####" AAAAA 0 A_FireCustomMissile("DecorativeTracer", random[RIDFX](-3,3), 0, 12, -12, 0, random[RIDFX](-3,3))
    "####" AAAAA 0 A_FireCustomMissile("DecorativeTracer", random[RIDFX](-3,3), 0, 16, -12, 0, random[RIDFX](-3,3))
    "####" "#" 0 A_PlaySound("SuperShotgun/Shoot", 1)
    "####" "#" 0 A_FireCustomMissile("MonsterAlert",0,0,0)
    "####" "#" 0 A_ZoomFactorD3D("d3d_rssg",0.75)
    "####" BC 1 BRIGHT
    "####" "#" 0 A_ZoomFactor(1.0)
    DBSH A 0 A_ReplaceSprite("d3d_altssg","DBAH")
    "####" R 3 A_SetPitchD3D ("d3d_rssg",-4)
    "####" S 1 A_SetPitchD3D ("d3d_rssg",1.6)
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" A 1 A_SetPitchD3D ("d3d_rssg",1.2)
    "####" A 1 A_SetPitchD3D ("d3d_rssg",0.8)
    "####" A 1 A_SetPitchD3D ("d3d_rssg",0.4)
    "####" "#" 0 A_TakeInventory("SSGShell", 2)
    "####" DEFEDG 1
    "####" "#" 0 A_PlaySound("SuperShotgun/Reload1")
    "####" AA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,12,-2)
    "####" HHIIJJKKLL 1
    Goto Reload
  AltFire:
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" A 1
    "####" "#" 0 A_JumpIfInventory("SSGShell", 1,2)
    "####" A 10 A_PlaySound("DRYFIRE", 1)
    Goto RReady
    "####" "#" 0 A_JumpIfInventory("SSGShell", 2,1)
    Goto AltFire2
    "####" A 1
    "####" AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 4, 2, 0, 0)
    "####" "#" 0 A_FireCustomMissile("MuzzleFlashMedium",0,0,0)
    "####" "#" 0 A_FireBullets (6.2, 4.2, 10, 6, "Shotgunpuff",0)
    "####" AAAAA 0 A_FireCustomMissile("DecorativeTracer", random[RIDFX](-3,3), 0, 16, -12, 0, random[RIDFX](-3,3))
    "####" "#" 0 A_PlaySound("SuperShotGun/ShootSingle", 1)
    "####" "#" 0 A_FireCustomMissile("MonsterAlert",0,0,0)
    "####" "#" 0 A_ZoomFactorD3D("d3d_rssg",0.90)
    DBSH A 0 A_ReplaceSprite("d3d_altssg","DBAH")
    "####" P 2 BRIGHT
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" "#" 0 A_ZoomFactor(1.0)
    DBSH A 0 A_ReplaceSprite("d3d_altssg","DBAH")
    "####" R 3 A_SetPitchD3D ("d3d_rssg",-2)
    "####" S 1 A_SetPitchD3D ("d3d_rssg",0.9)
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" A 1 A_SetPitchD3D ("d3d_rssg",0.7)
    "####" A 1 A_SetPitchD3D ("d3d_rssg",0.4)
    "####" "#" 0 A_TakeInventory("SSGShell", 1)
    "####" "#" 0 A_ForceReFire
    Goto RReady
  AltFire2:
    "####" AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 3, 2, 0, 0)
    "####" "#" 0 A_FireCustomMissile("MuzzleFlashMedium",0,0,0)
    "####" "#" 0 A_FireBullets (6.2, 4.2, 10, 6, "Shotgunpuff",0)
    "####" AAAAA 0 A_FireCustomMissile("DecorativeTracer", random[RIDFX](-3,3), 0, 12, -12, 0, random[RIDFX](-3,3))
    "####" "#" 0 A_PlaySound("SuperShotGun/ShootSingle", 1)
    "####" "#" 0 A_FireCustomMissile("MonsterAlert",0,0,0)
    "####" "#" 0 A_ZoomFactorD3D("d3d_rssg",0.90)
    DBSH A 0 A_ReplaceSprite("d3d_altssg","DBAH")
    "####" Q 2 BRIGHT
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" "#" 0 A_ZoomFactor(1.0)
    DBSH A 0 A_ReplaceSprite("d3d_altssg","DBAH")
    "####" R 3 A_SetPitchD3D ("d3d_rssg",-2)
    "####" S 1 A_SetPitchD3D ("d3d_rssg",0.9)
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" A 1 A_SetPitchD3D ("d3d_rssg",0.7)
    "####" A 1 A_SetPitchD3D ("d3d_rssg",0.4)
    "####" "#" 0 A_TakeInventory("SSGShell", 1)
    "####" DEFEDG 1
    "####" "#" 0 A_PlaySound("SuperShotgun/Reload1")
    "####" AA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,12,-2)
    "####" HHIIJJKKLL 1
    Goto Reload
   Reload:
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" "#" 0 A_Takeinventory("Reloading",1)
    "####" "#" 0 A_JumpIfInventory("SSGShell",2,"Reloadend")
    "####" "#" 0 A_JumpIfInventory("ShotgunAmmo",1,1)
    Goto NoAmmo
    "####" "#" 0 A_JumpIfInventory("SSGShell", 1,"Reload2")
    "####" "#" 0 A_Takeinventory("Reloading",1)
    "####" MMNNOO 1
    "####" "#" 0 A_playsound("SuperShotgun/Load", 4)
    "####" "#" 0 A_TakeInventory("Waiting",10)
    "####" PPQQRRSSTTUUVV 1
    "####" "#" 0 A_PlaySound("SuperShotgun/Reload2")
    "####" WWDDGGXXAA 1
    Goto InsertBullets
   Reload2:
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" "#" 0 A_Takeinventory("Reloading",1)
    "####" DEFEDG 1
    "####" "#" 0 A_PlaySound("SuperShotgun/Reload1")
    "####" "#" 0 A_FireCustomMissile("SSGCaseSpawner",0,0,12,-2)
    DBSH A 0 A_ReplaceSprite("d3d_altssg","DBAH")
    "####" HHIIJJKKLL 1
    "####" MMNNOO 1
    DBSG A 0 A_ReplaceSprite("d3d_altssg","DBAG")
    "####" "#" 0 A_playsound("SuperShotgun/Load", 4)
    "####" "#" 0 A_TakeInventory("Waiting",10)
    "####" PPQQRRSSTTUUVV 1
    "####" "#" 0 A_PlaySound("SuperShotgun/Reload2")
    "####" WWDDGGXXAA 1
    Goto InsertBullets
  InsertBullets:
    "####" "#" 0 A_JumpIfInventory("SSGShell",2,"Reloadend")
    "####" "#" 0 A_JumpIfInventory("ShotgunAmmo",1,1)
    Goto RReady2+3
    "####" "#" 0 A_Giveinventory("SSGShell",1)
    "####" "#" 0 A_Takeinventory("ShotgunAmmo",1)
    Goto InsertBullets
  Reloadend:
    "####" "#" 0 A_Takeinventory("Reloading",1)
    "####" "#" 0 A_ForceReFire
    Goto RReady
  Spawn:
    DBS2 A 0 NoDelay A_ReplaceSprite("d3d_altssg","DBA2",true,0.53)
    "####" A -1
    Stop
  Dummy:
    DBA2 A 0
    DBAG ABCDEFGHIJKLMNOPQRSTUVWX 0
    DBAH ABCDEFGHIJKLMNOPQRSTUVWX 0
    TNT1 A 1
    Stop
  }
}