#include "Decorate/Guns/Projectile/Ironblast.txt"
#include "Decorate/Guns/Projectile/IronStrat.txt"


ACTOR IronblastSelected : Inventory { Inventory.MaxAmount 1 }

ACTOR Ironblast : GuncasterWeapon replaces SuperShotgun
{
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "$GOTIRONBLAST"
   Obituary "$KILLIRONBLAST"
   Weapon.UpSound "Ironblast/Up" 
   Weapon.SelectionOrder 1
   Weapon.AmmoGive 24
   Weapon.AmmoType "ShotgunAmmo"
   Weapon.AmmoUse 8
   Weapon.SlotNumber 3
   Weapon.BobStyle InverseSmooth
   Weapon.BobSpeed 1.4
   Weapon.BobRangeY 0.5
   Weapon.BobRangeX 1.2
   Scale 0.8
   +NOAUTOAIM
   +NOALERT
   States
   {
   Spawn:
      IRNG X -1
      Stop
   Ready:
	  TNT1 A 0 A_TakeInventory("RightFireToken")
	  ICNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNG A 0
	  "####" A 0 A_TakeInventory("LeftFireToken",1)
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"), "ZweiReady")
      "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiReady")
	  "####" A 0 A_JumpIfInventory("FloaterblastActive",1,2)
	  "####" A 0 A_JumpIfInventory("IronblastStratActive",1,"Reload")
      "####" A 1 A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
      Loop
   DeselectMain:
	  ICNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNG A 0
      "####" A 0 A_TakeInventory("IronblastSelected")
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"), "ZweiDeselect")
      "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiDeselect")
      "####" A 1 A_Lower
      "####" A 0 A_Lower
      Loop
   Select:
	  ICNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNG A 0
      "####" A 0 A_GiveInventory("IronblastSelected")
      "####" A 0 A_JumpIf(CallACS("CrosshairMode"), 2)
      "####" A 0 A_SetCrosshair(51)
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"), "ZweiSelect")
      "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiSelect")
      "####" A 1 A_Raise
      "####" A 0 A_Raise
      Loop
   Fire:
	  "####" A 0 A_GiveInventory("RightFireToken")
      ICNF A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNF A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNF A 0
	  "####" A 0 A_GiveInventory("RightFireToken",1)
      "####" A 0 A_PlaySound("Ironblast/Fire",1,0.4)
      "####" A 0 A_PlaySound("Ironblast/Add",5,0.5)
      "####" A 0 A_SetBlend("Yellow",0.2,15)
      //"####" A 0 A_Recoil(10)
	  "####" A 0 A_ChangeVelocity (Cos(Pitch) * -22, 0, Sin(Pitch) * 22,CVF_RELATIVE)
      "####" A 0 A_AlertMonsters
      "####" A 0 A_Quake (4, 10, 0, 24, none)
	  "####" A 0 A_FireCustomMissile("IronblastProjectile",0,1,6,0)
	  "####" AAAAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(8.5,-8.5),0,6+frandom(2.0,-2.0),4+frandom(3.0,-3.0),0,frandom(3.0,-3.0))
	  "####" AAAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(8.5,-8.5),0,10+frandom(2.0,-2.0),4+frandom(3.0,-3.0),0,frandom(3.0,-3.0))
	  //"####" A 0 A_FireBullets(12,4,64,5*random(2.0,3.0),"HBulletPuff",FBF_USEAMMO|FBF_NORANDOM)
      "####" A 0 A_SetPitch(pitch-2.75)//A_SetPitch(pitch-0.75)
      "####" A 0 A_SetAngle(angle-2.75)//A_SetAngle(angle-0.75)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,3,1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,12,1)
      "####" A 1 Bright A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch-3)//A_SetPitch(pitch-1)
      "####" A 0 A_SetAngle(angle-3)//A_SetAngle(angle-1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,3,1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,12,1)
      "####" B 1 Bright A_ZoomFactor(0.98)
      "####" A 0 A_SetPitch(pitch-3)//A_SetPitch(pitch-1)
      "####" A 0 A_SetAngle(angle-3)//A_SetAngle(angle-1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,3,1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,12,1)
      "####" C 1 Bright A_ZoomFactor(0.95)
      ICNH A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNH A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNH A 0
      "####" A 1 A_ZoomFactor(0.9)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-1.25)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-1.25)
      "####" B 1 A_ZoomFactor(0.8)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.75)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.75)
      "####" C 1 A_ZoomFactor(0.75)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.65)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.65)
      "####" D 1 A_ZoomFactor(0.725)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.45)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.45)
      "####" E 1 A_ZoomFactor(0.71)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.35)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.35)
      "####" F 1 A_ZoomFactor(0.73)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch-0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.25)
      "####" G 1 A_ZoomFactor(0.8)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch-0.15)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.15)
      "####" H 1 A_ZoomFactor(0.82)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.15)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.25)
      "####" I 1 A_ZoomFactor(0.83)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.25)
      "####" J 1 A_ZoomFactor(0.85)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.15)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.15)
      "####" K 1 A_ZoomFactor(0.87)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.35)
      "####" L 1 A_ZoomFactor(0.89)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.35)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.15)
      "####" M 1 A_ZoomFactor(0.92)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.25)
      "####" N 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.25)
      "####" O 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.35)
      "####" P 1 A_ZoomFactor(0.96)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.25)
      "####" Q 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.25)
      "####" R 1 A_ZoomFactor(0.98)
      "####" A 0 //A_SetPitch(pitch+0.35)
      "####" A 0 //A_SetAngle(angle+0.25)
      "####" S 1 A_ZoomFactor(0.99)
      "####" A 0 //A_SetPitch(pitch+0.25)
      "####" A 0 //A_SetAngle(angle+0.15)
      "####" T 1 A_ZoomFactor(1)
      ICNR A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNR A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNR A 0
	  "####" ABCDEFGHIJKL 1
      "####" A 0 A_PlaySound("Ironblast/Pump/In",6,0.6)
	  "####" MNOPQRSTTT 1 A_SetPitch(Pitch+1)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
      "####" A 0 A_PlaySound("Ironblast/Pump/Out",6,0.6)
	  "####" SRQPONMLKJ 1 A_SetPitch(Pitch-1)
	  "####" IHGFEDCBA 1
      ICNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNG A 0
	  "####" A 0 A_TakeInventory("RightFireToken",1)
	  "####" A 0 A_TakeInventory("RightFireToken")
	  "####" A 1 A_ReFire
	  Goto Ready
	Achtung:
      ICNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNG A 0
	  "####" A 0 A_PlaySound("Menu/Change",6)
	  "####" A 0 A_Print("\c[white]You can't control more than one possessed ''Ironblast'' (and it's gunzerked clone) at a time!")
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"), 3)
	  "####" A 0 A_JumpIfInventory("PowerGunzerking",1,2)
	  "####" A 25 A_WeaponReady(WRF_NOSWITCH|WRF_ALLOWZOOM)
	  Goto Ready
      1CNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1RNG A 0
	  "####" A 25 A_WeaponReady(WRF_NOSWITCH|WRF_ALLOWZOOM)
	  Goto Ready
	Reload:
	  "####" A 0 A_JumpIfInventory("IronblastStrat",1,1)
	  Goto Ready
      IC1G A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IU1G A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IR1G A 0
	  "####" A 0 A_JumpIfInventory("FloaterblastActive",1,"Achtung")
	  "####" A 0 A_JumpIf(CallACS("GunslingerMode"), "ZerkReload")
	  "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"ZerkReload")
	  /*"####" A 0 A_JumpIfInventory("HexenCounter",1,"HexenReload")
	  "####" A 0 A_JumpIfInventory("ShotgunAmmo",16,1)
	  Goto Ready
	  "####" A 0 A_TakeInventory("ShotgunAmmo",16,TIF_NOTAKEINFINITE)
	  Goto ReloadMain
	HexenReload:
	  "####" A 0 A_JumpIfInventory("GreenMana",16,1)
	  Goto Ready
	  "####" A 0 A_TakeInventory("GreenMana",16,TIF_NOTAKEINFINITE)
	ReloadMain:*/
	  "####" DCBA 1
	  "####" Z 10
      ICNV A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNV A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNV A 0
	  "####" ABCDEEEE 1
	  "####" A 0 A_PlaySound("Ironspirit/Syringe",6)
	  "####" A 0 A_Quake(8,15,0,64,"none")
	  "####" A 0 A_SetBlend("Red",0.3,25)
	  "####" FGHJIKLMNOPQ 1 Bright
	  IRNV A 0
	  "####" RSTUVWXYZ 1
      IC1G A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IU1G A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IR1G A 0
	  "####" Z 5
	  "####" ABCD 1
      ICNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNG A 0
	  "####" A 5
	  "####" A 0 A_PlaySound("Ironspirit/Activate",5)
      ICNS A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNS A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNS A 0
	  "####" ABCDEFGHIJKLMNO 1
	  TNT1 A 3
	  "####" A 0 A_SetBlend("Black",1.0,25)
	  "####" A 0 A_Quake(8,15,0,64,"none")
	  "####" A 0 A_FireCustomMissile("FloatingIronblast",0,0,0,0)
	  "####" A 0 A_GiveInventory("IronblastStratActive")
	  "####" A 0 A_TakeInventory("IronblastSelected")
	  "####" A 0 A_TakeInventory("Ironblast")
	  "####" A 0 A_TakeInventory("Ironblast2")
	  TNT1 A 1
	  Goto Ready
	ZerkReload:
	  "####" A 0 A_SetBlend("Black",1.0,25)
	  "####" A 0 A_Quake(8,15,0,64,"none")
	  "####" A 0 A_FireCustomMissile("FloatingIronblast",0,0,0,0)
	  "####" A 0 A_GiveInventory("IronblastStratActive")
	  "####" A 0 A_TakeInventory("IronblastSelected")
	  "####" A 0 A_TakeInventory("Ironblast")
	  "####" A 0 A_TakeInventory("Ironblast2")
	  TNT1 A 1
	  Goto Ready
	AltFire:
	  "####" A 0 A_GiveInventory("RightFireToken")
      ICNM A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNM A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
      IRNM A 0
	  "####" A 0
	  Goto Super::CheckForMagic
	  
	Zoom:
	  "####" A 0 A_GiveInventory("RightFireToken")
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"),"Gunzerk")
	  "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"Gunzerk")
	  Goto Regular
	Regular:
	  "####" A 0 A_JumpIfInventory("PowerMidasMode",1,5)
	  ICNK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRNK A 0
	  "####" A 0
	  Goto Super::Zoom
	  ICNK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  IUNK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  IRMK A 0
	  "####" A 0
	  Goto Super::Zoom
	  
	Gunzerk:
	  "####" A 0 A_GunFlash("LeftKickBudge",GFF_NOEXTCHANGE)
	  "####" A 0 A_JumpIfInventory("PowerMidasMode",1,5)
	  1CNK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UNK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1RNK A 0
	  "####" A 0
	  Goto Super::Zoom
	  1CNK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UNK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1RMK A 0
	  "####" A 0
	  Goto Super::Zoom

	LeftKickBudge:
	  2RNK ABCDEFGHIHGFEDCBA 1
	  2RNK Z 10
	  2RNK Z 0 
	  {
		If((CountInv("PowerGunzerking") > 0) || CallACS("GunslingerMode"))
		{
			A_GunFlash("Flash",GFF_NOEXTCHANGE);
		}
		Else
		{
			A_GunFlash("Nullify",GFF_NOEXTCHANGE);
		}
	  }

	  Stop
	  
	//Zweihander

   ZweiSelect:
	  //3CNG A 0 A_JumpIfInventory("PowerSuitToken",1,2)
	  3RNG A 0 
      "####" A 0 A_Raise
      "####" A 1 A_Raise
      Loop
   ZweiDeselect:
	  //3CNG A 0 A_JumpIfInventory("PowerSuitToken",1,2)
	  3RNG A 0
	  "####" A 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
	  "####" A 0 A_TakeInventory("SynthFireActive",1)
	  "####" A 0 A_TakeInventory("SynthFireLeft",1)
	  "####" A 0 A_TakeInventory("SynthFireRight",1)
   Zweihander:
	  "####" A 0 A_Lower
	  "####" A 1 A_Lower
	  Loop
   ZweiReady:
	  //3CNG A 0 A_JumpIfInventory("PowerSuitToken",1,2)
	  3RNG A 0 
	  "####" A 0 A_GiveInventory("SynthFireActive",1)
	  "####" A 0 ACS_NamedExecuteAlways("SynthLeft")
	  "####" A 0 ACS_NamedExecuteAlways("SynthRight")
	  "####" A 0 A_GunFlash("Flash",GFF_NOEXTCHANGE)
	  Goto RIdle
	  
   //Right
   
   RIdle:
	  TNT1 A 0 A_TakeInventory("RightFireToken")
	  1CNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1RNG A 0 
	  "####" A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
	  "####" A 0 A_JumpIfInventory("FloaterblastActive",1,2)
	  "####" A 0 A_JumpIfInventory("IronblastStratActive",1,"ZerkReload")
	  "####" A 0 A_JumpIfInventory("LeftFireToken",1,3)
	  "####" A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
	  "####" A 0 A_Jump(256,2)
	  "####" A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
	  "####" A 0 A_JumpIf(CallACS("GunslingerMode"),"RIdle")
	  "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"RIdle") 
	  "####" A 0
	  Goto BackToReady
   BackToReady:
	  "####" A 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
	  Goto Ready
   RFire:
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"),"NextCheckR")
	  "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"NextCheckR") 
	  Goto BackToReady
   NextCheckR:
	  "####" A 0 A_JumpIfInventory("HexenCounter",1,"HexenR")
	  "####" A 1 A_JumpIfInventory("ShotgunAmmo",8,"RConfirmed")
	  Goto RIdle
   HexenR:
	  "####" A 1 A_JumpIfInventory("GreenMana",8,1)
	  Goto RIdle
   RConfirmed:
	  1CNF A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UNF A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1RNF A 0 
	  //"####" A 0 A_TakeInventory("ShotgunAmmo",8,TIF_NOTAKEINFINITE)
	  "####" A 0 A_GiveInventory("RightFireToken",1)
      "####" A 0 A_PlaySound("Ironblast/Fire",1,0.4)
      "####" A 0 A_PlaySound("Ironblast/Add",5,0.5)
      "####" A 0 A_SetBlend("Yellow",0.2,15)
      //"####" A 0 A_Recoil(10)
	  "####" A 0 A_ChangeVelocity (Cos(Pitch) * -22, 0, Sin(Pitch) * 22,CVF_RELATIVE)
      "####" A 0 A_AlertMonsters
      "####" A 0 A_Quake (4, 10, 0, 24, none)
      //1RNF A 0 A_FireBullets(12,4,64,5*random(2.0,3.0),"HBulletPuff",FBF_NORANDOM)
	  "####" A 0 A_FireCustomMissile("IronblastProjectile",0,1,8,0)
	  "####" AAAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(8.5,-8.5),0,8+frandom(2.0,-2.0),2+frandom(3.0,-3.0),0,frandom(3.0,-3.0))
	  "####" AAAAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(8.5,-8.5),0,12+frandom(2.0,-2.0),2+frandom(3.0,-3.0),0,frandom(3.0,-3.0)) 
      "####" A 0 A_SetPitch(pitch-2.75)//A_SetPitch(pitch-0.375)
      "####" A 0 A_SetAngle(angle-2.75)//A_SetAngle(angle-0.375)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,6,-1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,15,-1)
      "####" A 1 Bright A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch-3)//A_SetPitch(pitch-0.5)
      "####" A 0 A_SetAngle(angle-3)//A_SetAngle(angle-0.5)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,6,-1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,15,-1)
      "####" B 1 Bright A_ZoomFactor(0.98)
      "####" A 0 A_SetPitch(pitch-3)//A_SetPitch(pitch-0.5)
      "####" A 0 A_SetAngle(angle-3)//A_SetAngle(angle-0.5)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,6,-1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,15,-1)
      "####" C 1 Bright A_ZoomFactor(0.95)
	  1CNH A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UNH A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1RNH A 0 
      "####" A 1 A_ZoomFactor(0.9)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-1.25)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-1.25)
      "####" B 1 A_ZoomFactor(0.8)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.75)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.75)
      "####" C 1 A_ZoomFactor(0.75)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.65)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.65)
      "####" D 1 A_ZoomFactor(0.725)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.45)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.45)
      "####" E 1 A_ZoomFactor(0.71)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.35)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.35)
      "####" F 1 A_ZoomFactor(0.73)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch-0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.25)
      "####" G 1 A_ZoomFactor(0.8)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch-0.15)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.15)
      "####" H 1 A_ZoomFactor(0.82)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.15)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.25)
      "####" I 1 A_ZoomFactor(0.83)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.25)
      "####" J 1 A_ZoomFactor(0.85)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.15)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle-0.15)
      "####" K 1 A_ZoomFactor(0.87)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.35)
      "####" L 1 A_ZoomFactor(0.89)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.35)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.15)
      "####" M 1 A_ZoomFactor(0.92)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.25)
      "####" N 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.25)
      "####" O 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.35)
      "####" P 1 A_ZoomFactor(0.96)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.25)
      "####" Q 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.5)//A_SetAngle(angle+0.25)
      "####" R 1 A_ZoomFactor(0.98)
      "####" A 0 //A_SetPitch(pitch+0.35)
      "####" A 0 //A_SetAngle(angle+0.25)
      "####" S 1 A_ZoomFactor(0.99)
      "####" A 0 //A_SetPitch(pitch+0.25)
      "####" A 0 //A_SetAngle(angle+0.15)
      "####" T 1 A_ZoomFactor(1)
	  1CNR A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UNR A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1RNR A 0 
	  "####" ABCDEFGHIJKL 1
      "####" A 0 A_PlaySound("Ironblast/Pump/In",6,0.6)
	  "####" MNOPQRSTTT 1 A_SetPitch(Pitch+1)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
      "####" A 0 A_PlaySound("Ironblast/Pump/Out",6,0.6)
	  "####" SRQPONMLKJ 1 A_SetPitch(Pitch-1)
	  "####" IHGFEDCBA 1
	  1CNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1RNG A 0 
	  "####" A 1 A_TakeInventory("RightFireToken",1)
	  "####" A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
	  Goto RIdle
	  
   //Left
	  
   Nullify:
	  TNT1 A 0 A_TakeInventory("LeftFireToken",1)
	  Stop
   Flash:
	  TNT1 A 0 A_Light0
   LIdle:
	  2CNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2RNG A 0
	  "####" A 1 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	  Loop  
   LFire:
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"),"NextCheckL")
	  "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"NextCheckL") 
	  Goto Nullify
   NextCheckL:
	  "####" A 0 A_JumpIfInventory("HexenCounter",1,"HexenL")
	  "####" A 1 A_JumpIfInventory("ShotgunAmmo",8,"LConfirmed")
	  Goto LIdle
   HexenL:
	  "####" A 1 A_JumpIfInventory("GreenMana",8,1)
	  Goto LIdle
   LConfirmed:
	  2CNF A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UNF A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2RNF A 0
	  "####" A 0 A_GiveInventory("LeftFireToken",1)
      "####" A 0 A_PlaySound("Ironblast/Fire",1,0.4)
      "####" A 0 A_PlaySound("Ironblast/Add",5,0.5)
      "####" A 0 A_SetBlend("Yellow",0.2,15)
      //"####" A 0 A_Recoil(10)
	  "####" A 0 A_ChangeVelocity (Cos(Pitch) * -22, 0, Sin(Pitch) * 22,CVF_RELATIVE)
      "####" A 0 A_AlertMonsters
      "####" A 0 A_Quake (4, 10, 0, 24, none)
	  "####" A 0 A_FireCustomMissile("IronblastProjectile",0,1,-8,0)
	  "####" AAAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(8.5,-8.5),0,-8+frandom(2.0,-2.0),2+frandom(3.0,-3.0),0,frandom(3.0,-3.0))
	  "####" AAAAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(8.5,-8.5),0,-12+frandom(2.0,-2.0),2+frandom(3.0,-3.0),0,frandom(3.0,-3.0)) 
      //2RNF A 0 A_FireBullets(12,4,64,5*random(2.0,3.0),"HBulletPuff",FBF_NORANDOM)
      "####" A 0 A_SetPitch(pitch-2.75)//A_SetPitch(pitch-1.25)
      "####" A 0 A_SetAngle(angle+2.75)//A_SetAngle(angle+0.375)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-6,-1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-15,-1)
      "####" A 1 Bright A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch-3)//A_SetPitch(pitch-0.5)
      "####" A 0 A_SetAngle(angle+3)//A_SetAngle(angle+0.5)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-6,-1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-15,-1)
      "####" B 1 Bright A_ZoomFactor(0.98)
      "####" A 0 A_SetPitch(pitch-3)//A_SetPitch(pitch-0.5)
      "####" A 0 A_SetAngle(angle+3)//A_SetAngle(angle+0.5)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-6,-1)
	  "####" A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-15,-1)
      "####" C 1 Bright A_ZoomFactor(0.95)
	  2CNH A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UNH A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2RNH A 0
      "####" A 1 A_ZoomFactor(0.9)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-1.25)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle-1.25)
      "####" B 1 A_ZoomFactor(0.8)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.75)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle-0.75)
      "####" C 1 A_ZoomFactor(0.75)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.65)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle-0.65)
      "####" D 1 A_ZoomFactor(0.725)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.45)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle-0.45)
      "####" E 1 A_ZoomFactor(0.71)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.35)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle-0.35)
      "####" F 1 A_ZoomFactor(0.73)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch-0.25)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle-0.25)
      "####" G 1 A_ZoomFactor(0.8)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch-0.15)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle-0.15)
      "####" H 1 A_ZoomFactor(0.82)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.15)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle-0.25)
      "####" I 1 A_ZoomFactor(0.83)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle-0.25)
      "####" J 1 A_ZoomFactor(0.85)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.15)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle-0.15)
      "####" K 1 A_ZoomFactor(0.87)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.35)
      "####" L 1 A_ZoomFactor(0.89)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.35)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle+0.15)
      "####" M 1 A_ZoomFactor(0.92)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle+0.25)
      "####" N 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle+0.25)
      "####" O 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle+0.35)
      "####" P 1 A_ZoomFactor(0.96)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle+0.25)
      "####" Q 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch+0.5)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle-0.5)//A_SetAngle(angle+0.25)
      "####" R 1 A_ZoomFactor(0.98)
      "####" A 0 //A_SetPitch(pitch+0.35)
      "####" A 0 //A_SetAngle(angle+0.25)
      "####" S 1 A_ZoomFactor(0.99)
      "####" A 0 //A_SetPitch(pitch+0.25)
      "####" A 0 //A_SetAngle(angle+0.15)
      "####" T 1 A_ZoomFactor(1)
	  2CNR A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UNR A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2RNR A 0
	  "####" ABCDEFGHIJKL 1
      "####" A 0 A_PlaySound("Ironblast/Pump/In",6,0.6)
	  "####" MNOPQRSTTT 1 A_SetPitch(Pitch+1)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  "####" T 0 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  "####" T 1 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
      "####" A 0 A_PlaySound("Ironblast/Pump/Out",6,0.6)
	  "####" SRQPONMLKJ 1 A_SetPitch(Pitch-1)
	  "####" IHGFEDCBA 1
	  2CNG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UNG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2RNG A 0
	  "####" A 1 A_TakeInventory("LeftFireToken",1)
	  "####" A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	  Goto LIdle
	}
}
