// --------------------------------------------------------------------------
//
//	Shotgun
//
// --------------------------------------------------------------------------

ACTOR U_Shotgun : BaseWeapon
{
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive1 2
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "AmmoShell"
	Weapon.AmmoType2 "U_ShotgunAmmo"
	Weapon.SelectionOrder 1300
	-WEAPON.CHEATNOTWEAPON
	Inventory.PickupSound "weapons/sgpump"
	Inventory.PickupMessage "$GOTSHOTGUN"
	AttackSound "None"
	Obituary "$OB_MPSHOTGUN"
	Scale 0.9
	tag "Shotgun"
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128,2)
		SHOD I -1
		Stop
		SHOD J -1
		Stop

	Select:
		TNT1 A 0 A_JumpIfInventory("IsPlayingAsPurist",1,"PuristGun")
		TNT1 A 0 A_Giveinventory("ShotgunSelected",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_TakeInventory("TossGrenade",1)
		TNT1 A 0 A_Takeinventory("WeapSpecial",1)
		TNT1 A 0 A_Takeinventory("SwitchFlashlight",1)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_Takeinventory("IdleCounter",200)
		TNT1 A 0 ACS_ExecuteAlways(1022,0,0,0,0)
		TNT1 A 0 ACS_NamedExecuteAlways("TE_WeaponSprites")
		TNT1 A 3
		TNT1 A 0 A_Raise
		Wait

	Deselect:
		TNT1 A 0 A_GunFlash("StopShake")
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetCrosshair(0)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,8)
		SHOS PQRSTU 1
		TNT1 A 0 A_Jump(256,7)
		SHUS FEDCBA 1
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("UseShotgunStrap",1)
		TNT1 A 0 A_Takeinventory("ShotgunSelected",1)
		TNT1 A 0 A_TakeInventory("BD21graphics",1)
		TNT1 A 0 A_Lower
		Wait

	Ready:
		//TNT1 A 0 A_JumpIfInventory("NeverSelectedShotgun",1,"WarmUp")
		TNT1 A 0 A_JumpIfInventory("GoFatality",1,"Steady")
		TNT1 A 0 A_PlaySound("weapons/sgpump")
	Ready1:
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,9)
		SHOS ABCDEF 1
		SHOP A 1
		TNT1 A 0 A_Jump(256,8)
		SHUS ABCDEF 1
		SHUP A 1
		TNT1 A 0 A_GiveInventory("Pumping",1)
		Goto ShakeRight
	Ready2:
		TNT1 A 0 //A_GunFlash
	Ready3:
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"ReadyZoom")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("Taunting",1,"TauntR")
		TNT1 A 0 A_JumpIfInventory("Salute1",1,"Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2",1,"Salute")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling",1,"Shake")
		TNT1 A 0 A_JumpIfInventory("IdleCounter",200,"PlayerIsIdle")
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,2)
		SHOP A 1 A_WeaponReady
		Loop
		SHUP A 1 A_WeaponReady
		Loop

	ReadyZoom:
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"AltFire")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Taunting",1,"AltFire")
		TNT1 A 0 A_JumpIfInventory("Salute1",1,"AltFire")
		TNT1 A 0 A_JumpIfInventory("Salute2",1,"AltFire")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"AltFire")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"AltFire")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling",1,"ShakeAiming")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(1029)==1,4)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,2)
		SHOA F 1 A_WeaponReady
		Loop
		SHUA F 1 A_WeaponReady
		Loop
		
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",1,7)
		TNT1 A 0 A_JumpIfInventory("AmmoShell",1,6)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,3)
		SHOA F 1 A_WeaponReady(WRF_NOSECONDARY)
		TNT1 A 0 A_JumpIfInventory("FiredSecondary",1,"ReadyZoom")
		Goto ZoomOut
		SHUA F 1 A_WeaponReady(WRF_NOSECONDARY)
		TNT1 A 0 A_JumpIfInventory("FiredSecondary",1,"ReadyZoom")
		Goto ZoomOut
		
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,4)
		TNT1 A 0 A_WeaponReady(WRF_NOSECONDARY)
		SHOA F 1 A_JumpIfInventory("FiredPrimary",1,"Fire")
		TNT1 A 0 A_JumpIfInventory("FiredSecondary",1,"ReadyZoom")
		Goto ZoomOut
		TNT1 A 0 A_WeaponReady(WRF_NOSECONDARY)
		SHUA F 1 A_JumpIfInventory("FiredPrimary",1,"Fire")
		TNT1 A 0 A_JumpIfInventory("FiredSecondary",1,"ReadyZoom")
		Goto ZoomOut

