ACTOR ExplosiveSSG : Weapon
{
  Inventory.PickupMessage "You got the Explosive Super Shotgun!"
  Inventory.PickupSound "weapons/pickupssg"
  Weapon.PreferredSkin "DoubleBarrelSG-Marine"
  Weapon.KickBack 100
  Weapon.AmmoUse 0
  Weapon.AmmoGive 0
  Weapon.AmmoGive2 8
  Weapon.AmmoType "ExpSSGShell"
  Weapon.AmmoType2 "NewShell"
  Scale 0.9
  +Weapon.Ammo_Optional
  +Weapon.NoAlert
  Tag "Explosive Super Shotgun"
  States
  {
  Spawn:
	3GN2 A -1
	Stop
  Deselect:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	3HD2 EDCBA 1
  DeselectLoop:
	TNT1 A 0 A_Lower
	TNT1 A 1 A_Lower
	Loop
  Select:
	TNT1 A 0 A_Raise
    Wait
  Ready:
    TNT1 A 0 A_PlayWeaponSound("weapons/pickupssg")
	3HD2 ABCDEFGHIJK 1
  ReadyLoop:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	3HT2 A 1 A_WeaponReady
	Loop
  Empty:
    3HT2 A 10 A_PlaySound("weapons/click")
	Goto ReadyLoop
  Fire:
	TNT1 A 0 A_JumpIfInventory("ExpSSGShell",2,"FireBoth")
	TNT1 A 0 A_JumpIfInventory("NewShell",1,"Reload")
	Goto Empty
  FireBoth:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	TNT1 A 0 A_TakeInventory("ExpSSGShell",2)
	TNT1 A 0 A_PlaySound("ExpSSG/Fire",7)
	TNT1 AAAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("PlayerExplosiveTracer",Random(-8,8),0,0,0,0,frandom(-4,4))
	3HT2 C 1 Bright A_FireBullets(8,6,20,Random(5,7),"ModdedBulletPuff")
	3HT2 CDDEE 1 Bright
	3HT2 B 1 Offset(0,52)
	3HT2 B 1 Offset(0,55)
	3HT2 B 1 Offset(0,54)
	3HT2 A 1 Offset(0,49)
	3HT2 A 1 Offset(0,44)
	3HT2 A 1 Offset(0,38)
  SSGReloadCheck:
  	TNT1 A 0 A_JumpIfInventory("NewShell",2,2)
	3HT2 A 2
	Goto ReadyLoop
	TNT1 A 0
	Goto ReloadBoth+1
  AltFire:
    TNT1 A 0 A_JumpIfInventory("ExpSSGShell",2,"FireRight")
	TNT1 A 0 A_JumpIfInventory("ExpSSGShell",1,1)
	Goto Reload
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_TakeInventory("ExpSSGShell",1)
	TNT1 A 0 A_PlayWeaponSound("ExpSSG/Fire2")
	TNT1 AAAAAAAAA 0 A_FireCustomMissile("PlayerExplosiveTracer",Random(-4,4),0,0,0,0,frandom(-3,3))
	3HL2 C 1 BRIGHT A_FireBullets(4.0,3.0,10,Random(5,7),"ModdedBulletPuff")
	3HL2 CDD 1 BRIGHT 
	3HT2 B 1 Offset(1,40)
	3HT2 B 1 Offset(1,45)
	3HT2 B 1 Offset(2,48)
	3HT2 A 1 Offset(2,46)
	3HT2 A 1 Offset(1,44)
	3HT2 A 1 Offset(1,41)
	Goto ReadyLoop
  FireRight:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_TakeInventory("ExpSSGShell",1)
	TNT1 A 0 A_PlayWeaponSound("ExpSSG/Fire2")
	TNT1 AAAAAAAAA 0 A_FireCustomMissile("PlayerExplosiveTracer",Random(-4,4),0,0,0,0,frandom(-3,3))
	3HR2 C 1 BRIGHT A_FireBullets(4.0,3.0,10,Random(5,7),"ModdedBulletPuff")
	3HR2 CDD 1 BRIGHT 
	3HT2 A 1 Offset(-1,40)
	3HT2 A 1 Offset(-1,45)
	3HT2 A 1 Offset(-2,48)
	3HT2 A 1 Offset(-2,46)
	3HT2 A 1 Offset(-1,44)
	3HT2 A 1 Offset(-1,41)
	Goto ReadyLoop
  Reload:
	TNT1 A 0 A_JumpIfInventory("ExpSSGShell",1,"ReloadRight")	
	TNT1 A 0 A_JumpIfInventory("NewShell",2,"ReloadBoth")
	Goto Empty
  ReloadBoth:
    TNT1 A 0 A_JumpIfInventory("NewShell",2,1)
	Goto ReadyLoop
	3HT2 BFFGGHH 1
	3HT2 I 1 A_PlayWeaponSound("weapons/qsgopen")
	3HT2 II 1
	3HT2 XX 1
	TNT1 A 0 A_TakeInventory("NewShell",2,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("ExpSSGShell",2)
	3HT2 JJ 1
	3HT2 KK 1
	TNT1 AA 0 A_SpawnItemEx("SSGShellCasing",25,2,25,Random(-2,-4),Random(3,6),Random(3,6),0)
	3HT2 LLLL 1
	3HT2 MMNN 1
	3HT2 O 1 A_PlayWeaponSound("weapons/qsgshellslide")
	3HT2 OPP 1
	3HT2 QQ 1
	3HT2 RRSSTT 1
	3HT2 U 1 A_PlayWeaponSound("weapons/qsgshellslide")
	3HT2 UVVWWXX 1
	3HT2 Y 1 A_PlayWeaponSound("weapons/qsgclose")
	3HT2 YHHGGFFBB 1
	Goto ReadyLoop
  ReloadRight:
	3HT2 BFFGGHH 1
	3HT2 I 1 A_PlayWeaponSound("weapons/qsgopen")
	3HT2 II 1
	3HT2 XX 1
	3HT7 J 1
	3HT7 KK 1
	TNT1 A 0 A_SpawnItemEx("SSGShellCasing",25,2,25,Random(-2,-4),Random(3,6),Random(3,6),0)
	3HT7 LLLL 1
	3HT7 MMNN 1
	3HT7 O 1 A_PlayWeaponSound("weapons/qsgshellslide")
	3HT7 OPP 1
	TNT1 A 0 A_TakeInventory("NewShell",1,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("ExpSSGShell",1)
	3HT2 WWXX 1
	3HT2 Y 1 A_PlayWeaponSound("weapons/qsgclose")
	3HT2 YHHGGFFBB 1
	Goto ReadyLoop
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	3HD2 EDCBA 1
	TNT1 A 4
	HGRN ABC 1
	HGRN D 2
	HGRN EFG 1
	HGRN HI 2
	TNT1 A 15 A_PlayWeaponSound("weapons/hgrenadepin")
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1)
	HGNE A 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN J 1
	HGRN KLM 2
	HGRN NO 1
	TNT1 A 6
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,2)
    TNT1 A 0 A_TakeInventory("Hand Grenade",1)
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0
	3HD2 ABCDEFGHIJK 1
	Goto ReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	3HD2 EDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1		
	TNT1 A 0 A_TakeInventory("MineAmmo",1)	  
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0)
	MINE HI 1
	MINE JK 2
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,2)
    TNT1 A 0 A_TakeInventory("Land Mine",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0
	TNT1 A 5
	3HD2 ABCDEFGHIJK 1
	Goto ReadyLoop
	}
}

ACTOR ExpSSGShell : Ammo
{
Inventory.Amount 0
Inventory.MaxAmount 2
Ammo.BackpackAmount 0
Ammo.BackpackMaxAmount 2
Inventory.Icon "3GN2A0"
+IGNORESKILL
}