// Quad Shotgun

ACTOR QuadShotgun : IDMWeapon
{
  Tag "Quad-Shotgun"
  Obituary "%o was obliterated by %k's Quad-Shotgun!"
  Radius 20
  Height 16
  //Weapon.PreferredSkin "QSGMarine"
  Inventory.Pickupmessage "Quad Shotgun! (Slot 3)"
  weapon.selectionorder 50
  Weapon.kickback 400
  Weapon.AmmoType "IDMShell"
  Weapon.AmmoGive 20
  Weapon.AmmoUse 4
  Decal "BulletChip"
  Damagetype "Bullet"
  +WEAPON.BFG
  +WEAPON.NOLMS
  states
  {
  Ready:
    SHT4 A 1 A_WeaponReady
    loop
  Deselect: 
    SHT4 A 1 A_Lower
    loop
  Select:
	TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
  Sloop:
    SHT4 A 1 A_Raise
    loop
  Fire:
	SHT4 A 2
  	SHT4 A 0 A_PlaySound("weapons/qshotf",CHAN_WEAPON)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_JumpIfInventory("PowerIDMWeaponLevel2",1,"Level2")
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
  Normal:
	TNT1 A 0 A_Recoil(4)
	SHT4 A 4 Bright Offset(0,40) A_FireBullets (22.4, 7.1, 300, 5, "IDMSuperShotPuff")
	Goto FireEnd
  Level2:
	TNT1 A 0 A_Quake(7,10,0,100,none)
	TNT1 A 0 A_Recoil(20)
	TNT1 A 0 A_PlaySound("weapons/qshot2",CHAN_WEAPON)
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"QuadLevel2")
	SHT4 A 4 Bright Offset(0,40) A_FireBullets (44.8, 14.2, 1200, 5, "IDMSuperShotPuff")
	Goto FireEnd
  Quad:
	TNT1 A 0 A_Recoil(4)
	TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	SHT4 A 4 Bright Offset(0,40) A_FireBullets (22.4, 7.1, 300, 5, "ExtremeShotPuff")
	Goto FireEnd
  QuadLevel2:
	TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	SHT4 A 4 Bright Offset(0,40) A_FireBullets (44.8, 14.2, 1200, 5, "ExtremeShotPuff")
  FireEnd:
    SHT4 A 2 Bright Offset(0,36)
    SHT4 A 1 Bright Offset(0,33)
	SHT4 B 7 A_CheckReload
	SHT4 C 7
	SHT4 D 7 A_Playsound("weapons/qsopen",CHAN_WEAPON)
	SHT4 E 7
	SHT4 F 4
	SHT4 F 4 A_Playsound("weapons/qsload",CHAN_WEAPON)
	SHT4 G 7
	SHT4 H 5
	SHT4 H 2 A_Playsound("weapons/qsclose",CHAN_WEAPON)
	SHT4 I 7 A_Refire
	SHT4 A 5
	Goto Ready
  Flash:
    SH4X A 4 Bright A_Light1
    SH4X B 2 Bright A_Light2
    Goto LightDone
  Spawn:
    QSGW A -1 Bright
    stop
  }
}