actor "Atchisson AA-12" : RGUWeapon
{
  obituary "%k filled %o with AA-12 pellets."
  inventory.pickupmessage "You got the Atchisson AA-12 automatic shotgun."
  //attacksound "aa12/fire"
  weapon.selectionorder 8
  weapon.ammotype "AA12Clip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "AA12Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  -NOAUTOFIRE
  states
  {
  Ready:
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    GRNA L 0 A_TakeInventory("weapondropper",2)
    A12A A 0 A_PlaySoundEx("weapon/draw","SoundSlot5")
    A12A BCDE 2 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
	A12A FGHIJKLMN 2 A_WeaponReady(WRF_ALLOWZOOM)
	M4CD A 0 A_JumpIfInventory("AA12Token",1,"Reload")
    A12A N 0 A_JumpIfNoAmmo("Reload")
	M4CC F 0 A_JumpIfInventory("weapondropper",1,"DropWeapon")
    A12A N 0 A_JumpIfInventory("Aiming",1,5)
    A12A N 0 A_JumpIfInventory("Reloading",1,"Reload")
    A12A N 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    A12A N 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12A N 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+18
    A12C F 0 A_JumpIfInventory("Reloading",1,"Reload")
  ReadyAim:
    A12C F 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    A12C F 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
    A12C F 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+24
  Deselect:
    A12A N 0 A_PlaySoundEx("weapon/down","SoundSlot5")
    A12A N 0 A_TakeInventory("Aiming",1)
    A12A N 0 A_TakeInventory("Reloading",1)
    A12A N 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    A12A N 0 A_ZoomFactor(1.0)
    A12A N 0 A_Lower
    A12A N 1 A_Lower
    Goto Deselect+5
  Select:
    A12A A 0 A_Raise
    Loop
  Fire:
    A12A N 0 A_JumpIfInventory("Aiming",1,"FireAim")
    A12A N 1 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-7.00,7.00), 1, 0, 4, 0, frandom(-6.00,6.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  FireEmpty:
    A12B B 2 BRIGHT A_GunFlash
    A12B B 0 A_GiveInventory("AA12Bolt",1)
    A12B CDE 1
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  Hold:
    A12A N 0 A_JumpIfInventory("Aiming",1,"HoldAim")
    A12A N 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Hold_SteadyAim")
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-7.00,7.00), 1, 0, 4, 0, frandom(-6.00,6.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  FireAim:
    A12C F 1 A_JumpIfNoAmmo("ReloadStart")
    A12C G 0 A_PlayWeaponSound("aa12/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-2.00,2.00), 0, 0, 4, 0, frandom(-2.00,2.00))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.00,2.00), 0, 0, 4, 0, frandom(-2.00,2.00))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.0,2.00), 1, 0, 4, 0, frandom(-2.00,2.00))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C G 0 A_JumpIfNoAmmo("FireAimEmpty")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  HoldAim:
    A12C F 0 A_JumpIfNoAmmo("ReloadStart")
    A12C G 0 A_PlayWeaponSound("aa12/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.50,2.50), 1, 0, 4, 0, frandom(-2.50,2.50))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    TNT1 A 0 A_JumpIfInventory("AA12Clip",3,2)
    TNT1 A 0 A_PlaySound("m9/lock")
    A12C G 0 A_JumpIfNoAmmo("FireAimEmpty")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  FireAimEmpty:
    A12C H 2 BRIGHT A_GunFlash
    A12C H 0 A_GiveInventory("AA12Bolt",1)
    A12C IJK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  Reload: //AltFire:
    A12C A 0 A_JumpIfInventory("AA12Clip",8,2)
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,"ReloadStart")
    A12C A 0 A_TakeInventory("Reloading",1)
    A12C A 0 A_JumpIfInventory("Aiming",1,"ReadyAim")
    Goto Ready+21
  ReloadStart:
    A12D A 0 ACS_NamedExecuteAlways("RefSpeak",0,0,0,0)
    A12D A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    A12D A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
	A12D A 0 A_JumpIfInventory("AA12Token",1,"Reload2")
    A12D ABCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12D EFG 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12D H 3 A_PlaySoundEx("aa12/clipout","SoundSlot5")
	A12D H 0 A_FireCustomMissile("AA12EmptyMagSpawner",0,0,0,1)
	A12D H 0 A_GiveInventory("AA12Token",1)
	A12D IJK 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	goto Reload2
  Reload2:
    A12D LMNOP 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12D QRSTUVW 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12D Y 3 A_PlaySoundEx("aa12/clipin","SoundSlot5")
    A12D Z 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo
  ReloadAmmo:
    A12D Z 0 A_JumpIfInventory("AA12Clip",8,"ReloadEnd")
	A12D Z 0 A_TakeInventory("AA12Token",1)
    A12D Z 0 A_JumpIfInventory("AA12Ammo",1,1)
    Goto ReloadEnd
    A12D Z 0 A_GiveInventory("AA12Clip",1)
    A12D Z 0 A_TakeInventory("AA12Ammo",1)
    Goto ReloadAmmo
  ReloadEnd:
    A12E A 0 A_JumpIfInventory("AA12Bolt",1,"ReloadEndBolt")
    A12E ABC 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12E DEF 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12E G 0 A_ReFire
    Goto Ready+18
  ReloadEndBolt:
    A12E Z 0 A_TakeInventory("AA12Bolt",1)
    A12E GHIJL 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12E M 0 A_PlaySoundEx("aa12/bolt","SoundSlot5")
    A12E NOPQRS 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12E TUV 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12E V 0 A_ReFire
    Goto Ready+18
  Zoom:
  PostReloadAlt:
    M4CD A 0 A_JumpIfInventory("AA12Token",1,"Reload")
    A12C F 0 A_ZoomFactor(1.2)
    A12C E 0 A_GiveInventory("Aiming",1)
	A12C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    A12C ABCDEF 1
    Goto AltHold
  AltFireHoldAim:
    "####" "#" 0 A_JumpIfInventory("AA12Clip",1,1)
	Goto Reload
    A12C G 0 A_PlayWeaponSound("aa12/fire")
	GRNA L 0 A_TakeInventory("AA12Clip",1)
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.50,2.50), 1, 0, 4, 0, frandom(-2.50,2.50))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    TNT1 A 0 A_JumpIfInventory("AA12Clip",3,2)
    TNT1 A 0 A_PlaySound("m9/lock")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C J 1
    "####" "#" 0 A_JumpIfInventory("AA12Clip",1,1)
	Goto Reload
    A12C A 0 A_ReFire
    Goto Ready+24
  AltHold:
    A12C F 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	M4CA C 0 A_JumpIfInventory("FireHeld",1,"AltFireHoldAim")
	M4CA C 0 A_JumpIfInventory("Reloading",1,"Reload")
	U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
	M4CA F 0 A_Refire("AltHold")
	M4CA C 0 A_JumpIfInventory("Aiming",1,"AltFire2")
	Goto Ready+24
  AltFire:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    M4CD A 0 A_JumpIfInventory("AA12Token",1,"Reload")
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"AltHold")
    A12C A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    A12C A 0 A_ZoomFactor(1.2)
    A12C AB 1
    A12C B 0 A_GiveInventory("Aiming",1)
    A12C CDEF 1 
    A12C F 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	A12C F 0 A_Refire
    Goto Ready+24
  AltFire2:
    A12C F 0 A_ZoomFactor(1.0)
    A12C FE 1
    A12C E 0 A_TakeInventory("Aiming",1)
    A12C DCBA 1
    A12C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	A12A NNNN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+18
  AltFire3:
    A12C F 0 A_ZoomFactor(1.0)
    A12C FE 1
    A12C E 0 A_TakeInventory("Aiming",1)
    A12C DCBA 1
    A12C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	goto DropWeapon
  ReloadStartAim:
    A12C F 0 A_ZoomFactor(1.0)
    A12C FE 1
    A12C E 0 A_TakeInventory("Aiming",1)
    A12C DCBA 1
    A12C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+2
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  Spawn:
    WEAP B 0
    WEAP B 0 A_SpawnItem("AA12Drop")
    stop
  ReloadStart_SOH:
    A12D A 0 A_JumpIfInventory("AA12Token",1,"Reload3")
    A12D ABCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12D EFG 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12D H 2 A_PlaySoundEx("aa12/clipout","SoundSlot5")
	A12D H 0 A_FireCustomMissile("AA12EmptyMagSpawner",0,0,0,1)
    A12D H 0 A_GiveInventory("AA12Token",1)
	A12D IJK 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	goto Reload3
  Reload3:
    A12D LMNOP 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12D QRSTUVW 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12D Y 2 A_PlaySoundEx("aa12/clipin","SoundSlot5")
    A12D Z 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    A12D Z 0 A_JumpIfInventory("AA12Clip",8,"ReloadEnd_SOH")
	A12D Z 0 A_TakeInventory("AA12Token",1)
    A12D Z 0 A_JumpIfInventory("AA12Ammo",1,1)
    Goto ReloadEnd_SOH
    A12D Z 0 A_GiveInventory("AA12Clip",1)
    A12D Z 0 A_TakeInventory("AA12Ammo",1)
    Goto ReloadAmmo_SOH
  ReloadEnd_SOH:
    A12E A 0 A_JumpIfInventory("AA12Bolt",1,"ReloadEndBolt_SOH")
    A12E ABC 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12E DEF 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12E G 0 A_ReFire
    Goto Ready+18
  ReloadEndBolt_SOH:
    A12E Z 0 A_TakeInventory("AA12Bolt",1)
    A12E GHIJL 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12E M 0 A_PlaySoundEx("aa12/bolt","SoundSlot5")
    A12E NOPQRS 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12E TUV 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12E V 0 A_ReFire
    Goto Ready+18
  Fire_SteadyAim:
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-6.00,6.00), 0, 0, 4, 0, frandom(-5.00,5.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-6.00,6.00), 0, 0, 4, 0, frandom(-5.00,5.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-6.00,6.00), 1, 0, 4, 0, frandom(-5.00,5.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  Hold_SteadyAim:
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-6.00,6.00), 0, 0, 4, 0, frandom(-5.00,5.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-6.00,6.00), 0, 0, 4, 0, frandom(-5.00,5.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-6.00,6.00), 1, 0, 4, 0, frandom(-5.00,5.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  FragGrenade:
    U45F A 0 ACS_NamedExecuteAlways("RefSpeak",0,1,0,0)
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	M4CA J 0 A_JumpIfInventory("ThrowingStun",1,"StunGrenade")
	M4CA J 0 A_JumpIfInventory("ThrowingIncd",1,"IncGrenade")
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 2
    TNT1 A 15
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("GrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("FragGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  FragGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("GrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("FragGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"KnifeAttack_SOH")
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_Commando")
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",104)
    KNFA DEFGHIJKL 1
    TNT1 A 20
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_Commando:
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",160)
    KNFA DEFGHIJKL 1
    TNT1 A 20
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_SOH:
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_SOH_Commando")
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",104)
    KNFA DEFGHIJKL 1
    TNT1 A 10
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_SOH_Commando:
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",160)
    KNFA DEFGHIJKL 1
    TNT1 A 10
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  StunGrenade:
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"StunGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 2
    TNT1 A 15
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("StunAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("StunGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  IncGrenade:
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"IncGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 2
    TNT1 A 15
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("IncdAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("IncGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  StunGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("StunAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("StunGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  IncGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("IncdAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("IncGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  DropWeapon:
    A12A MLKJIHGFEDCB 2 A_WeaponReady(WRF_NOPRIMARY)
	A12A A 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	M4CC F 0 A_JumpIfInventory("weapondropper",2,"ThrowWeapon")
    KNFA A 0 ACS_NamedExecuteAlways("RefDropW",0,0,0,0)
	GRNA L 0 A_TakeInventory("weapondropper",1)
	M4CB A 0 A_FireCustomMissile("AA12Dropped",0,0,7,2)
	stop
  ThrowWeapon:
    GRNA IKMN 1
	KNFA B 0 A_PlaySound("knife/swing")
    KNFA A 0 ACS_NamedExecuteAlways("RefDropW",0,0,0,0)
	GRNA L 0 A_TakeInventory("weapondropper",2)
	M4CB A 0 A_FireCustomMissile("AA12Thrown",0,0,7,2)
	stop
  }
}

actor AA12Clip : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 8
    ammo.backpackamount 0
    ammo.backpackmaxamount 8
    +IGNORESKILL
}

actor AA12Bolt : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor "Atchisson AA-12 Ex Mags" : "Atchisson AA-12"
{
  obituary "%k filled %o with AA-12 pellets."
  inventory.pickupmessage "You got the Atchisson AA-12 automatic shotgun."
  //attacksound "aa12/fire"
  weapon.selectionorder 8
  weapon.ammotype "AA12Clip2"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "AA12Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  -NOAUTOFIRE
  states
  {
  Ready:
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    GRNA L 0 A_TakeInventory("weapondropper",2)
    A12A A 0 A_PlaySoundEx("weapon/draw","SoundSlot5")
    A12A BCDE 2 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
	A12A FGHIJKLMN 2 A_WeaponReady(WRF_ALLOWZOOM)
	M4CD A 0 A_JumpIfInventory("AA12Token",1,"Reload")
    A12A N 0 A_JumpIfNoAmmo("Reload")
	M4CC F 0 A_JumpIfInventory("weapondropper",1,"DropWeapon")
    A12A N 0 A_JumpIfInventory("Aiming",1,5)
    A12A N 0 A_JumpIfInventory("Reloading",1,"Reload")
    A12A N 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    A12A N 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12A N 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+18
    A12C F 0 A_JumpIfInventory("Reloading",1,"Reload")
  ReadyAim:
    A12C F 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    A12C F 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
    A12C F 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+24
  Fire:
    A12A N 0 A_JumpIfInventory("Aiming",1,"FireAim")
    A12A N 1 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-7.00,7.00), 1, 0, 4, 0, frandom(-6.00,6.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip2",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  Hold:
    A12A N 0 A_JumpIfInventory("Aiming",1,"HoldAim")
    A12A N 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Hold_SteadyAim")
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-7.00,7.00), 1, 0, 4, 0, frandom(-6.00,6.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip2",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  FireAim:
    A12C F 1 A_JumpIfNoAmmo("ReloadStart")
    A12C G 0 A_PlayWeaponSound("aa12/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-2.00,2.00), 0, 0, 4, 0, frandom(-2.00,2.00))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.00,2.00), 0, 0, 4, 0, frandom(-2.00,2.00))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.00,2.00), 1, 0, 4, 0, frandom(-2.00,2.00))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip2",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C G 0 A_JumpIfNoAmmo("FireAimEmpty")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  HoldAim:
    A12C F 0 A_JumpIfNoAmmo("ReloadStart")
    A12C G 0 A_PlayWeaponSound("aa12/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.50,2.50), 1, 0, 4, 0, frandom(-2.50,2.50))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip2",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C G 0 A_JumpIfNoAmmo("FireAimEmpty")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  Fire_SteadyAim:
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-6.00,6.00), 0, 0, 4, 0, frandom(-5.00,5.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-6.00,6.00), 0, 0, 4, 0, frandom(-5.00,5.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-6.00,6.00), 1, 0, 4, 0, frandom(-5.00,5.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip2",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  Hold_SteadyAim:
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-6.00,6.00), 0, 0, 4, 0, frandom(-5.00,5.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-6.00,6.00), 0, 0, 4, 0, frandom(-5.00,5.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-6.00,6.00), 1, 0, 4, 0, frandom(-5.00,5.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip2",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  Reload: //AltFire:
    A12C A 0 A_JumpIfInventory("AA12Clip2",12,2)
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,"ReloadStart")
    A12C A 0 A_TakeInventory("Reloading",1)
    A12C A 0 A_JumpIfInventory("Aiming",1,"ReadyAim")
    Goto Ready+21
  ReloadStart:
    A12D A 0 ACS_NamedExecuteAlways("RefSpeak",0,0,0,0)
    A12D A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    A12D A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
	A12D A 0 A_JumpIfInventory("AA12Token",1,"Reload2")
    A12D ABCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12D EFG 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12D H 3 A_PlaySoundEx("aa12/clipout","SoundSlot5")
	A12D H 0 A_FireCustomMissile("AA12EmptyMagExtSpawner",0,0,0,1)
    A12D H 0 A_GiveInventory("AA12Token",1)
	A12D IJK 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	goto Reload2
  Reload2:
    A12D LMNOP 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12D QRSTUVW 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12D Y 3 A_PlaySoundEx("aa12/clipin","SoundSlot5")
    A12D Z 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo
  ReloadAmmo:
    A12D Z 0 A_JumpIfInventory("AA12Clip2",12,"ReloadEnd")
	A12D Z 0 A_TakeInventory("AA12Token",1)
    A12D Z 0 A_JumpIfInventory("AA12Ammo",1,1)
    Goto ReloadEnd
    A12D Z 0 A_GiveInventory("AA12Clip2",1)
    A12D Z 0 A_TakeInventory("AA12Ammo",1)
    Goto ReloadAmmo
  ReloadEnd:
    A12E A 0 A_JumpIfInventory("AA12Bolt",1,"ReloadEndBolt")
    A12E ABC 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12E DEF 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12E G 0 A_ReFire
    Goto Ready+18
  ReloadEndBolt:
    A12E Z 0 A_TakeInventory("AA12Bolt",1)
    A12E GHIJL 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12E M 0 A_PlaySoundEx("aa12/bolt","SoundSlot5")
    A12E NOPQRS 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12E TUV 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12E V 0 A_ReFire
    Goto Ready+18
  ReloadStartAim:
    A12C F 0 A_ZoomFactor(1.0)
    A12C FE 1
    A12C E 0 A_TakeInventory("Aiming",1)
    A12C DCBA 1
    A12C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+2
  ReloadStart_SOH:
    A12D A 0 A_JumpIfInventory("AA12Token",1,"Reload3")
    A12D ABCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12D EFG 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12D H 2 A_PlaySoundEx("aa12/clipout","SoundSlot5")
	A12D H 0 A_FireCustomMissile("AA12EmptyMagExtSpawner",0,0,0,1)
    A12D H 0 A_GiveInventory("AA12Token",1)
	A12D IJK 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	goto Reload3
  Reload3:
    A12D LMNOP 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12D QRSTUVW 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12D Y 2 A_PlaySoundEx("aa12/clipin","SoundSlot5")
    A12D Z 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    A12D Z 0 A_JumpIfInventory("AA12Clip2",12,"ReloadEnd_SOH")
	A12D Z 0 A_TakeInventory("AA12Token",1)
    A12D Z 0 A_JumpIfInventory("AA12Ammo",1,1)
    Goto ReloadEnd_SOH
    A12D Z 0 A_GiveInventory("AA12Clip2",1)
    A12D Z 0 A_TakeInventory("AA12Ammo",1)
    Goto ReloadAmmo_SOH
  ReloadEnd_SOH:
    A12E A 0 A_JumpIfInventory("AA12Bolt",1,"ReloadEndBolt_SOH")
    A12E ABC 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12E DEF 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12E G 0 A_ReFire
    Goto Ready+18
  ReloadEndBolt_SOH:
    A12E Z 0 A_TakeInventory("AA12Bolt",1)
    A12E GHIJL 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    A12E M 0 A_PlaySoundEx("aa12/bolt","SoundSlot5")
    A12E NOPQRS 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    A12E TUV 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12E V 0 A_ReFire
    Goto Ready+18
  AltFireHoldAim:
    "####" "#" 0 A_JumpIfInventory("AA12Clip2",1,1)
	Goto Reload
    A12C G 0 A_PlayWeaponSound("aa12/fire")
	GRNA L 0 A_TakeInventory("AA12Clip2",1)
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122", frandom(-2.50,2.50), 1, 0, 4, 0, frandom(-2.50,2.50))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    TNT1 A 0 A_JumpIfInventory("AA12Clip2",3,2)
    TNT1 A 0 A_PlaySound("m9/lock")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C J 1
    "####" "#" 0 A_JumpIfInventory("AA12Clip2",1,1)
	Goto Reload
    A12C A 0 A_ReFire
    Goto Ready+24
  }
}

actor AA12Clip2 : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 12
    ammo.backpackamount 0
    ammo.backpackmaxamount 12
    +IGNORESKILL
}

actor AA12ExMags : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor "Atchisson AA-12 Grip" : "Atchisson AA-12"
{
  obituary "%k filled %o with AA-12 pellets."
  inventory.pickupmessage "You got the Atchisson AA-12 automatic shotgun."
  //attacksound "aa12/fire"
  weapon.selectionorder 8
  weapon.ammotype "AA12Clip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "AA12Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Fire:
    A12A N 0 A_JumpIfInventory("Aiming",1,"FireAim")
    A12A N 1 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-3.00,3.00), 0, 0, 4, 0, frandom(-3.00,3.00))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-3.00,3.00), 0, 0, 4, 0, frandom(-3.00,3.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-3.00,3.00), 1, 0, 4, 0, frandom(-3.00,3.00))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  Hold:
    A12A N 0 A_JumpIfInventory("Aiming",1,"HoldAim")
    A12A N 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Hold_SteadyAim")
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-3.50,3.50), 0, 0, 4, 0, frandom(-3.50,3.50))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-3.50,3.50), 0, 0, 4, 0, frandom(-3.50,3.50))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-3.50,3.50), 1, 0, 4, 0, frandom(-3.50,3.50))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  FireAim:
    A12C F 1 A_JumpIfNoAmmo("ReloadStart")
    A12C G 0 A_PlayWeaponSound("aa12/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-1.50,1.50), 0, 0, 4, 0, frandom(-1.50,1.50))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-1.50,1.50), 0, 0, 4, 0, frandom(-1.50,1.50))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-1.50,1.50), 1, 0, 4, 0, frandom(-1.50,1.50))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C G 0 A_JumpIfNoAmmo("FireAimEmpty")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  HoldAim:
    A12C F 0 A_JumpIfNoAmmo("ReloadStart")
    A12C G 0 A_PlayWeaponSound("aa12/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-1.80,1.80), 0, 0, 4, 0, frandom(-1.80,1.80))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-1.80,1.80), 0, 0, 4, 0, frandom(-1.80,1.80))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-1.80,1.80), 1, 0, 4, 0, frandom(-1.80,1.80))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C G 0 A_JumpIfNoAmmo("FireAimEmpty")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  Fire_SteadyAim:
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-2.50,2.50), 1, 0, 4, 0, frandom(-2.50,2.50))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  Hold_SteadyAim:
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,7,1)
    A12B AAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-2.80,2.80), 0, 0, 4, 0, frandom(-2.80,2.80))
    A12B AAAAAAA 0 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-2.80,2.80), 0, 0, 4, 0, frandom(-2.80,2.80))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-2.80,2.80), 1, 0, 4, 0, frandom(-2.80,2.80))
	A12B A 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  AltFireHoldAim:
    "####" "#" 0 A_JumpIfInventory("AA12Clip",1,1)
	Goto Reload
    A12C G 0 A_PlayWeaponSound("aa12/fire")
	GRNA L 0 A_TakeInventory("AA12Clip",1)
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,0,-3)
    A12C GGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA121", frandom(-1.80,1.80), 0, 0, 4, 0, frandom(-1.80,1.80))
    A12C GGGGGGG 0 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-1.80,1.80), 0, 0, 4, 0, frandom(-1.80,1.80))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122G", frandom(-1.80,1.80), 1, 0, 4, 0, frandom(-1.80,1.80))
	A12C G 0 A_SpawnItemEx("ShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C J 1
    "####" "#" 0 A_JumpIfInventory("AA12Clip",1,1)
	Goto Reload
    A12C A 0 A_ReFire
    Goto Ready+24
  }
}