// --------------------------------------------------------------------------
//
//	Shaky Stuff
//
// --------------------------------------------------------------------------

	Shake:
		TNT1 A 0 //A_Print("Shake!")
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_GiveInventory("ShakeMore",1)
		TNT1 A 0 A_Jump(256,"ShakeLeft","ShakeRight")

	ShakeLeft:
		TNT1 A 0 A_JumpIfInventory("IsShakin",1,"Ready3")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap",1,1)
		Goto Ready3
		TNT1 A 0 A_GiveInventory("IsShakin",1)
		TNT1 A 0 A_GunFlash("LeftShake")
		Goto Ready3
		
	ShakeRight:
		TNT1 A 0 A_JumpIfInventory("IsShakin",1,"Ready3")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap",1,1)
		Goto Ready3
		TNT1 A 0 A_GiveInventory("IsShakin",1)
		TNT1 A 0 A_GunFlash("RightShake")
		Goto Ready3

	ShakeAiming:
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_GiveInventory("ShakeMore",1)
		TNT1 A 0 A_Jump(256,"ShakeAimingLeft","ShakeAimingRight")
		
	ShakeAimingLeft:
		TNT1 A 0 A_JumpIfInventory("IsShakin",1,"ReadyZoom")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap",1,1)
		Goto Ready3
		TNT1 A 0 A_GiveInventory("IsShakin",1)
		TNT1 A 0 A_GunFlash("LeftAimingShake")
		Goto Ready3
		
	ShakeAimingRight:
		TNT1 A 0 A_JumpIfInventory("IsShakin",1,"ReadyZoom")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap",1,1)
		Goto Ready3
		TNT1 A 0 A_GiveInventory("IsShakin",1)
		TNT1 A 0 A_GunFlash("RightAimingShake")
		Goto Ready3

	StopShake:
		TNT1 A 0 A_TakeInventory("IsShakin",1)
		TNT1 A 0 A_TakeInventory("ShakeMore",1)
		Stop
		//Goto Flash

	LeftShake:
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,"LeftShake2")
		SHOI GHIJKLLKJIHG 1
	RightShake:
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,"RightShake2")
		SHOP A 1 A_TakeInventory("ShakeMore",1)
		SHOI ABCDEFFEDCBA 1
		SHOP A 1 A_JumpIfInventory("ShakeMore",1,"LeftShake")
		SHOI GHIJKKJIHG 1
		SHOP A 1 A_JumpIfInventory("ShakeMore",1,"RightShake")
		SHOI ABCDDCBA 1
		SHOP A 1 A_JumpIfInventory("ShakeMore",1,"LeftShake")
		SHOI GHIIHG 1
		SHOP A 1 A_JumpIfInventory("ShakeMore",1,"RightShake")
		SHOI ABBA 1
		SHOP A 1 A_TakeInventory("IsShakin",1)
		Stop
		//Goto Flash
		
	LeftShake2:
		SHUI GHIJKLLKJIHG 1
	RightShake2:
		SHUP A 1 A_TakeInventory("ShakeMore",1)
		SHUI ABCDEFFEDCBA 1
		SHUP A 1 A_JumpIfInventory("ShakeMore",1,"LeftShake")
		SHUI GHIJKKJIHG 1
		SHUP A 1 A_JumpIfInventory("ShakeMore",1,"RightShake")
		SHUI ABCDDCBA 1
		SHUP A 1 A_JumpIfInventory("ShakeMore",1,"LeftShake")
		SHUI GHIIHG 1
		SHUP A 1 A_JumpIfInventory("ShakeMore",1,"RightShake")
		SHUI ABBA 1
		SHUP A 1 A_TakeInventory("IsShakin",1)
		Stop
		//Goto Flash
		
	LeftAimingShake:
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,"LeftAimingShake2")
		SHOB GHIJKLLKJIHG 1
	RightAimingShake:
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,"RightAimingShake2")
		SHOA F 1 A_TakeInventory("ShakeMore",1)
		SHOB ABCDEFFEDCBA 1
		SHOA F 1 A_JumpIfInventory("ShakeMore",1,"LeftAimingShake")
		SHOB GHIJKKJIHG 1
		SHOA F 1 A_JumpIfInventory("ShakeMore",1,"RightAimingShake")
		SHOB ABCDDCBA 1
		SHOA F 1 A_JumpIfInventory("ShakeMore",1,"LeftAimingShake")
		SHOB GHIIHG 1
		SHOA F 1 A_JumpIfInventory("ShakeMore",1,"RightAimingShake")
		SHOB ABBA 1
		SHOA F 1 A_TakeInventory("IsShakin",1)
		Stop

	LeftAimingShake2:
		SHUB GHIJKLLKJIHG 1
	RightAimingShake2:
		SHUA F 1 A_TakeInventory("ShakeMore",1)
		SHUB ABCDEFFEDCBA 1
		SHUA F 1 A_JumpIfInventory("ShakeMore",1,"LeftAimingShake2")
		SHUB GHIJKKJIHG 1
		SHUA F 1 A_JumpIfInventory("ShakeMore",1,"RightAimingShake2")
		SHUB ABCDDCBA 1
		SHUA F 1 A_JumpIfInventory("ShakeMore",1,"LeftAimingShake2")
		SHUB GHIIHG 1
		SHUA F 1 A_JumpIfInventory("ShakeMore",1,"RightAimingShake2")
		SHUB ABBA 1
		SHUA F 1 A_TakeInventory("IsShakin",1)
		Stop

