ACTOR LonghornSelected : GenericToken {}
ACTOR LonghornStratFiring : GenericToken {}

#include "Decorate/Guns/Projectile/Longhorn.txt"

ACTOR Longhorn : GuncasterWeapon replaces GoldWand
{
   Inventory.PickupSound "Guncaster/Laugh1"
   Inventory.PickupMessage "$GOTLONGHORN"
   Obituary "$KILLLONGHORN"
   Weapon.UpSound "Longhorn/Up" 
   Weapon.SelectionOrder 3
   Weapon.AmmoGive 0
   Weapon.AmmoType "LonghornAmmo"
   Weapon.AmmoUse 1
   Weapon.SlotNumber 2
   Weapon.BobStyle InverseSmooth
   Weapon.BobSpeed 1.9
   Weapon.BobRangeY 0.5
   Weapon.BobRangeX 1.0
   Scale 1.1
   +NOALERT
   +NOAUTOAIM
   +INVENTORY.UNDROPPABLE
   States
   {
   Spawn:
      LGHG X -1
      Stop
   Ready:
      LCHK Z 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHK Z 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGHK Z 0
      "####" "#" 0 A_JumpIf(CallACS("GunslingerMode"), "ZweiReady")
      "####" "#" 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiReady")
	  "####" "#" 0 A_JumpIfInventory("LonghornStratActive",1,"StratReady")
   ReadyLoop:
	  TNT1 A 0 A_TakeInventory("RightFireToken")
      LCHK Z 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHK Z 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGHK Z 0
   	  "####" "#" 0 A_JumpIf(CallACS("GunslingerMode"),"ZweiReady")
      "####" "#" 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiReady")
	  "####" "#" 0 A_JumpIfInventory("LonghornStratActive",1,"StratActivate")
      "####" "#" 1 A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
      Loop
   StratActivate:
      LCBU A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBU A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGBU A 0
	  "####" ABCDEFG 1
	  "####" G 0 A_GiveInventory("LonghornStratActive",1)
   StratReady:
	  TNT1 A 0 A_TakeInventory("RightFireToken")
      LCBG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGBG A 0
   	  "####" A 0 A_JumpIf(CallACS("GunslingerMode"),"ZweiReady")
      "####" A 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiReady")
	  "####" A 0 A_JumpIfInventory("LonghornStratActive",1,1)
	  Goto StratDeactivate
	  "####" A 1 A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
	  Loop
   StratDeactivate:
      LCBU A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBU A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGBU A 0
      "####" GFEDCBA 1
	  "####" A 0 A_TakeInventory("LonghornStratActive",1)
	  Goto Ready
   DeselectMain:
      LCHK Z 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHK Z 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGHK Z 0
      "####" Z 0 A_TakeInventory("LonghornSelected",1)
      "####" Z 0 A_JumpIf(CallACS("GunslingerMode"), "ZweiDeselect")
      "####" Z 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiDeselect")
	  "####" Z 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
	  "####" Z 0 A_JumpIfInventory("LonghornStratActive",1,"StratDeselect")
      "####" Z 1 A_Lower
      "####" Z 0 A_Lower
      Loop
   StratDeselect:
      LCBG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGBG A 0
      "####" A 1 A_Lower
      "####" A 0 A_Lower
      Loop
   Select:
	  TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),3)
	  TNT1 A 0 A_JumpIfInventory("PowerGunzerking",1,2) 
	  TNT1 A 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
      LCHK Z 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHK Z 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGHK Z 0
      "####" Z 0 A_GiveInventory("LonghornSelected",1)
      "####" Z 0 A_JumpIf(CallACS("CrosshairMode"), 2)
      "####" Z 0 A_SetCrosshair(55)
      "####" Z 0 A_JumpIf(CallACS("GunslingerMode"), "ZweiSelect")
      "####" Z 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiSelect")
	  "####" Z 0 A_JumpIfInventory("LonghornStratActive",1,"StratSelect")
      "####" Z 1 A_Raise
      "####" Z 0 A_Raise
      Loop 
   StratSelect:
      LCBG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGBG A 0
      "####" A 1 A_Raise
      "####" A 0 A_Raise
      Loop
   Fire:
	  "####" A 0 A_JumpIfInventory("LonghornStratActive",1,"StratFire")
   FireCont: //Why not Hold? Well, it causes some silly issue I want to ommit when casting spells and running out of mana.
	  "####" A 0 A_GiveInventory("RightFireToken")
      "####" A 0 A_PlaySound("Longhorn/Fire",1,0.4)
      "####" A 0 A_PlaySound("Longhorn/Alt",5,0.4)
      "####" A 0 A_PlaySound("Longhorn/Add",6,0.4)
      "####" A 0 A_SetBlend("Yellow",0.1,7)
      "####" A 0 A_AlertMonsters
      "####" A 0 A_Quake (5, 8, 0, 3, none)
	  "####" A 0 A_JumpIfInventory("LonghornStrat",1,8)
      "####" AAAAA 0 A_FireCustomMissile("LonghornInvisBullet",0,0,7,2,FPF_NOAUTOAIM)
      "####" A 0 A_FireCustomMissile("LonghornBullet",0,1,7,2,FPF_NOAUTOAIM)
	  "####" A 0 A_Jump(256,2)
      "####" A 0 A_FireCustomMissile("LonghornRipperBullet",0,1,7,2,FPF_NOAUTOAIM)
	  //"####" AAAAA 0 A_FireBullets(0.5,0.25,-1,9*random(1,3),"InvisPuff",FBF_NORANDOM)
      //"####" A 0 A_FireBullets(0.5,0.25,-1,9*random(1,3),"HuegPuff",FBF_USEAMMO|FBF_NORANDOM)
      "####" A 0 A_SetPitch(pitch-2.75)//A_SetPitch(pitch-1.0)
      "####" A 0 A_SetAngle(angle-2.75)//A_SetAngle(angle-1.0)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,14,2)
	  LCHF A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHF A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGHF A 0
      "####" A 1 Bright A_ZoomFactor(0.99)
	  
	  LCHR A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHR A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGHR A 0
      "####" A 0 A_SetPitch(pitch-2)//A_SetPitch(pitch-2.75)
      "####" A 0 A_SetAngle(angle-2)//A_SetAngle(angle-2.5)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,18,5)
      "####" A 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch-2)//A_SetPitch(pitch-1.85)
      "####" A 0 A_SetAngle(angle-2)//A_SetAngle(angle-1.85)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,22,8)
      "####" B 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-1.25)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-1.25)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,26,12)
	  "####" C 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-1.0)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-1.0)
	  "####" D 1 A_ZoomFactor(0.93)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.75)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.75)
	  "####" E 1 A_ZoomFactor(0.935)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.55)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.55)
	  "####" F 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.55)//A_SetPitch(pitch-0.35)
      "####" A 0 A_SetAngle(angle+0.55)//A_SetAngle(angle-0.35)
      //"####" A 0 A_PlaySound("Longhorn/Load",6,0.2)
	  "####" G 1 A_ZoomFactor(0.945)
	  "####" H 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+0.15)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle-0.15)
	  "####" I 1 A_ZoomFactor(0.96)
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle-0.25)
	  "####" J 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+0.35)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle+0.35)
	  "####" K 1 A_ZoomFactor(0.98)
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+0.85)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle+0.85)
	  "####" L 1 A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+1.05)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle+1.05)
	  "####" M 1 A_ZoomFactor(0.995)
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+1.25)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle+1.25)
	  "####" N 1 A_ZoomFactor(1)
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+0.95)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle+0.95)
	  "####" O 1
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+0.75)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle+0.75)
	  "####" P 1
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+0.55)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle+0.55)
	  "####" Q 1
      "####" A 0 A_SetPitch(pitch+0.4)//A_SetPitch(pitch+0.45)
      "####" A 0 A_SetAngle(angle+0.4)//A_SetAngle(angle+0.45)
	  "####" R 1
      "####" A 0 //A_SetPitch(pitch+0.35)
      "####" A 0 //A_SetAngle(angle+0.35)
	  "####" S 1
      "####" A 0 //A_SetPitch(pitch+0.25)
      "####" A 0 //A_SetAngle(angle+0.25)
	  "####" T 1
      "####" A 0 //A_SetPitch(pitch+0.15)
      "####" A 0 //A_SetAngle(angle+0.15)
	  "####" U 1
	  "####" V 1
	  
      LCHK Z 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHK Z 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGHK Z 0
	  "####" Z 1
	  "####" A 0 A_GiveInventory("RightFireToken")
      "####" Z 0 A_ReFire("FireCont")
      Goto ReadyLoop
   StratFire:
      LCBG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGBG A 0
	  /*"####" A 0 A_JumpIfInventory("HexenCounter",1,2) 
	  "####" A 1 A_JumpIfInventory("LonghornAmmo",2,2)
	  Goto Ready
	  "####" A 1 A_JumpIfInventory("BlueMana",4,1)
	  Goto Ready*/
	  "####" A 0 A_GiveInventory("RightFireToken")
      "####" BCD 1
      "####" A 0 A_PlaySound("Longhorn/Fire",1,0.4)
      "####" A 0 A_PlaySound("Longhorn/Alt",5,0.4)
      "####" A 0 A_PlaySound("Longhorn/Add",6,0.4)
      "####" A 0 A_SetBlend("Yellow",0.1,7)
      "####" A 0 A_AlertMonsters
	  //"####" A 0 A_JumpIfInventory("HexenCounter",1,3)
      //"####" A 0 A_TakeInventory("LonghornAmmo",2,TIF_NOTAKEINFINITE)
	  //"####" A 0 A_Jump(256,2)
      //"####" A 0 A_TakeInventory("BlueMana",4,TIF_NOTAKEINFINITE)
      "####" A 0 A_Quake (3, 8, 0, 3, none)
	  "####" A 0 A_JumpIfInventory("LonghornStrat",1,8)
      "####" AAAAA 0 A_FireCustomMissile("LonghornInvisBullet",0,0,7,2,FPF_NOAUTOAIM)
      "####" A 0 A_FireCustomMissile("LonghornBullet",0,1,7,2,FPF_NOAUTOAIM)
	  "####" A 0 A_Jump(256,2)
      "####" A 0 A_FireCustomMissile("LonghornRipperBullet",0,1,7,2,FPF_NOAUTOAIM)
      "####" A 0 A_SetPitch(pitch-0.2)//A_SetPitch(pitch-1.0)
      "####" A 0 A_SetAngle(angle-0.2)//A_SetAngle(angle-1.0)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,14,2)
      "####" E 1 Bright A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch-1)
      "####" A 0 A_SetAngle(angle-1)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,18,5)
      "####" F 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch-0.75)
      "####" A 0 A_SetAngle(angle-0.75)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,22,8)
      "####" G 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch-0.2)
      "####" A 0 A_SetAngle(angle-0.2)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,26,12)
	  "####" H 1 A_ZoomFactor(0.96)
      "####" A 0 A_SetPitch(pitch-0.45)
      "####" A 0 A_SetAngle(angle-0.45)
	  "####" I 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch-0.35)
      "####" A 0 A_SetAngle(angle-0.35)
	  "####" J 1 A_ZoomFactor(0.98)
      "####" A 0 A_SetPitch(pitch-0.25)
      "####" A 0 A_SetAngle(angle-0.25)
      //"####" A 0 A_PlaySound("Longhorn/Load",6,0.2)
	  "####" J 1 A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch+0.25)
      "####" A 0 A_SetAngle(angle+0.25)
	  "####" K 1 A_ZoomFactor(1)
      "####" LMN 1
	  "####" A 0 A_GiveInventory("RightFireToken")
      "####" A 0 A_ReFire("StratFire")
      Goto StratReady
	AltFire:
	  "####" A 0 A_GiveInventory("RightFireToken")
      LCHM A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHM A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
      LGHM A 0
	  "####" A 0 A_JumpIfInventory("LonghornStratActive",1,1)
	  Goto Super::CheckForMagic
      LCBM A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBM A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGBM 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")
	  "####" A 0 A_JumpIfInventory("LonghornStratActive",1,"Strat")
	  Goto Regular
	Regular:
	  "####" A 0 A_JumpIfInventory("PowerMidasMode",1,5)
	  LCHK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGHK A 0
	  "####" A 0
	  Goto Super::Zoom
	  LCHK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUHK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGMK A 0
	  "####" A 0
	  Goto Super::Zoom
	  
	Strat:
	  "####" A 0 A_JumpIfInventory("PowerMidasMode",1,5)
	  LCBK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LGBK A 0
	  "####" A 0
	  Goto Super::Zoom
	  LCBK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  LUBK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  LBMK A 0
	  "####" A 0
	  Goto Super::Zoom
	  
	Gunzerk:
	  "####" A 0 A_GunFlash("LeftKickBudge",GFF_NOEXTCHANGE)	
	  "####" A 0 A_JumpIfInventory("PowerMidasMode",1,5)
	  1CHK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UHK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1GHK A 0
	  "####" A 0
	  Goto Super::Zoom
	  1CHK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UHK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1GMK A 0
	  "####" A 0
	  Goto Super::Zoom
	  
	LeftKickBudge:
	  2CHK A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UHK A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2GHK A 0
	  "####" ABCDEFGHIHGFEDCBA 1
	  "####" Z 10
	  "####" Z 0 
	  {
		If((CountInv("PowerGunzerking") > 0) || CallACS("GunslingerMode"))
		{
			A_GunFlash("Flash",GFF_NOEXTCHANGE);
		}
		Else
		{
			A_GunFlash("Nullify",GFF_NOEXTCHANGE);
		}
	  }

	  Stop

	  
	//Zweihander

   ZweiSelect:
	  3CHG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  3UHG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  3GHG A 0
      "####" A 0 A_Raise
      "####" A 1 A_Raise
      Loop
   ZweiDeselect:
	  "####" A 0 A_TakeInventory("SynthFireActive",1)
	  "####" A 0 A_TakeInventory("SynthFireLeft",1)
	  "####" A 0 A_TakeInventory("SynthFireRight",1)
	  "####" A 0 A_GunFlash("Nullify")
   Zweihander:
	  3CHG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  3UHG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  3GHG A 0
	  "####" A 0 A_Lower
	  "####" A 1 A_Lower
	  Loop
   ZweiReady:
	  3CHG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  3UHG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  3GHG 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")
	  1CHG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UHG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1GHG A 0
	  "####" A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
	  "####" A 0 A_JumpIfInventory("LeftFireToken",1,3)
	  "####" A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWZOOM)
	  "####" 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")
	  Goto BackToReady
   BackToReady:
	  "####" A 0 A_GunFlash("Nullify")
	  Goto Ready
   RFire:
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"),2)
	  "####" A 0 A_JumpIfInventory("PowerGunzerking",1,1) 
	  Goto BackToReady
	  "####" A 0 A_JumpIfInventory("HexenCounter",1,"HexenR")
	  "####" A 1 A_JumpIfInventory("LonghornAmmo",1,"RConfirmed")
	  Goto RIdle
   HexenR:
	  "####" A 1 A_JumpIfInventory("BlueMana",2,1)
      Goto RIdle
   RConfirmed:
	  "####" A 0 A_GiveInventory("RightFireToken")
      "####" A 0 A_PlaySound("Longhorn/Fire",1,0.4)
      "####" A 0 A_PlaySound("Longhorn/Alt",5,0.4)
      "####" A 0 A_PlaySound("Longhorn/Add",6,0.4)
      "####" A 0 A_SetBlend("Yellow",0.1,7)
      //"####" A 0 A_Recoil(2.5)
      "####" A 0 A_AlertMonsters
      "####" A 0 A_Quake (5, 8, 0, 3, none)
	  //"####" A 0 A_TakeInventory("LonghornAmmo",1,TIF_NOTAKEINFINITE)
	  "####" A 0 A_JumpIfInventory("LonghornStrat",1,8)
      "####" AAAAA 0 A_FireCustomMissile("LonghornInvisBullet",0,0,10,2,FPF_NOAUTOAIM)
      "####" A 0 A_FireCustomMissile("LonghornBullet",0,1,10,2,FPF_NOAUTOAIM)
	  "####" A 0 A_Jump(256,2)
      "####" A 0 A_FireCustomMissile("LonghornRipperBullet",0,1,10,2,FPF_NOAUTOAIM)
	  //"####" AAAAA 0 A_FireBullets(0.5,0.25,-1,9*random(1,3),"InvisPuff",FBF_NORANDOM)
      //"####" A 0 A_FireBullets(0.5,0.25,-1,9*random(1,3),"HuegPuff",FBF_NORANDOM|FBF_USEAMMO)
      "####" A 0 A_SetPitch(pitch-1.75)//A_SetPitch(pitch-0.375)
      "####" A 0 A_SetAngle(angle-0.75)//A_SetAngle(angle-0.375)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,18,0)
	  
	  1CHF A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UHF A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1GHF A 0
      "####" A 1 Bright A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch-1)//A_SetPitch(pitch-0.5)
      "####" A 0 //A_SetAngle(angle-0.425)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,22,4)
	  1CHR A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UHR A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1GHR A 0
      "####" A 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch-1)//A_SetPitch(pitch-0.4)
      "####" A 0 //A_SetAngle(angle-0.4)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,26,8)
      "####" B 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.375)
      "####" A 0 A_SetAngle(angle+0.15)//A_SetAngle(angle-0.375)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,30,12)
	  "####" C 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.325)
      "####" A 0 A_SetAngle(angle+0.15)//A_SetAngle(angle-0.325)
	  "####" D 1 A_ZoomFactor(0.93)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.325)
      "####" A 0 A_SetAngle(angle+0.15)//A_SetAngle(angle-0.825)
	  "####" E 1 A_ZoomFactor(0.935)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.25)
      "####" A 0 A_SetAngle(angle+0.15)//A_SetAngle(angle-0.25)
	  "####" F 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.175)
      "####" A 0 A_SetAngle(angle+0.15)//A_SetAngle(angle-0.175)
      //"####" A 0 A_PlaySound("Longhorn/Load",6,0.2)
	  "####" G 1 A_ZoomFactor(0.945)
	  "####" H 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.075)
      "####" A 0 //A_SetAngle(angle-0.075)
	  "####" I 1 A_ZoomFactor(0.96)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.125)
      "####" A 0 //A_SetAngle(angle-0.125)
	  "####" J 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.175)
      "####" A 0 //A_SetAngle(angle+0.175)
	  "####" K 1 A_ZoomFactor(0.98)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.225)
      "####" A 0 //A_SetAngle(angle+0.225)
	  "####" L 1 A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.325)
      "####" A 0 //A_SetAngle(angle+0.325)
	  "####" M 1 A_ZoomFactor(0.995)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.275)
      "####" A 0 //A_SetAngle(angle+0.275)
	  "####" N 1 A_ZoomFactor(1)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.225)
      "####" A 0 //A_SetAngle(angle+0.225)
	  "####" O 1
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.175)
      "####" A 0 //A_SetAngle(angle+0.175)
	  "####" P 1
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.125)
      "####" A 0 //A_SetAngle(angle+0.125)
	  "####" Q 1
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.075)
      "####" A 0 //A_SetAngle(angle+0.075)
	  "####" R 1
      "####" A 0 //A_SetPitch(pitch+0.05)
      "####" A 0 //A_SetAngle(angle+0.05)
	  "####" S 1
      "####" A 0 //A_SetPitch(pitch+0.025)
      "####" A 0 //A_SetAngle(angle+0.025)
	  "####" T 1
      "####" A 0 //A_SetPitch(pitch+0.0125)
      "####" A 0 //A_SetAngle(angle+0.0125)
	  "####" U 1
	  "####" V 1
	  1CHG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  1UHG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  1GHG A 0
	  "####" A 0 A_TakeInventory("RightFireToken")
	  "####" A 1
	  Goto RIdle
	  
   //Left
   
   Nullify:
	  TNT1 A 0 A_TakeInventory("LeftFireToken",1)
	  Stop
   Flash:
	  TNT1 A 0 A_Light0
   LIdle:
	  2CHG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UHG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2GHG A 0
	  "####" A 1 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	  Loop
   LFire:
      "####" A 0 A_JumpIf(CallACS("GunslingerMode"),2)
	  "####" A 0 A_JumpIfInventory("PowerGunzerking",1,1) 
	  Goto Nullify
	  "####" A 0 A_JumpIfInventory("HexenCounter",1,"HexenL")
	  "####" A 1 A_JumpIfInventory("LonghornAmmo",1,"LConfirmed")
	  Goto LIdle
   HexenL:
	  "####" A 1 A_JumpIfInventory("BlueMana",2,1)
      Goto LIdle
   LConfirmed:
      "####" A 0 A_GiveInventory("LeftFireToken",1)
      "####" A 0 A_PlaySound("Longhorn/Fire",1,0.4)
      "####" A 0 A_PlaySound("Longhorn/Alt",5,0.4)
      "####" A 0 A_PlaySound("Longhorn/Add",6,0.4)
      "####" A 0 A_SetBlend("Yellow",0.1,7)
      //"####" A 0 A_Recoil(2.5)
      "####" A 0 A_AlertMonsters
      "####" A 0 A_Quake (5, 8, 0, 3, none)
	  //"####" A 0 A_TakeInventory("LonghornAmmo",1,TIF_NOTAKEINFINITE)
	  "####" A 0 A_JumpIfInventory("LonghornStrat",1,8)
      "####" AAAAA 0 A_FireCustomMissile("LonghornInvisBullet",0,0,-10,2,FPF_NOAUTOAIM)
      "####" A 0 A_FireCustomMissile("LonghornBullet",0,1,-10,2,FPF_NOAUTOAIM)
	  "####" A 0 A_Jump(256,2)
      "####" A 0 A_FireCustomMissile("LonghornRipperBullet",0,1,-10,2,FPF_NOAUTOAIM)
	  //"####" AAAAA 0 A_FireBullets(0.5,0.25,-1,9*random(1,3),"InvisPuff",FBF_NORANDOM)
      //"####" A 0 A_FireBullets(0.5,0.25,-1,9*random(1,3),"HuegPuff",FBF_NORANDOM|FBF_USEAMMO)
      "####" A 0 A_SetPitch(pitch-1.75)//A_SetPitch(pitch-0.325)
      "####" A 0 A_SetAngle(angle+0.75)//A_SetAngle(angle+0.325)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,-18,0)
	  2CHF A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UHF A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2GHF A 0
      "####" A 1 Bright A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch-1)//A_SetPitch(pitch-0.5)
      "####" A 0 A_SetAngle(angle+1)//A_SetAngle(angle+0.425)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,-22,4)
	  2CHR A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UHR A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2GHR A 0
      "####" A 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch-1)//A_SetPitch(pitch-0.4)
      "####" A 0 A_SetAngle(angle+1)//A_SetAngle(angle+0.4)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,-26,8)
      "####" B 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.325)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle+0.325)
	  "####" AA 0 A_FireCustomMissile("GunsmokeSpawner_Small",0,0,-30,12)
	  "####" C 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.35)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle+0.35)
	  "####" D 1 A_ZoomFactor(0.93)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.325)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle+0.825)
	  "####" E 1 A_ZoomFactor(0.935)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.25)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle+0.25)
	  "####" F 1 A_ZoomFactor(0.94)
      "####" A 0 A_SetPitch(pitch+0.35)//A_SetPitch(pitch-0.175)
      "####" A 0 A_SetAngle(angle-0.55)//A_SetAngle(angle+0.175)
      //"####" A 0 A_PlaySound("Longhorn/Load",6,0.2)
	  "####" G 1 A_ZoomFactor(0.945)
	  "####" H 1 A_ZoomFactor(0.95)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.075)
      "####" A 0 //A_SetAngle(angle+0.075)
	  "####" I 1 A_ZoomFactor(0.96)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.125)
      "####" A 0 //A_SetAngle(angle+0.125)
	  "####" J 1 A_ZoomFactor(0.97)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.175)
      "####" A 0 //A_SetAngle(angle-0.175)
	  "####" K 1 A_ZoomFactor(0.98)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.225)
      "####" A 0 //A_SetAngle(angle-0.225)
	  "####" L 1 A_ZoomFactor(0.99)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.325)
      "####" A 0 //A_SetAngle(angle-0.325)
	  "####" M 1 A_ZoomFactor(0.995)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.275)
      "####" A 0 //A_SetAngle(angle-0.275)
	  "####" N 1 A_ZoomFactor(1)
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.225)
      "####" A 0 //A_SetAngle(angle-0.225)
	  "####" O 1
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.175)
      "####" A 0 //A_SetAngle(angle-0.175)
	  "####" P 1
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.125)
      "####" A 0 //A_SetAngle(angle-0.125)
	  "####" Q 1
      "####" A 0 A_SetPitch(pitch+0.2)//A_SetPitch(pitch+0.075)
      "####" A 0 //A_SetAngle(angle-0.075)
	  "####" R 1
      "####" A 0 //A_SetPitch(pitch+0.05)
      "####" A 0 //A_SetAngle(angle-0.05)
	  "####" S 1
      "####" A 0 //A_SetPitch(pitch+0.025)
      "####" A 0 //A_SetAngle(angle-0.025)
	  "####" T 1
      "####" A 0 //A_SetPitch(pitch+0.0125)
      "####" A 0 //A_SetAngle(angle-0.0125)
	  "####" U 1
	  "####" V 1 
	  2CHG A 0 A_JumpIfInventory("PowerSuitToken",1,3)
	  2UHG A 0 A_JumpIfInventory("PowerSuitProtect",1,2)
	  2GHG A 0
	  "####" A 1 A_TakeInventory("LeftFireToken",1) 
	  Goto LIdle
	}
}