actor AA12Grip : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor "Atchisson AA-12 Dragon" : "Atchisson AA-12"
{
  obituary "%k burned %o with the AA-12."
  inventory.pickupmessage "You got the Atchisson AA-12 automatic shotgun."
  //attacksound "aa12/fire"
  weapon.selectionorder 8
  weapon.ammotype "AA12Clip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "AA12Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Fire:
    A12A N 0 A_JumpIfInventory("Aiming",1,"FireAim")
    A12A N 1 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B A 0 A_PlaySound("dragon/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B AA 0 A_FireCustomMissile("FlameThrowerFireLight3",frandom(-8.00,10.00),0,6,random(-3,3),0,frandom(-9.00,10.00))
    A12B AAAA 0 A_FireCustomMissile("FlameThrowerFireLight",frandom(-9.00,11.00),0,6,random(-4,4),0,frandom(-10.00,11.00))
    A12B AA 0 A_FireCustomMissile("FlameThrowerFireLight2",frandom(-9.00,11.00),0,6,random(-4,4),0,frandom(-10.00,11.00))
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,7,1)
    A12B AA 0 BRIGHT A_FireCustomMissile("HHCBAA121D", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B AA 0 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-7.00,7.00), 1, 0, 4, 0, frandom(-6.00,6.00))
	A12B A 0 A_SpawnItemEx("OrangeShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B A 0 A_JumpIfInventory("CoopCheck",1,"FireCoopCont")
  FireCont:
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
    A12A N 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  FireCoopCont:
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  Hold:
    A12A N 0 A_JumpIfInventory("Aiming",1,"HoldAim")
    A12A N 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_PlayWeaponSound("aa12/fire")
    A12B A 0 A_PlaySound("dragon/fire")
    A12B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,7,1)
    A12B AA 0 A_FireCustomMissile("FlameThrowerFireLight3",frandom(-8.00,10.00),0,6,random(-3,3),0,frandom(-9.00,10.00))
    A12B AAAA 0 A_FireCustomMissile("FlameThrowerFireLight",frandom(-9.00,11.00),0,6,random(-4,4),0,frandom(-10.00,11.00))
    A12B AA 0 A_FireCustomMissile("FlameThrowerFireLight2",frandom(-9.00,11.00),0,6,random(-4,4),0,frandom(-10.00,11.00))
    A12B A 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,7,1)
    A12B AA 0 BRIGHT A_FireCustomMissile("HHCBAA121D", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B AA 0 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-7.00,7.00), 0, 0, 4, 0, frandom(-6.00,6.00))
    A12B A 2 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-7.00,7.00), 1, 0, 4, 0, frandom(-6.00,6.00))
	A12B A 0 A_SpawnItemEx("OrangeShellCasing",Cos(Pitch)*30,10,25-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12B A 0 A_JumpIfInventory("AA12Clip",3,2)
    A12B A 0 A_PlaySound("m9/lock")
    A12B A 0 A_JumpIfNoAmmo("FireEmpty")
    A12B A 0 A_JumpIfInventory("CoopCheck",1,"HoldCoopCont")
  HoldCont:
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
    A12A N 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  HoldCoopCont:
    A12B B 1 BRIGHT A_GunFlash
    A12B C 1
    A12B DE 1
    A12B A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12B A 0 A_ReFire
    Goto Ready+18
    A12B A 0 A_JumpIfNoAmmo("ReloadStart")
    A12B A 0 A_ReFire
    Goto Ready+18
  FireAim:
    A12C F 1 A_JumpIfNoAmmo("ReloadStart")
    A12C G 0 A_PlayWeaponSound("aa12/fire")
    A12C G 0 A_PlaySound("dragon/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C GG 0 A_FireCustomMissile("FlameThrowerFireLight3",frandom(-7.00,7.00),0,0,random(-3,3),0,frandom(-7.00,8.00))
    A12C GGGG 0 A_FireCustomMissile("FlameThrowerFireLight",frandom(-8.00,8.00),0,0,random(-4,4),0,frandom(-8.00,9.00))
    A12C GG 0 A_FireCustomMissile("FlameThrowerFireLight2",frandom(-8.00,8.00),0,0,random(-4,4),0,frandom(-8.00,9.00))
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,-3)
    A12C GGG 0 BRIGHT A_FireCustomMissile("HHCBAA121D", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C GG 0 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-2.50,2.50), 0, 0, 4, 0, frandom(-2.50,2.50))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-2.50,2.50), 1, 0, 4, 0, frandom(-2.50,2.50))
	A12C G 0 A_SpawnItemEx("OrangeShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C G 0 A_JumpIfNoAmmo("FireAimEmpty")
    A12C G 0 A_JumpIfInventory("CoopCheck",1,"FireAimCoopCont")
  FireAimCont:
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JKF 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  FireAimCoopCont:
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  HoldAim:
    A12C F 0 A_JumpIfNoAmmo("ReloadStart")
    A12C G 0 A_PlayWeaponSound("aa12/fire")
    A12C G 0 A_PlaySound("dragon/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C GG 0 A_FireCustomMissile("FlameThrowerFireLight3",frandom(-7.00,7.00),0,0,random(-3,3),0,frandom(-7.00,8.00))
    A12C GGGG 0 A_FireCustomMissile("FlameThrowerFireLight",frandom(-8.00,8.00),0,0,random(-4,4),0,frandom(-8.00,9.00))
    A12C GG 0 A_FireCustomMissile("FlameThrowerFireLight2",frandom(-8.00,8.00),0,0,random(-4,4),0,frandom(-8.00,9.00))
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,0,-3)
    A12C GGG 0 BRIGHT A_FireCustomMissile("HHCBAA121D", frandom(-3.00,3.00), 0, 0, 4, 0, frandom(-3.00,3.00))
    A12C GG 0 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-3.00,3.00), 0, 0, 4, 0, frandom(-3.00,3.00))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-3.00,3.00), 1, 0, 4, 0, frandom(-3.00,3.00))
	A12C G 0 A_SpawnItemEx("OrangeShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C G 0 A_JumpIfNoAmmo("FireAimEmpty")
    A12C G 0 A_JumpIfInventory("CoopCheck",1,"HoldAimCoopCont")
  HoldAimCont:
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JKF 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  HoldAimCoopCont:
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JK 1
    A12C A 0 A_JumpIfInventory("AA12Ammo",1,2)
    A12C A 0 A_ReFire
    Goto Ready+24
    A12C A 0 A_JumpIfNoAmmo("ReloadStart")
    A12C A 0 A_ReFire
    Goto Ready+24
  AltFireHoldAim:
    "####" "#" 0 A_JumpIfInventory("AA12Clip",1,1)
	Goto Reload
    A12C G 0 A_PlayWeaponSound("aa12/fire")
	GRNA L 0 A_TakeInventory("AA12Clip",1)
    A12C G 0 A_PlaySound("dragon/fire")
    A12C GG 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,-3)
    A12C GG 0 A_FireCustomMissile("FlameThrowerFireLight3",frandom(-7.00,7.00),0,0,random(-3,3),0,frandom(-7.00,8.00))
    A12C GGGG 0 A_FireCustomMissile("FlameThrowerFireLight",frandom(-8.00,8.00),0,0,random(-4,4),0,frandom(-8.00,9.00))
    A12C GG 0 A_FireCustomMissile("FlameThrowerFireLight2",frandom(-8.00,8.00),0,0,random(-4,4),0,frandom(-8.00,9.00))
    A12C G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzleLight",0,0,0,-3)
    A12C GGG 0 BRIGHT A_FireCustomMissile("HHCBAA121D", frandom(-3.00,3.00), 0, 0, 4, 0, frandom(-3.00,3.00))
    A12C GG 0 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-3.00,3.00), 0, 0, 4, 0, frandom(-3.00,3.00))
    A12C G 2 BRIGHT A_FireCustomMissile("HHCBAA122D", frandom(-3.00,3.00), 1, 0, 4, 0, frandom(-3.00,3.00))
	A12C G 0 A_SpawnItemEx("OrangeShellCasing",Cos(Pitch)*30,-2,32-(Sin(Pitch)*25),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    A12C G 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    A12C G 0 A_JumpIfInventory("AA12Clip",3,2)
    A12C G 0 A_PlaySound("m9/lock")
    A12C H 1 BRIGHT A_GunFlash
    A12C I 1
    A12C JKF 1
    "####" "#" 0 A_JumpIfInventory("AA12Clip",1,1)
	Goto Reload
    A12C A 0 A_ReFire
    Goto Ready+24
  }
}