// --------------------------------------------------------------------------
//
//	Fire
//
// --------------------------------------------------------------------------

	Fire:
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"ReloadDone")
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",1,2)
		TNT1 A 0 A_JumpIfInventory("AmmoShell",1,"Reload")
		Goto DryFire
		TNT1 A 0 A_GunFlash("StopShake")
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"FireZoom")
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,3)
		SHAF A 1 BRIGHT A_AlertMonsters
		TNT1 A 0 A_Jump(256,2)
		SHUF A 1 BRIGHT A_AlertMonsters
		TNT1 A 0 A_GunFlash("StopShake")
		TNT1 A 0 A_PlaySound("weapons/sg",1)//0.8
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun",random(-1,1),0,0,-12,0,random(-1,1))
		TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 AA 0 A_FireCustomMissile("GunFireSmoke",0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		TNT1 AAAAAAA 0 A_FireCustomMissile("ShotgunParticles",frandom(-10,10),0,-1,-8,0,frandom(-10,10))
		TNT1 AAAAA 0 A_FireCustomMissile("Tracer",frandom(-4,4),0,-1,-12,0,frandom(-4,4))
		TNT1 A 0 A_Takeinventory("U_ShotgunAmmo",1)
		TNT1 A 0 A_FireBullets(3.0,3.0,10,6,"ShotgunPuff")
		TNT1 A 0 A_SetPitch(-8.0 + pitch)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,9)
		SHAF B 1 BRIGHT
		TNT1 A 0 A_ZoomFactor(1.00)
		SHAF CDE 1 A_SetPitch(+1.6 + pitch)
		SHOP AA 1 A_SetPitch(+1.6 + pitch)
		TNT1 A 0 A_Jump(256,8)
		SHUF B 1 BRIGHT
		TNT1 A 0 A_ZoomFactor(1.00)
		SHUF CDE 1 A_SetPitch(+1.6 + pitch)
		SHUP AA 1 A_SetPitch(+1.6 + pitch)

		TNT1 A 0 A_GiveInventory("Pumping",1)
		SHOP BCDEFG 1
		SHOP H 1 A_PlaySound("weapons/sgpump",5)
		SHOP IJKL 1
		TNT1 A 0 A_FireCustomMissile("ShotCaseSpawn",0,0,-10,-20)
		SHOP KJ 1
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",1,5)
		SHOP PNO 1
		TNT1 A 0 A_Jump (256,4)
		SHOP IHG 1
		SHOP FEDC 1
	ReadyToFireAgain:
		SHOP B 1
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,6)
		SHOP A 1 Offset(10,36)
		SHOP A 1 Offset(6,40)
		SHOP A 1 Offset(2,40)
		SHOP A 1 Offset(-2,36)
		TNT1 A 0 A_Jump(256,5)
		SHUP A 1 Offset(10,36)
		SHUP A 1 Offset(6,40)
		SHUP A 1 Offset(2,40)
		SHUP A 1 Offset(-2,36)
		TNT1 A 0 A_Refire
		Goto ShakeLeft

	FireZoom:
		TNT1 AA 0 A_FireCustomMissile("GunFireSmoke",0,0,0,2,0,0)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_GunFlash("StopShake")
		TNT1 A 0 A_PlaySound("weapons/sg",1)//0.8
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun",random(-1,1),0,0,-12,0,random(-1,1))
		TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		TNT1 AAAAA 0 A_FireCustomMissile("Tracer",frandom(-2.6,2.6),0,-1,0,0,frandom(-2.6,2.6))
		TNT1 AAAAAAA 0 A_FireCustomMissile("ShotgunParticles",frandom(-6.6,6.6),0,-1,-8,0,frandom(-6.6,6.6))
		TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		TNT1 A 0 A_Takeinventory("U_ShotgunAmmo",1)
		TNT1 A 0 A_ZoomFactor(1.4)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,3)
		SHOA A 1 BRIGHT A_FireBullets(2.0,2.0,10,6,"ShotgunPuff")
		TNT1 A 0 A_Jump(256,2)
		SHUA A 1 BRIGHT A_FireBullets(2.0,2.0,10,6,"ShotgunPuff")
		TNT1 A 0 A_SetPitch(-8.0 + pitch)
		
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,11)
		SHOA B 1 BRIGHT A_SetPitch(+1.9 + pitch)
		TNT1 A 0 A_ZoomFactor(1.5)
		SHOA CDE 1 A_SetPitch(+1.9 + pitch)
		TNT1 A 0 A_ZoomFactor(1.2) //1.0
		SHOZ EFG 1 //New frames
		//SHOZ BCD 1
		//SHOP A 1
		TNT1 A 0 A_Jump(256,10)
		SHUA B 1 BRIGHT A_SetPitch(+1.9 + pitch)
		TNT1 A 0 A_ZoomFactor(1.5)
		SHUA CDE 1 A_SetPitch(+1.9 + pitch)
		TNT1 A 0 A_ZoomFactor(1.2) //1.0
		SHUZ EFG 1 //New frames
		//SHUZ BCD 1
		//SHUP A 1
		
		TNT1 A 0 A_GiveInventory("Pumping",1)
		SHOP CDEFG 1 //B-frame removed
		SHOP H 1 A_PlaySound("weapons/sgpump")
		SHOP IJKL 1
		TNT1 A 0 A_FireCustomMissile("ShotCaseSpawn",0,0,-10,-20)
		SHOP KJ 1
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",1,5)
		SHOP PNO 1
		TNT1 A 0 A_Jump(256,4)
		SHOP IHG 1
		SHOP FEDC 1 //B-frame removed
		TNT1 A 0 A_ZoomFactor(1.5)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,6)
		//SHOP A 1
		SHOZ GFE 1 //New frames
		SHOZ A 1 //DCB-frames removed
		TNT1 A 0 A_Jump(256,5)
		//SHUP A 1
		SHUZ GFE 1 //New frames
		SHUZ A 1 //DCB-frames removed
		TNT1 A 0 A_Refire
		Goto ShakeAiming

	AltFire:
		TNT1 A 0 A_GunFlash("StopShake")
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"ZoomOut")
		TNT1 A 0 A_Giveinventory("Zoomed",1)
		TNT1 A 0 A_Giveinventory("ADSmode",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_ZoomFactor(1.5)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,6)
		SHOZ DCBA 1
		TNT1 A 0 A_Jump(256,5)
		SHUZ DCBA 1
		TNT1 A 0 A_SetCrosshair(41)
		Goto ShakeAiming
		
	ZoomOut:
		TNT1 A 0 A_GunFlash("StopShake")
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetCrosshair(0)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,6)
		SHOZ ABCD 1
		TNT1 A 0 A_Jump(256,"Shake")
		SHUZ ABCD 1
		Goto Shake

