// Combat Shotgun (Doom)

ACTOR IDMShotgun : IDMWeapon
{
	Weapon.SelectionOrder 600
	Weapon.Sisterweapon "ShotgunLevel2"
	//Weapon.PreferredSkin "ShotgunMarine"
	Weapon.AmmoUse 1
	Weapon.AmmoGive 8
	Weapon.Kickback 200
	Weapon.AmmoType "IDMShell"
	Inventory.PickupMessage "Combat Shotgun! (Slot 3)"
	Obituary "%o was peppered by %k's Combat Shotgun."
	Tag "Combat Shotgun"
	Decal BulletChip
	Damagetype "Bullet"
	AttackSound "weapons/shotgf"
	+WEAPON.NOLMS
	States
	{
	Ready:
	  SHTG A 1 A_WeaponReady
      Loop
	Deselect:
      TNT1 A 0 A_Lower
      TNT1 A 0 A_Lower
      SHTG A 1 A_Lower
      Loop
	Select:
	  TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
	Sloop:
      TNT1 A 0 A_Raise
      TNT1 A 0 A_Raise
      SHTG A 1 A_Raise
      Loop
	Fire:
	  TNT1 A 0 A_JumpIfInventory("DuelItem",1,"DuelFire")
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage", 1, "Quad")
      TNT1 A 0 A_FireBullets (5.6, 1.775, 24, 5, "IDMShotPuff")
	  Goto FireEnd
	Quad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  TNT1 A 0 A_FireBullets (5.6, 1.775, 24, 5, "ExtremeShotPuff")
	  Goto FireEnd
	DuelFire:
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage", 1, "DuelQuad")
      TNT1 A 0 A_FireBullets (7.0, 3.55, 20, 5, "IDMShotPuff")
	  Goto FireEnd
	DuelQuad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  TNT1 A 0 A_FireBullets (7.0, 3.55, 20, 5, "ExtremeShotPuff")
	FireEnd:
      SHTG A 4 Offset(0,38) A_GunFlash
      SHTG A 2 Offset(0,35)
      SHTG A 1 Offset(0,33)
      SHTG BC 4
      SHTG D 4
      SHTG CB 4
      SHTG A 3
      SHTG A 7 A_ReFire
	  Goto Ready
	Flash:
      SHTF B 4 Bright A_Light1
      SHTF A 2 Bright A_Light2
      Goto LightDone
	Spawn:
      SHOT A -1 Bright
      Stop
	}
}

ACTOR ShotgunLevel2 : IDMShotgun
{
	+POWERED_UP
	+WEAPON.CHEATNOTWEAPON
	Weapon.Sisterweapon "IDMShotgun"
	AttackSound "weapons/shotgf2"
	States
	{
	Ready:
      SHL2 A 1 A_WeaponReady
      Loop
    Deselect:
	  SHL2 A 0 A_Lower
      SHL2 A 0 A_Lower
      SHL2 A 1 A_Lower
      Loop
	Select:
	  TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
	Sloop:
      SHL2 A 0 A_Raise
      SHL2 A 0 A_Raise
      SHL2 A 1 A_Raise
      Loop
	Fire:
	  TNT1 A 0 A_JumpIfInventory("DuelItem",1,"DuelFire")
	  SHL2 A 0 A_JumpIfInventory("PowerQuadDamage", 1, "Quad")
      SHL2 A 0 A_FireBullets (5.6, 1.775, 48, 5, "IDMShotPuff")
	  Goto FireEnd
    Quad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  SHL2 A 0 A_FireBullets (5.6, 1.775, 48, 5, "ExtremeShotPuff")
	  Goto FireEnd
	DuelFire:
	  SHL2 A 0 A_JumpIfInventory("PowerQuadDamage", 1, "DuelQuad")
      SHL2 A 0 A_FireBullets (7.0, 3.55, 40, 5, "IDMShotPuff")
	  Goto FireEnd
    DuelQuad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  SHL2 A 0 A_FireBullets (7.0, 3.55, 40, 5, "ExtremeShotPuff")
	FireEnd:
      SHL2 A 4 Offset(0,38) A_GunFlash
      SHL2 A 2 Offset(0,35)
      SHL2 A 1 Offset(0,33)
      SHL2 BC 4
      SHL2 D 4
      SHL2 CB 4
      SHL2 A 3
      SHL2 A 7 A_ReFire
      Goto Ready
	Flash:
      SHL2 F 4 Bright A_Light1
      SHL2 E 2 Bright A_Light2
      Goto LightDone
	}
}