//Standard
#include "Decorate/Guns/Projectile/Dreadful.txt"

//Core upgrade
#include "Decorate/Items/TibCore.txt"
#include "Decorate/Guns/Projectile/CoreDreadful.txt"

ACTOR "Old Dreadful" : GuncasterWeapon replaces Mace
{
   Game Doom
   Game Heretic
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "$GOTDREADFUL"
   Obituary "$KILLDREADFUL"
   Weapon.UpSound "Dreadful/Up" 
   Weapon.SelectionOrder 6
   Weapon.AmmoGive 2
   Weapon.AmmoType "TiberiumAmmo"
   Weapon.AmmoUse 1
   Weapon.Kickback 40
   Weapon.SlotNumber 7
   Weapon.BobStyle InverseSmooth
   Weapon.BobSpeed 1.0
   Weapon.BobRangeY 0.8
   Weapon.BobRangeX 1.0
   +NOAUTOAIM
   +NOAUTOFIRE
   +NOALERT
   States
   {
   Spawn:
      BFGG X -1
      Stop
   Ready:
      TNT1 A 0 A_JumpIfInventory("TibCore",1,"CoreReady")
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), "ZweiReady")
      TNT1 A 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiReady")
      BFGG A 0 A_PlaySound("Dreadful/Loop",5,0.4,1)
      BFGG ABCDCB 2 A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
      Loop
   DeselectMain:
      TNT1 A 0 A_StopSound(5)
      TNT1 A 0 A_JumpIfInventory("TibCore",1,"CoreDeselectMain")
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),"ZweiDeselect")
      TNT1 A 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiDeselect")
      BFGG N 1 A_Lower
      BFGG N 0 A_Lower
      Loop
   Select:
      TNT1 A 0 A_JumpIf(CallACS("CrosshairMode"), 2)
      TNT1 A 0 A_SetCrosshair(50)
      TNT1 A 0 A_JumpIfInventory("TibCore",1,"CoreSelect")
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), "ZweiSelect")
      TNT1 A 0 A_JumpIfInventory("PowerGunzerking",1,"ZweiSelect")
      BFGG N 1 A_Raise
      Loop  
   Fire:
      TNT1 A 0 A_JumpIfInventory("TibCore",1,"CoreFire")
      BFGF A 0 A_PlaySound("Dreadful/Fire",1,0.4)
      BFGG DCBA 2
	  BFGG N 15
      BFGG ABCD 2 Bright
      BFGF A 1 Bright A_ZoomFactor(0.99)
      BFGF A 0 A_SetPitch(pitch-0.5)
      BFGF A 0 A_SetAngle(angle-0.5)
      BFGF B 1 Bright A_ZoomFactor(0.97)
      BFGF A 0 A_SetPitch(pitch-1)
      BFGF A 0 A_SetAngle(angle-1)
      BFGF A 0 A_PlaySound("Dreadful/Add",6,0.5)
      BFGF A 0 A_SetBlend("Green",0.2,15)
      BFGF A 0 A_Recoil(25)
      BFGF A 0 A_AlertMonsters
      BFGF A 0 A_Quake (7, 25, 0, 24, none)
      BFGF A 0 A_FireCustomMissile("Dreadball",0,1,15,0)
      BFGF A 0 A_SetPitch(pitch-2.5)
      BFGF A 0 A_SetAngle(angle-2.5)
      BFGF C 1 Bright A_ZoomFactor(0.95)
      BFGF A 0 A_SetPitch(pitch-2)
      BFGF A 0 A_SetAngle(angle-2)
      BFGF D 1 Bright A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch-1)
      TNT1 A 0 A_SetAngle(angle-1)
      BFGF D 1 Bright A_ZoomFactor(0.88)
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      BFGF E 1 Bright A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      BFGF F 1 Bright A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      BFGF G 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      BFGF H 1 A_ZoomFactor(0.83)
      TNT1 A 0 A_SetPitch(pitch-0.1)
      TNT1 A 0 A_SetAngle(angle-0.1)
      BFGF I 1
      BFGF J 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      BFGF K 1 A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      BFGF L 1 A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      BFGF M 1 A_ZoomFactor(0.87)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      BFGF N 1 A_ZoomFactor(0.89)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      BFGF N 1 A_ZoomFactor(0.9)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      BFGF N 1 A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      BFGF O 1 A_ZoomFactor(0.93)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      BFGF P 1 A_ZoomFactor(0.95)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      BFGF Q 1 A_ZoomFactor(0.97)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      BFGF R 1 A_ZoomFactor(0.98)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      BFGF S 1 A_ZoomFactor(0.99)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
	  BFGG CB 2 A_ZoomFactor(1)
      BFGG CDCB 3
      Goto Ready
	AltFire:
	  BFGM A 0 A_StopSound(5)
	  Goto Super::CheckForMagic
	Zoom:
	  BFGK A 0 A_JumpIfInventory("TibCore",1,"CoreZoom")
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),2)
	  BFGK A 0 A_JumpIfInventory("PowerGunzerking",1,1)
	  Goto Super::Zoom
	  1FGK A 0
	  Goto Super::Zoom
	  
	//Zweihander

   ZweiSelect:
      NFGG N 1 A_Raise
      Loop
   ZweiDeselect:
	  TNT1 A 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
	  TNT1 A 0 A_TakeInventory("SynthFireActive",1)
	  TNT1 A 0 A_TakeInventory("SynthFireLeft",1)
	  TNT1 A 0 A_TakeInventory("SynthFireRight",1)
   Zweihander:
	  NFGG N 0 A_Lower
	  NFGG N 1 A_Lower
	  Loop
   ZweiReady:
	  NFGG N 0 A_GiveInventory("SynthFireActive",1)
	  NFGG N 0 ACS_NamedExecuteAlways("SynthLeft")
	  NFGG N 0 ACS_NamedExecuteAlways("SynthRight")
	  NFGG N 0 A_Gunflash("Flash",GFF_NOEXTCHANGE)
	  Goto RIdle
  
   //Right
   
   RIdle:
      1FGG A 0 A_JumpIfInventory("TibCore",1,"CoreRIdle")
      1FGG A 0 A_PlaySound("Dreadful/Loop",5,0.4,1)
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG B 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG B 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG C 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG C 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG D 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG D 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG C 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG C 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG B 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
      1FGG B 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), "RIdle")
	  1FGG A 0 A_JumpIfInventory("PowerGunzerking",1,"RIdle") 
	  Goto BackToReady
   BackToReady:
	  1FGG A 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
	  Goto Ready
   RFire:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), 2)
	  1FGG A 0 A_JumpIfInventory("PowerGunzerking",1,1) 
	  Goto BackToReady
	  1FGG N 0 A_JumpIfInventory("TiberiumAmmo",1,2)
	  1FGG N 1 A_StopSound(5)
	  Goto RIdle
      1FGF A 0 A_PlaySound("Dreadful/Fire",1,0.4)
      1FGG DCBA 2
	  1FGG N 15
      1FGG ABCD 2 Bright
      1FGF A 1 Bright A_ZoomFactor(0.99)
      1FGF A 0 A_SetPitch(pitch-0.5)
      1FGF A 0 A_SetAngle(angle-0.5)
      1FGF B 1 Bright A_ZoomFactor(0.97)
      1FGF A 0 A_SetPitch(pitch-1)
      1FGF A 0 A_SetAngle(angle-1)
      1FGF A 0 A_PlaySound("Dreadful/Add",6,0.5)
      1FGF A 0 A_SetBlend("Green",0.2,15)
      1FGF A 0 A_Recoil(12.5)
      1FGF A 0 A_AlertMonsters
      1FGF A 0 A_Quake (7, 25, 0, 24, none)
      1FGF A 0 A_FireCustomMissile("Dreadball",0,0,21,0)
      1FGF A 0 A_TakeInventory("TiberiumAmmo",1,TIF_NOTAKEINFINITE)
      1FGF A 0 A_SetPitch(pitch-2.5)
      1FGF A 0 A_SetAngle(angle+2.5)
      1FGF C 1 Bright A_ZoomFactor(0.95)
      1FGF A 0 A_SetPitch(pitch-2)
      1FGF A 0 A_SetAngle(angle+2)
      1FGF D 1 Bright A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch-1)
      TNT1 A 0 A_SetAngle(angle+1)
      1FGF D 1 Bright A_ZoomFactor(0.88)
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      1FGF E 1 Bright A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      1FGF F 1 Bright A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      1FGF G 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      1FGF H 1 A_ZoomFactor(0.83)
      TNT1 A 0 A_SetPitch(pitch-0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      1FGF I 1
      1FGF J 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle-0.1)
      1FGF K 1 A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      1FGF L 1 A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      1FGF M 1 A_ZoomFactor(0.87)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      1FGF N 1 A_ZoomFactor(0.89)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      1FGF N 1 A_ZoomFactor(0.9)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      1FGF N 1 A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      1FGF O 1 A_ZoomFactor(0.93)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      1FGF P 1 A_ZoomFactor(0.95)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      1FGF Q 1 A_ZoomFactor(0.97)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      1FGF R 1 A_ZoomFactor(0.98)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle-0.1)
      1FGF S 1 A_ZoomFactor(0.99)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle-0.1)
	  1FGG CB 2 A_ZoomFactor(1)
      1FGG CDCB 3
	  1FGG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
	  Goto RIdle
	  
   //Left
	  
   Nullify:
	  TNT1 A 0
	  Stop
   Flash:
	  TNT1 A 0 A_Light0
   LIdle:
      1FGG A 0 A_JumpIfInventory("TibCore",1,"CoreLIdle")
	  2FGG A 0 A_PlaySound("Dreadful/Loop",5,0.4,1)
	  2FGG AABBCCDDCCBB 1 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	  Loop
   LFire:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), 2)
	  2FGG A 0 A_JumpIfInventory("PowerGunzerking",1,1) 
	  Goto Nullify
	  2FGG A 0 A_JumpIfInventory("TiberiumAmmo",1,2)
	  2FGG N 1 A_StopSound(5)
	  Goto LIdle
      2FGF A 0 A_PlaySound("Dreadful/Fire",1,0.4)
      2FGG DCBA 2
	  2FGG N 15
      2FGG ABCD 2 Bright
      2FGF A 1 Bright A_ZoomFactor(0.99)
      2FGF A 0 A_SetPitch(pitch-0.5)
      2FGF A 0 A_SetAngle(angle+0.5)
      2FGF B 1 Bright A_ZoomFactor(0.97)
      2FGF A 0 A_SetPitch(pitch-1)
      2FGF A 0 A_SetAngle(angle+1)
      2FGF A 0 A_PlaySound("Dreadful/Add",6,0.5)
      2FGF A 0 A_SetBlend("Green",0.2,15)
      2FGF A 0 A_Recoil(12.5)
      2FGF A 0 A_AlertMonsters
      2FGF A 0 A_Quake (7, 25, 0, 24, none)
      2FGF A 0 A_FireCustomMissile("Dreadball",0,0,-21,0)
      2FGF A 0 A_TakeInventory("TiberiumAmmo",1,TIF_NOTAKEINFINITE)
      2FGF A 0 A_SetPitch(pitch-2.5)
      2FGF A 0 A_SetAngle(angle-2.5)
      2FGF C 1 Bright A_ZoomFactor(0.95)
      2FGF A 0 A_SetPitch(pitch-2)
      2FGF A 0 A_SetAngle(angle-2)
      2FGF D 1 Bright A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch-1)
      TNT1 A 0 A_SetAngle(angle-1)
      2FGF D 1 Bright A_ZoomFactor(0.88)
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      2FGF E 1 Bright A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      2FGF F 1 Bright A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      2FGF G 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      2FGF H 1 A_ZoomFactor(0.83)
      TNT1 A 0 A_SetPitch(pitch-0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      2FGF I 1
      2FGF J 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      2FGF K 1 A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      2FGF L 1 A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      2FGF M 1 A_ZoomFactor(0.87)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      2FGF N 1 A_ZoomFactor(0.89)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      2FGF N 1 A_ZoomFactor(0.9)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      2FGF N 1 A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      2FGF O 1 A_ZoomFactor(0.93)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      2FGF P 1 A_ZoomFactor(0.95)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      2FGF Q 1 A_ZoomFactor(0.97)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      2FGF R 1 A_ZoomFactor(0.98)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      2FGF S 1 A_ZoomFactor(0.99)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
	  2FGG CB 2 A_ZoomFactor(1)
      2FGG CDCB 3
	  2FGG A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	  Goto LIdle
	  
	//Core-powered version
	
   CoreReady:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), "CoreZweiReady")
      TNT1 A 0 A_JumpIfInventory("PowerGunzerking",1,"CoreZweiReady")
      TFGG A 0 A_PlaySound("Dreadful/Loop",5,0.4,1)
      TFGG ABCDCB 2 A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
      Loop
   CoreDeselectMain:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), "CoreZweiDeselect")
      1FGG N 0 A_JumpIfInventory("PowerGunzerking",1,"CoreZweiDeselect")
      TFGG N 1 A_Lower
      TFGG N 0 A_Lower
      Loop
   CoreSelect:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), "CoreZweiSelect")
      TNT1 A 0 A_JumpIfInventory("PowerGunzerking",1,"CoreZweiSelect")
      TFGG N 1 A_Raise
      Loop  
   CoreFire:
      TFGF A 0 A_PlaySound("Dreadful/Fire",1,0.4)
      TFGG DCBA 2
	  TFGG N 15
      TFGG ABCD 2 Bright
      TFGF A 1 Bright A_ZoomFactor(0.99)
      TFGF A 0 A_SetPitch(pitch-0.5)
      TFGF A 0 A_SetAngle(angle-0.5)
      TFGF B 1 Bright A_ZoomFactor(0.97)
      TFGF A 0 A_SetPitch(pitch-1)
      TFGF A 0 A_SetAngle(angle-1)
      TFGF A 0 A_PlaySound("Dreadful/Add",6,0.5)
      TFGF A 0 A_SetBlend("Green",0.2,15)
      TFGF A 0 A_Recoil(25)
      TFGF A 0 A_AlertMonsters
      TFGF A 0 A_Quake (7, 25, 0, 24, none)
      TFGF A 0 A_FireCustomMissile("CoreDreadball1",0,0,00.000+15, -12.000)
      TFGF A 0 A_FireCustomMissile("CoreDreadball2",0,0,-10.392+15, 06.000)
      TFGF A 0 A_FireCustomMissile("CoreDreadball3",0,1, 10.392+15, 06.000)
      TFGF A 0 A_SetPitch(pitch-2.5)
      TFGF A 0 A_SetAngle(angle-2.5)
      TFGF C 1 Bright A_ZoomFactor(0.95)
      TFGF A 0 A_SetPitch(pitch-2)
      TFGF A 0 A_SetAngle(angle-2)
      TFGF D 1 Bright A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch-1)
      TNT1 A 0 A_SetAngle(angle-1)
      TFGF D 1 Bright A_ZoomFactor(0.88)
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      TFGF E 1 Bright A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      TFGF F 1 Bright A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      TFGF G 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      TFGF H 1 A_ZoomFactor(0.83)
      TNT1 A 0 A_SetPitch(pitch-0.1)
      TNT1 A 0 A_SetAngle(angle-0.1)
      TFGF I 1
      TFGF J 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      TFGF K 1 A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      TFGF L 1 A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      TFGF M 1 A_ZoomFactor(0.87)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      TFGF N 1 A_ZoomFactor(0.89)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      TFGF N 1 A_ZoomFactor(0.9)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      TFGF N 1 A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      TFGF O 1 A_ZoomFactor(0.93)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      TFGF P 1 A_ZoomFactor(0.95)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      TFGF Q 1 A_ZoomFactor(0.97)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      TFGF R 1 A_ZoomFactor(0.98)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      TFGF S 1 A_ZoomFactor(0.99)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
	  TFGG CB 2 A_ZoomFactor(1)
      TFGG CDCB 3
      Goto Ready

	CoreAltFire:
	  TFGM A 0 A_StopSound(5)
	  Goto Super::CheckForMagic
	CoreZoom:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),2)
	  TFGK A 0 A_JumpIfInventory("PowerGunzerking",1,1)
	  Goto Super::Zoom
	  2FGK A 0
	  Goto Super::Zoom
	  
	//Zweihander

   CoreZweiSelect:
      5FGG N 1 A_Raise
      Loop
   CoreZweiDeselect:
	  TNT1 A 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
	  TNT1 A 0 A_TakeInventory("SynthFireActive",1)
	  TNT1 A 0 A_TakeInventory("SynthFireLeft",1)
	  TNT1 A 0 A_TakeInventory("SynthFireRight",1)
   CoreZweihander:
	  5FGG N 0 A_Lower
	  5FGG N 1 A_Lower
	  Loop
   CoreZweiReady:
	  5FGG N 0 A_GiveInventory("SynthFireActive",1)
	  5FGG N 0 ACS_NamedExecuteAlways("SynthLeft")
	  5FGG N 0 ACS_NamedExecuteAlways("SynthRight")
	  5FGG N 0 A_Gunflash("CoreFlash",GFF_NOEXTCHANGE)
	  Goto CoreRIdle
  
   //Right
   
   CoreRIdle:
      3FGG A 0 A_PlaySound("Dreadful/Loop",5,0.4,1)
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG B 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG B 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG C 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG C 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG D 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG D 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG C 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG C 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG B 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
      3FGG B 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"), "CoreRIdle")
	  3FGG A 0 A_JumpIfInventory("PowerGunzerking",1,"CoreRIdle") 
	  Goto CoreBackToReady
   CoreBackToReady:
	  3FGG A 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
	  Goto Ready
   
   CoreRFire:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),2)
	  3FGG A 0 A_JumpIfInventory("PowerGunzerking",1,1) 
	  Goto CoreBackToReady
	  3FGG N 0 A_JumpIfInventory("TiberiumAmmo",1,2)
	  3FGG N 1 A_StopSound(5)
	  Goto CoreRIdle
      3FGF A 0 A_PlaySound("Dreadful/Fire",1,0.4)
      3FGG DCBA 2
	  3FGG N 15
      3FGG ABCD 2 Bright
      3FGF A 1 Bright A_ZoomFactor(0.99)
      3FGF A 0 A_SetPitch(pitch-0.5)
      3FGF A 0 A_SetAngle(angle-0.5)
      3FGF B 1 Bright A_ZoomFactor(0.97)
      3FGF A 0 A_SetPitch(pitch-1)
      3FGF A 0 A_SetAngle(angle-1)
      3FGF A 0 A_PlaySound("Dreadful/Add",6,0.5)
      3FGF A 0 A_SetBlend("Green",0.2,15)
      3FGF A 0 A_Recoil(12.5)
      3FGF A 0 A_AlertMonsters
      3FGF A 0 A_Quake (7, 25, 0, 24, none)
      3FGF A 0 A_FireCustomMissile("CoreDreadball1",0,0,00.000+21, -12.000)
      3FGF A 0 A_FireCustomMissile("CoreDreadball2",0,0,-10.392+21, 06.000)
      3FGF A 0 A_FireCustomMissile("CoreDreadball3",0,0, 10.392+21, 06.000)
      3FGF A 0 A_TakeInventory("TiberiumAmmo",1,TIF_NOTAKEINFINITE)
      3FGF A 0 A_SetPitch(pitch-2.5)
      3FGF A 0 A_SetAngle(angle+2.5)
      3FGF C 1 Bright A_ZoomFactor(0.95)
      3FGF A 0 A_SetPitch(pitch-2)
      3FGF A 0 A_SetAngle(angle+2)
      3FGF D 1 Bright A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch-1)
      TNT1 A 0 A_SetAngle(angle+1)
      3FGF D 1 Bright A_ZoomFactor(0.88)
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      3FGF E 1 Bright A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      3FGF F 1 Bright A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      3FGF G 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      3FGF H 1 A_ZoomFactor(0.83)
      TNT1 A 0 A_SetPitch(pitch-0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      3FGF I 1
      3FGF J 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle-0.1)
      3FGF K 1 A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      3FGF L 1 A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      3FGF M 1 A_ZoomFactor(0.87)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      3FGF N 1 A_ZoomFactor(0.89)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      3FGF N 1 A_ZoomFactor(0.9)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      3FGF N 1 A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      3FGF O 1 A_ZoomFactor(0.93)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      3FGF P 1 A_ZoomFactor(0.95)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      3FGF Q 1 A_ZoomFactor(0.97)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      3FGF R 1 A_ZoomFactor(0.98)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle-0.1)
      3FGF S 1 A_ZoomFactor(0.99)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle-0.1)
	  3FGG CB 2 A_ZoomFactor(1)
      3FGG CDCB 3
	  3FGG A 0 A_JumpIfInventory("SynthFireRight",1,"CoreRFire")
	  Goto CoreRIdle
	  
   //Left
	  
   CoreFlash:
	  TNT1 A 0 A_Light0
   CoreLIdle:
	  4FGG A 0 A_PlaySound("Dreadful/Loop",5,0.4,1)
	  4FGG AABBCCDDCCBB 1 A_JumpIfInventory("SynthFireLeft",1,"CoreLFire")
	  Loop
   CoreLFire:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),2)
	  4FGG A 0 A_JumpIfInventory("PowerGunzerking",1,1) 
	  Goto Nullify
	  4FGG N 0 A_JumpIfInventory("TiberiumAmmo",1,2)
	  4FGG N 1 A_StopSound(5)
	  Goto CoreLIdle
      4FGF A 0 A_PlaySound("Dreadful/Fire",1,0.4)
      4FGG DCBA 2
	  4FGG N 15
      4FGG ABCD 2 Bright
      4FGF A 1 Bright A_ZoomFactor(0.99)
      4FGF A 0 A_SetPitch(pitch-0.5)
      4FGF A 0 A_SetAngle(angle+0.5)
      4FGF B 1 Bright A_ZoomFactor(0.97)
      4FGF A 0 A_SetPitch(pitch-1)
      4FGF A 0 A_SetAngle(angle+1)
      4FGF A 0 A_PlaySound("Dreadful/Add",6,0.5)
      4FGF A 0 A_SetBlend("Blue",0.2,15)
      4FGF A 0 A_Recoil(12.5)
      4FGF A 0 A_AlertMonsters
      4FGF A 0 A_Quake (7, 25, 0, 24, none)
      4FGF A 0 A_FireCustomMissile("CoreDreadball1",0,0,00.000-21, -12.000)
      4FGF A 0 A_FireCustomMissile("CoreDreadball2",0,0,-10.392-21, 06.000)
      4FGF A 0 A_FireCustomMissile("CoreDreadball3",0,0, 10.392-21, 06.000)
      4FGF A 0 A_TakeInventory("TiberiumAmmo",1,TIF_NOTAKEINFINITE)
      4FGF A 0 A_SetPitch(pitch-2.5)
      4FGF A 0 A_SetAngle(angle-2.5)
      4FGF C 1 Bright A_ZoomFactor(0.95)
      4FGF A 0 A_SetPitch(pitch-2)
      4FGF A 0 A_SetAngle(angle-2)
      4FGF D 1 Bright A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch-1)
      TNT1 A 0 A_SetAngle(angle-1)
      4FGF D 1 Bright A_ZoomFactor(0.88)
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      4FGF E 1 Bright A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      4FGF F 1 Bright A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      4FGF G 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch-0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      4FGF H 1 A_ZoomFactor(0.83)
      TNT1 A 0 A_SetPitch(pitch-0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      4FGF I 1
      4FGF J 1 A_ZoomFactor(0.84)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      4FGF K 1 A_ZoomFactor(0.85)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      4FGF L 1 A_ZoomFactor(0.86)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      4FGF M 1 A_ZoomFactor(0.87)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      4FGF N 1 A_ZoomFactor(0.89)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle-0.5)
      4FGF N 1 A_ZoomFactor(0.9)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      4FGF N 1 A_ZoomFactor(0.91)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      4FGF O 1 A_ZoomFactor(0.93)
      TNT1 A 0 A_SetPitch(pitch+0.5)
      TNT1 A 0 A_SetAngle(angle+0.5)
      4FGF P 1 A_ZoomFactor(0.95)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle-0.25)
      4FGF Q 1 A_ZoomFactor(0.97)
      TNT1 A 0 A_SetPitch(pitch+0.25)
      TNT1 A 0 A_SetAngle(angle+0.25)
      4FGF R 1 A_ZoomFactor(0.98)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
      4FGF S 1 A_ZoomFactor(0.99)
      TNT1 A 0 A_SetPitch(pitch+0.1)
      TNT1 A 0 A_SetAngle(angle+0.1)
	  4FGG CB 2 A_ZoomFactor(1)
      4FGG CDCB 3
	  4FGG A 0 A_JumpIfInventory("SynthFireLeft",1,"CoreLFire")
	  Goto CoreLIdle
	}
}