// --------------------------------------------------------------------------
//
//	Unload and Reload
//
// --------------------------------------------------------------------------
				
	Reload:
		TNT1 A 0 A_TakeInventory("Reloading",1)
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",8,"Ready2") //Is weapon full?
		TNT1 A 0 A_JumpIfInventory("AmmoShell",1,1) //Do we have any spare ammo?
		Goto Ready2
		TNT1 A 0 A_JumpIfInventory("TurboReload",1,"TurboReloadLoop")
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetCrosshair(0)
		
		TNT1 A 0 A_GunFlash("StopShake")
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,2)
		TNT1 A 0 A_Jump(256,11)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,6)
		SHOZ ABCD 1
		TNT1 A 0 A_Jump(256,5)
		SHUZ ABCD 1
		
		TNT1 A 0 A_Giveinventory("Reloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",1,2)
		TNT1 A 0 A_GiveInventory("ShotgunWasEmpty",1)
		TNT1 A 0 A_GiveInventory("Pumping",1)
		SHOP ABCDE 1
		
	ReloadLoop:
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",8,"ReloadDone")
		TNT1 A 0 A_JumpIfInventory("AmmoShell",1,1)
		Goto ReloadDone
		TNT1 A 0 A_GiveInventory("Pumping",1)
		TNT1 A 0 A_Takeinventory("AmmoShell",1)
		TNT1 A 0 A_Giveinventory("U_ShotgunAmmo",1)
		SHOR ABC 1
		SHOR D 1 A_PlaySound("insertshell")
		SHOR EFGHI 1
		TNT1 A 0 A_JumpIfInventory("PlayerIsABot",1,3)
		SHOR A 1 A_Refire
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"ReloadKick")
		Goto ReloadLoop
		TNT1 A 0 A_Jump(224,"ReloadLoop")
		TNT1 A 0 A_Refire
		Goto ReloadLoop
		
	ReloadDone:
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty",1,"Pump")
		SHOP FEDC 1 //A_WeaponReady
		TNT1 A 0 A_Takeinventory("Reloading",1)
		Goto ReadyToFireAgain

	TurboReloadLoop:
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",8,"TurboReloadDone")
		TNT1 A 0 A_JumpIfInventory("AmmoShell",1,1)
		Goto TurboReloadDone
		TNT1 A 0 A_Takeinventory("AmmoShell",1)
		TNT1 A 0 A_Giveinventory("U_ShotgunAmmo",1)
		Loop
		
	TurboReloadDone:
		TNT1 A 0 A_Refire
		Goto Ready2

	Unload:
		TNT1 A 0 A_GunFlash("StopShake")
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",1,1)
		Goto Ready2
		TNT1 A 0 A_GiveInventory("Pumping",1)
		SHOP BCDEF 1
		
	UnloadLoop:
		TNT1 A 0 A_Takeinventory("U_ShotgunAmmo",1)
		TNT1 A 0 A_Giveinventory("AmmoShell",1)
		SHOP G 1
		SHOP H 1 A_PlaySound("weapons/sgpump",1)
		SHOP IJKLKJ 1
		TNT1 A 0 A_JumpIfInventory("U_ShotgunAmmo",1,5)
		SHOP PNOF 1
		Goto UnloadDone
		SHOP IHGF 1
		Goto UnloadLoop
	
	UnloadDone:
		SHOP EDC 1
		TNT1 A 0 A_Takeinventory("Unloading",1)
		Goto ReadyToFireAgain

	Pump:	
		TNT1 A 0 A_GiveInventory("Pumping",1)
		SHOP FO 1
		SHOP N 1 A_PlaySound("weapons/sgpump",5)
		SHOP PJKLKJIHGFEDC 1
		TNT1 A 0 A_Takeinventory("ShotgunWasEmpty",1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		Goto ReadyToFireAgain

	ReloadKick:
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty",1,2)
		TNT1 A 0 A_Jump(256,"ReloadKicking")
		TNT1 A 0 A_GiveInventory("Pumping",1)
		SHOP FO 1
		SHOP N 1 A_PlaySound("weapons/sgpump",5)
		SHOP PJKLKJ 1
		
	ReloadKicking:
		TNT1 A 0 A_GunFlash("ReloadKickFlash")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		KICK BCD 1
		TNT1 A 0 A_jumpifinventory("PowerStrength",1,3)
		TNT1 A 0 A_FireCustomMissile("KickAttack",0,0,0,-7)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_FireCustomMissile("SuperKickAttack",0,0,0,-7)
		KICK H 5
		TNT1 A 0 A_Takeinventory("Kicking",1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_Takeinventory("ShotgunWasEmpty",1)
		KICK IGFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality",1,"Steady")
		Goto ShakeLeft

// --------------------------------------------------------------------------
//
//	Misc.
//
// --------------------------------------------------------------------------

	DryFire:
		TNT1 A 0 A_PlaySound("weapons/empty2")
		Goto Ready2

	PuristGun:
		TNT1 A 0 A_GiveInventory("ClassicShotgun",1)
		TNT1 A 0 A_TakeInventory("U_Shotgun",1)
		Goto Ready

	WarmUp:
		TNT1 A 0 A_TakeInventory("NeverSelectedShotgun",1)
		SHOS GHIJKLMNO 1
		SHOP FO 1
		SHOP N 1 A_PlaySound("weapons/sgpump",1)
		SHOP PJKLKJIHGFEDC 1
		Goto ReadyToFireAgain

// --------------------------------------------------------------------------
//
//	End stuff
//
// --------------------------------------------------------------------------

	ReloadKickFlash:
		SHOP IHGF 1
		SHOP E 8
		SHOP EDCB 1
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,2)
		SHOP A 1
		Stop
		SHUP A 1
		Stop

	KickFlash:
		TNT1 A 0 A_TakeInventory("IsShakin",1)
		TNT1 A 0 A_TakeInventory("ShakeMore",1)
		SHOP BCDE 1
		SHOP E 8
		SHOP EDCB 1
		TNT1 A 0 A_Giveinventory("ImpactMovesSling",1)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,2)
		SHOP A 1
		Stop
		SHUP A 1
		Stop

	AirKickFlash:
		TNT1 A 0 A_TakeInventory("IsShakin",1)
		TNT1 A 0 A_TakeInventory("ShakeMore",1)
		SHOP BCDE 1
		SHOP E 10
		SHOP EDCB 1
		TNT1 A 0 A_Giveinventory("ImpactMovesSling",1)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,2)
		SHOP A 1
		Stop
		SHUP A 1
		Stop
		
	TauntFlash:
		TNT1 A 0 A_TakeInventory("IsShakin",1)
		TNT1 A 0 A_TakeInventory("ShakeMore",1)
		SHOP BCDE 1
		SHOR A 35
		SHOP EDCB 1
		TNT1 A 0 A_Giveinventory("ImpactMovesSling",1)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,2)
		SHOP A 1
		Stop
		SHUP A 1
		Stop

	GrenadeFlash:
		TNT1 A 0 A_TakeInventory("IsShakin",1)
		TNT1 A 0 A_TakeInventory("ShakeMore",1)
		TNT1 A 0 A_Giveinventory("ImpactMovesSling",1)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,7)
		SHOS PQRSTU 1
		Stop
		SHUS FEDCBA 1
		Stop

	SlideKickStartFlash:
		SHOP BCDE 1
		SHOR A 17
		Stop
	
	SlideKickEndFlash:
		SHOR A 2
		SHOP EDCB 2
		TNT1 A 0 A_Giveinventory("ImpactMovesSling",1)
		TNT1 A 0 A_JumpIfInventory("BD21graphics",1,2)
		SHOP A 1
		Stop
		SHUP A 1
		Stop
	}
}

ACTOR U_ShotgunAmmo : Ammo
{
	Inventory.Amount 0
	Inventory.MaxAmount 8
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 8
	Inventory.Icon "SHTCA0"
}