actor AA12Dragon : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor AA12Pickup : CustomInventory
{
  inventory.pickupmessage "You got the Atchisson AA-12 automatic shotgun."
  inventory.pickupsound "spas/pump"
  +INVENTORY.AUTOACTIVATE
  //inventory.respawntics 70
  scale 0.13
  States
  {
  Spawn:
    WEAP B -1
    stop
  Pickup:
    WEAP B 0
    WEAP B 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",0,0,0)) == 1, "PickupStay")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Ex Mags",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Grip",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Dragon",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEAP B 0 A_JumpIfInventory("MaxWeaponsFilled",76,"FailPickup2")
	WEAP B 0 A_GiveInventory("MaxWeaponsFilled",25)
    WEAP B 0 ACS_NamedExecuteWithResult("RefPickU",8,0,0)
    stop
  PickupStay:
    WEAP B 0
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12",1,"FailPickup") // If the player already has this weapon, they get more ammo for it
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Ex Mags",1,"FailPickup")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Grip",1,"FailPickup")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Dragon",1,"FailPickup")
    WEAP B 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEAP B 0 A_JumpIfInventory("MaxWeaponsFilled",76,"FailPickup2")
	WEAP B 0 A_GiveInventory("MaxWeaponsFilled",25)
    WEAP B 0 ACS_NamedExecuteWithResult("RefPickU",8,0,0)
    WEAP B 0 ACS_NamedExecuteWithResult("RefPickC",8,0,0)
    WEAP B 0 A_PlaySound("spas/pump")
    fail
  AmmoPickup:
    WEAP B 0
    WEAP B 0 A_JumpIfInventory("AA12Ammo",0,"FailPickup")
    WEAP B 0 A_GiveInventory("AA12Ammo",12)
    stop
  OneManArmy:
    WEAP B 0
	WEAP B 0 A_JumpIfInventory("MaxWeaponsFilled",113,"FailPickup2")
	WEAP B 0 A_GiveInventory("MaxWeaponsFilled",25)
	WEAP B 0 ACS_NamedExecuteWithResult("RefPickU",8,0,0)
	stop
  FailPickup:
    WEAP B 1
    fail
  FailPickup2:
    WEAP B 1
    WEAP B 0 ACS_NamedExecuteAlways("RefSlots",0,17,0,0)
    fail
  }
}

