ACTOR ExplosiveQuadShotgun : Weapon
{
  Inventory.PickupMessage "You got the Explosive Quad Shotgun!"
  Inventory.PickupSound "weapons/pickupssg"
  Weapon.PreferredSkin "DoubleBarrelSG-Marine"
  Weapon.KickBack 100
  Weapon.AmmoUse 0
  Weapon.AmmoGive 0
  Weapon.AmmoGive2 8
  Weapon.AmmoType "ExpQuadShell"
  Weapon.AmmoType2 "NewShell"
  Scale 0.9
  +Weapon.Ammo_Optional
  +Weapon.NoAlert
  Tag "Explosive Quad 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")
	EQU5 A 1 A_WeaponReady
	Loop
  Empty:
    3HT2 A 10 A_PlaySound("weapons/click")
	Goto ReadyLoop
  Fire:
	TNT1 A 0 A_JumpIfInventory("ExpQuadShell",4,"FireBoth")
	TNT1 A 0 A_JumpIfInventory("NewShell",4,"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("ExpQuadShell",4)
	TNT1 A 0 A_PlaySound("ExpSSG/Fire",7)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("PlayerExplosiveTracer",Random(-8,8),0,0,0,0,frandom(-4,4))
	EQU5 B 1 Bright A_FireBullets(8,6,40,Random(5,7),"ModdedBulletPuff")
	EQU5 BCCDDEEEFFF 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",4,2)
	3HT2 A 2
	Goto ReadyLoop
	TNT1 A 0
	Goto ReloadBoth+1
  AltFire:
    TNT1 A 0 A_JumpIfInventory("ExpQuadShell",4,"FireRight")
	TNT1 A 0 A_JumpIfInventory("ExpQuadShell",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("ExpQuadShell",2)
	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("ExpQuadShell",2)
	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("ExpQuadShell",2,"ReloadRight")	
	TNT1 A 0 A_JumpIfInventory("NewShell",4,"ReloadBoth")
	Goto Empty
  ReloadBoth:
    TNT1 A 0 A_JumpIfInventory("NewShell",4,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",4,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("ExpQuadShell",4)
	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",2,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("ExpQuadShell",2)
	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 ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	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,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	3HD2 ABCDEFGHIJK 1
	Goto ReadyLoop
	}
}

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