// --------------------------------------------------------------------------
//
// Super Shotgun
//
// --------------------------------------------------------------------------

ACTOR EriSuperShotgun : AltPlayerWeapon // replaces SuperShotgun
{
	Game Doom
	Scale 0.8
	SpawnID 33
	Weapon.SelectionOrder 400
	Weapon.AmmoUse 2
	Weapon.AmmoGive 8
	Weapon.AmmoType "Shell"
	Weapon.SisterWeapon "AltSuperShotgun"
	Inventory.PickupMessage "$GOTSHOTGUN2"
	Obituary "$OB_MPSSHOTGUN"
	Tag "$TAG_SUPERSHOTGUN"
	Decal "BulletChip"
	States
	{
	Ready:
		DSSG A 1 A_WeaponReady
		Wait
	Deselect:
		DSSG A 1 A_Lower
		Loop
	Select:
		DSSG A 0 A_JumpIfInventory("AltToken",1,"Trade")
		DSSG A 1 A_Raise
		Wait
	Trade:
		DSSG A 0 A_SelectWeapon("AltSuperShotgun")
		DSSG A 1 A_Lower
		Wait
	Fire:
		DSSG A 3
		DSSF A 2 bright A_FireShotgun2
		DSSF B 2 bright
		DSSF CJ 2
		DSSG B 2 A_CheckReload
		DSSG CD 2
		DSSG E 2 A_PlaySound("weapons/sshoto", CHAN_AUTO)
		DSSG FGIJK 2
		DSSG L 2 A_PlaySound("weapons/sshotl", CHAN_WEAPON)
		DSSG MNOP 2
		DSSG Q 2 A_PlaySound("weapons/sshotl", CHAN_WEAPON)
		DSSG RS 2
		DSSG T 2 A_PlaySound("weapons/sshotc", CHAN_WEAPON)
		DSSG UC 2
		DSSG A 6 A_ReFire
		DSSG A 5 A_ReFire
		Goto Ready
	Flash:
		TNT1 A 1 Bright A_Light1
		TNT1 A 2 Bright A_Light2
		TNT1 A 2 Bright A_Light1
		Goto LightDone
	Spawn:
		DESS A -1
		Stop
	}
}

ACTOR AltSuperShotgun : EriSuperShotgun
{
	+WEAPON.NOAUTOFIRE
	Weapon.AmmoGive 0
	Weapon.AmmoUse 1
	Weapon.AmmoType2 "Shell"
	Weapon.AmmoUse2 2
	Weapon.SisterWeapon "EriSuperShotgun"
	States
	{
	Ready:
		DSSG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Wait
	Select:
		DSSG A 0 A_JumpIfInventory("AltToken",1,1)
		Goto Trade
		DSSG A 1 A_Raise
		Wait
	Trade:
		DSSG A 0 A_SelectWeapon("EriSuperShotgun")
		DSSG A 1 A_Lower
		Wait
	Fire:
		DSSF A 0 A_GunFlash
		DSSF A 0 A_PlaySound("weapons/sshot1bar", CHAN_AUTO)
		DSSF A 0 A_CheckForReload(2, "Fire1")
		DSSF G 2 bright A_FireBullets(6.0, 3.0, 10, 5, "BulletPuff")
		DSSF H 2 bright
		DSSF IJ 2
		Goto DoReload
	Fire1:
		DSSF D 2 bright A_FireBullets(6.0, 3.0, 10, 5, "BulletPuff")
		DSSF E 2 bright
		DSSF FJ 2
		DSSG A 2
		Goto Ready
	AltFire:
		DSSG A 0 A_JumpIfInventory("Shell",2,1)
		Goto Ready
		DSSF A 0 A_CheckForReload(2, "AF", 1)
		Goto ReloadAlt
	   AF:
		DSSF A 0 A_GunFlash
		DSSF A 0 A_PlaySoundEx("weapons/sshotf", "Auto")
		DSSF A 2 bright A_FireBullets(11.2, 7.1, 20, 5, "BulletPuff")
		DSSF B 2 bright
		DSSF CJ 2
		Goto DoReload
	DoReload:
		DSSG B 2 A_CheckReload
		DSSG CD 2 A_ResetReloadCounter
		DSSG E 2 A_PlaySound("weapons/sshoto", CHAN_WEAPON)
		DSSG FGHIJK 2
		DSSG L 2 A_PlaySound("weapons/sshotl", CHAN_WEAPON)
		DSSG MNOP 2
	   RL2:
		DSSG Q 2 A_PlaySound("weapons/sshotl", CHAN_WEAPON)
		DSSG RS 2
		DSSG T 2 A_PlaySound("weapons/sshotc", CHAN_WEAPON)
		DSSG UC 2
		Goto Ready
	ReloadAlt:
		DSSG CD 2 A_ResetReloadCounter
		DSSG E 2 A_PlaySoundEx("weapons/sshoto", "Weapon")
		DSSG VWOP 2
		Goto RL2
	Reload:
		DSSG A 0 A_CheckForReload(2, "Nope", 1)
		Goto ReloadAlt
	Nope:
		DSSG A 1 A_WeaponReady
		Goto Ready
	}
}