actor AA12Drop : AA12Pickup
{
  States
  {
  Spawn:
    WEAP B -1
    stop
  Pickup:
    WEAP B 0
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Ex Mags",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Grip",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Dragon",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEAP B 0 A_JumpIfInventory("MaxWeaponsFilled",76,"FailPickup2")
	WEAP B 0 A_GiveInventory("MaxWeaponsFilled",25)
    WEAP B 0 ACS_NamedExecuteWithResult("RefPickU",8,0,0)
    stop
  }
}

actor AA12Drop2 : AA12Drop
{
  States
  {
  Spawn:
    WEAP B -1
    stop
  Pickup:
    WEAP B 0
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Ex Mags",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Grip",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Atchisson AA-12 Dragon",1,"AmmoPickup")
    WEAP B 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEAP B 0 A_JumpIfInventory("MaxWeaponsFilled",76,"FailPickup2")
	WEAP B 0 A_GiveInventory("MaxWeaponsFilled",25)
    WEAP B 0 ACS_NamedExecuteWithResult("RefPickU",8,0,0)
    stop
  AmmoPickup:
    WEAP B 0
    stop
  }
}

actor HHCBAA121 : HHBullet
{
  damage (random(12,14))
  Speed 200
  decal none
  damagetype "Shotgungib"
  -NOEXTREMEDEATH
  states
  {
  Spawn:
    TNT1 A 1
    TNT1 A 1 A_ScaleVelocity(0.6)
    stop
  Death:
    TNT1 A 0 A_SpawnItemEx("ImpactSmokePuff_2", 0, 0, 4, 0, 0, 0, 0, 128, 0)
    TNT1 A 5 A_PlaySound("generic/ricochet")
    stop
  XDeath:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)//
    TNT1 A 5 A_PlaySound("generic/ricochets")
    stop
  Crash:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)//
	TNT1 A 0 A_Jump(48,2)
    TNT1 A 0 A_SpawnItemEx("ImpactSmokePuff_3", 0, 0, 4, 0, 0, 0, 0, 128, 0)
    TNT1 A 5 A_PlaySound("generic/ricochet")
    stop
  }
}
actor HHCBAA122 : HHCBAA121
{
  damage (random(12,14))
  Speed 200
  decal ShotChip
  damagetype "Shotgun"
  +NOEXTREMEDEATH
  states
  {
  Spawn:
    TNT1 A 6
    TNT1 A 2 A_ScaleVelocity(0.75)
    stop
  Death:
    TNT1 A 0 A_SpawnItemEx("ImpactSmokePuff_2", 0, 0, 4, 0, 0, 0, 0, 128, 0)
    TNT1 A 5 A_PlaySound("generic/ricochet")
    stop
  XDeath:
	//TNT1 A 0 A_Jump(160,2)
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 5 A_PlaySound("generic/ricochets")
    stop
  Crash:
	//TNT1 A 0 A_Jump(160,2)
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
	TNT1 A 0 A_Jump(48,2)
    TNT1 A 0 A_SpawnItemEx("ImpactSmokePuff_3", 0, 0, 4, 0, 0, 0, 0, 128, 0)
    TNT1 A 5 A_PlaySound("generic/ricochet")
    stop
  }
}

