ACTOR "NemesisQuadShotgun" : Weapon 
{
  Tag "Nemesis Quad Barrel Shotgun Shotgun"
  Weapon.PreferredSkin "QuadBarrelSG-Marine"
  Weapon.SelectionOrder 4450
  Weapon.KickBack 100
  Weapon.AmmoUse 0
  Weapon.AmmoGive 4
  Weapon.AmmoGive2 20
  Weapon.AmmoType "NemesisQuadShell"
  Weapon.AmmoType2 "NemesisShell"
  //Weapon.UpSound "LegendaryQuadShotgun/Up"
  Inventory.PickupMessage "Nemesis Quad Barrel Shotgun Shotgun. The great OOFinator."
  Inventory.PickupSound "weapons/pickupqsg"
  Obituary "%o was a victim to %k's deathmatch addiction."
  Decal LegBulletChip
  +WEAPON.AMMO_OPTIONAL
  +WEAPON.NOALERT
  States
  {
  Spawn:
    NQW2 "Z" -1
    Stop
  Ready:
	NQR2 HG 1
 	NQR2 FE 1
 	NQR2 D 2
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Up")
 	NQR2 C 1
 	NQR2 BA 1
    NQ09 H 1
    NQ09 A 2
  ReadyLoop:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    NQ09 A 1 A_WeaponReady
    Loop
  Deselect: 
    TNT1 A 0 A_Lower
    NQ09 A 1 A_Lower
    Loop
  Select:
    TNT1 A 0 A_Raise
    Wait
  Fire:
	TNT1 A 0 A_JumpIfInventory("NemesisQuadShell",4,"QuadFire")
	TNT1 A 0 A_JumpIfInventory("NemesisShell",2,"Reload")
	Goto Empty
  QuadFire:
 	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"QuadFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"QuadFireNoSpeed")
    TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"QuadFireNoSpeed")
	TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/QuadFire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(12)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(20,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisQuadShell",4)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",Random(8,-8),0,0,Random(10,-10))
    NQ09 B 2 Bright A_FireBullets(11.8,7.3,48,Random(30,35),"NemesisASGBallPlayer")
    NQ09 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(20,5,0,1,0)
	NQ09 D 2
	NQ09 E 2
	NQ09 F 1
	NQ09 G 1
    NQ09 A 4
	Goto QuadReloadCheck
  QuadFireNoSpeed:
	TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/QuadFire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(12)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(20,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisQuadShell",4)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",Random(8,-8),0,0,Random(10,-10))
    NQ09 B 2 Bright A_FireBullets(11.8,7.3,48,Random(30,35),"NemesisASGBallPlayer")
    NQ09 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(20,5,0,1,0)
	NQ09 D 4
	NQ09 E 4
	NQ09 F 2
	NQ09 G 2
    NQ09 A 8
	Goto QuadReloadCheck
  QuadReloadCheck:
  	TNT1 A 0 A_JumpIfInventory("NemesisShell",4,2)
	Goto ReadyLoop
	TNT1 A 0
	Goto ReloadFourShells
  AltFire:
	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"AltFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"AltFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"AltFireNoSpeed")
    TNT1 A 0 A_JumpIfInventory("NemesisQuadShell",4,"FireLeft")
	TNT1 A 0 A_JumpIfInventory("NemesisQuadShell",2,1)
	Goto Reload
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisQuadShell",2)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",Random(8,-8),0,0,Random(10,-10))
    NQ09 B 2 Bright A_FireBullets(11.8,7.3,24,Random(30,35),"NemesisASGBallPlayer")
    NQ09 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	NQ09 D 2
	NQ09 E 2
	NQ09 F 1
	NQ09 G 1
    NQ09 A 6
    Goto ReadyLoop
  AltFireNoSpeed:
    TNT1 A 0 A_JumpIfInventory("NemesisQuadShell",4,"FireLeft")
	TNT1 A 0 A_JumpIfInventory("NemesisQuadShell",2,1)
	Goto Reload
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisQuadShell",2)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",Random(8,-8),0,0,Random(10,-10))
    NQ09 B 4 Bright A_FireBullets(11.8,7.3,24,Random(30,35),"NemesisASGBallPlayer")
    NQ09 C 4 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	NQ09 D 4
	NQ09 E 4
	NQ09 F 2
	NQ09 G 2
    NQ09 A 12
    Goto ReadyLoop
  FireLeft:
	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"FireLeftNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"FireLeftNoSpeed")
	TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"FireLeftNoSpeed")
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisQuadShell",2)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",Random(8,-8),0,0,Random(10,-10))
    NQ09 B 2 Bright A_FireBullets(11.8,7.3,24,Random(30,35),"NemesisASGBallPlayer")
    NQ09 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	NQ09 D 2
	NQ09 E 2
	NQ09 F 1
	NQ09 G 1
    NQ09 A 4
    Goto ReadyLoop
  FireLeftNoSpeed:
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisQuadShell",2)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",Random(8,-8),0,0,Random(10,-10))
    NQ09 B 4 Bright A_FireBullets(11.8,7.3,24,Random(30,35),"NemesisASGBallPlayer")
    NQ09 C 4 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	NQ09 D 4
	NQ09 E 4
	NQ09 F 2
	NQ09 G 2
    NQ09 A 8
    Goto ReadyLoop
  Empty:
    NQ09 A 10 A_PlayWeaponSound("weapons/click")
	TNT1 A 0 A_JumpIfInventory("NemesisShell",4,"ReloadFourShells")
	Goto ReadyLoop
  Reload:
	TNT1 A 0 A_JumpIfInventory("NemesisQuadShell",2,"ReloadTwoShells")
	TNT1 A 0 A_JumpIfInventory("NemesisShell",4,"ReloadFourShells")
	Goto Empty	
  ReloadFourShells:
	//TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"ReloadFourShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"ReloadFourShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"ReloadFourShellsNoSpeed")
	NQ09 H 2
 	NQR2 A 1
 	NQR2 B 1
 	NQR2 C 2
 	NQR2 D 6
 	NQR2 E 2
 	NQR2 F 1
 	NQR2 G 1
 	NQR2 H 1
 	TNT1 A 2
	TNT1 AAAA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	NQR2 ABCD 1
	NQR2 D 6
	NQR2 ABCD 2
	NQR2 EFGH 1
	TNT1 A 0 A_TakeInventory("NemesisShell",2)
	TNT1 A 0 A_GiveInventory("NemesisQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")
	NQR2 A 6
	NQR2 ABCD 2
	NQR2 EFGHI 1
	TNT1 A 0 A_TakeInventory("NemesisShell",2)
	TNT1 A 0 A_GiveInventory("NemesisQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 12
	NQR2 HG 1
 	NQR2 FE 1
 	NQR2 D 2
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	NQR2 C 1
 	NQR2 BA 1
    NQ09 H 2
    NQ09 A 2
    Goto ReadyLoop
  ReloadFourShellsNoSpeed:
	NQ09 H 4
 	NQR2 A 2
 	NQR2 B 2
 	NQR2 C 4
 	NQR2 D 12
 	NQR2 E 4
 	NQR2 F 2
 	NQR2 G 2
 	NQR2 H 2
 	TNT1 A 4
	TNT1 AAAA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	NQR2 ABCD 2
	NQR2 D 12
	NQR2 ABCD 4
	NQR2 EFGH 2
	TNT1 A 0 A_TakeInventory("NemesisShell",2)
	TNT1 A 0 A_GiveInventory("NemesisQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")
	NQR2 A 12
	NQR2 ABCD 4
	NQR2 EFGHI 2
	TNT1 A 0 A_TakeInventory("NemesisShell",2)
	TNT1 A 0 A_GiveInventory("NemesisQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 24
	NQR2 HG 2
 	NQR2 FE 2
 	NQR2 D 4
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	NQR2 C 2
 	NQR2 BA 2
    NQ09 H 4
    NQ09 A 4
    Goto ReadyLoop
  ReloadTwoShells:
	//TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"ReloadTwoShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"ReloadTwoShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"ReloadTwoShellsNoSpeed")
    TNT1 A 0 A_JumpIfInventory("NemesisShell",2,1)
	Goto ReadyLoop
	NQ09 H 2
 	NQR2 A 1
 	NQR2 B 1
 	NQR2 C 2
 	NQR2 D 6
 	NQR2 E 2
 	NQR2 F 1
 	NQR2 G 1
 	NQR2 H 1
 	TNT1 A 2
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	NQR2 ABCD 2
	NQR2 EFGHI 1
	TNT1 A 0 A_TakeInventory("NemesisShell",2)
	TNT1 A 0 A_GiveInventory("NemesisQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 8
	NQR2 HG 1
 	NQR2 FE 1
 	NQR2 D 1
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	NQR2 C 1
 	NQR2 BA 1
    NQ09 H 1
    NQ09 A 2
	Goto ReadyLoop
  ReloadTwoShellsNoSpeed:
    TNT1 A 0 A_JumpIfInventory("NemesisShell",2,1)
	Goto ReadyLoop
	NQ09 H 4
 	NQR2 A 2
 	NQR2 B 2
 	NQR2 C 4
 	NQR2 D 12
 	NQR2 E 4
 	NQR2 F 2
 	NQR2 G 2
 	NQR2 H 2
 	TNT1 A 4
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	NQR2 ABCD 4
	NQR2 EFGHI 2
	TNT1 A 0 A_TakeInventory("NemesisShell",2)
	TNT1 A 0 A_GiveInventory("NemesisQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 16
	NQR2 HG 2
 	NQR2 FE 2
 	NQR2 D 2
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	NQR2 C 2
 	NQR2 BA 2
    NQ09 H 2
    NQ09 A 4
	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") 
	NQR2 ABCDEFGH 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,TIF_NOTAKEINFINITE)
	HGNE A 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0,false)
	HGRN J 1
	HGRN KLM 2
	HGRN "NO" 1
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready
  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") 
	NQR2 ABCDEFGH 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 JK 2
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready
    }
}

ACTOR NemesisQuadShell : Ammo
{
Inventory.Amount 0
Inventory.MaxAmount 4
Ammo.BackpackAmount 0
Ammo.BackpackMaxAmount 4
Inventory.Icon "NQW2Z0"
+IGNORESKILL
}