actor HHCBAA121G : HHCBAA121
{
  Speed 230
}

actor HHCBAA122G : HHCBAA122
{
  Speed 230
  damage (random(12,18))
}

actor HHCBAA121D : HHBullet
{
  damage (random(10,14))
  Speed 175
  decal none
  +FORCERADIUSDMG
  damagetype "Dragon"
  states
  {
  Spawn:
    TNT1 A 1
    stop
  Death:
    TNT1 A 0 A_SpawnItemEx("FireballPuff", 0, 0, 4, 0, 0, 0, 0, 128, 0)
    TNT1 A 0 A_PlaySound("generic/ricochet")
    TNT1 AA 12 A_Explode(2,32,0)
    stop
  XDeath:
	//TNT1 A 0 A_Jump(144,2)
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 0 A_SpawnItemEx("FireballPuff", 0, 0, 4, 0, 0, 0, 0, 128, 0)
	TNT1 A 0 A_Jump(32,2)
    TNT1 A 0 A_PlaySound("generic/ricochets")
    TNT1 AA 12 A_Explode(2,32,0)
    stop
  Crash:
	//TNT1 A 0 A_Jump(144,2)
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 0 A_SpawnItemEx("FireballPuff", 0, 0, 4, 0, 0, 0, 0, 128, 0)
    TNT1 A 0 A_PlaySound("generic/ricochet")
    TNT1 AA 12 A_Explode(2,32,0)
    stop
  }
}
actor HHCBAA122D : HHCBAA121D
{
  damage (random(10,18))
  Speed 200
  decal none
  +FORCERADIUSDMG
  damagetype "Dragon"
  states
  {
  Spawn:
    TNT1 A 4
    stop
  Death:
    TNT1 A 0 A_SpawnItemEx("FireballPuff", 0, 0, 4, 0, 0, 0, 0, 128, 0)
    TNT1 A 0 A_PlaySound("generic/ricochet")
    TNT1 AA 12 A_Explode(2,32,0)
    stop
  XDeath:
	//TNT1 A 0 A_Jump(144,2)
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 0 A_SpawnItemEx("FireballPuff", 0, 0, 4, 0, 0, 0, 0, 128, 0)
	TNT1 A 0 A_Jump(32,2)
    TNT1 A 0 A_PlaySound("generic/ricochets")
    TNT1 AA 12 A_Explode(2,32,0)
    stop
  Crash:
	//TNT1 A 0 A_Jump(144,2)
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 0 A_SpawnItemEx("FireballPuff", 0, 0, 4, 0, 0, 0, 0, 128, 0)
    TNT1 A 0 A_PlaySound("generic/ricochet")
    TNT1 AA 12 A_Explode(2,32,0)
    stop
  }
}