//Reimagined-TLCA-Fixes
Actor "INFEnragedLegendaryASG" : "NewEnragedLegendaryASG" Replaces "EnragedLegendaryASG"
{
Tag "Enraged Legendary Assault Shotgun"
States
{
  ChangeMode:
	TNT1 A 0 A_TakeInventory("RailgunAction")
	TNT1 A 0 A_JumpIfInventory("EnragedASGMode1",1,"ChangeMode2")
	TNT1 A 0 A_Print("Slug Rounds")
	TNT1 A 0 A_PlaySound("EASG/SLUGActivate")
	TNT1 A 0 A_GiveInventory("EnragedASGMode1")
	EASG A 3 Offset(0,34)
	EASG A 2 Offset(0,37)
	EASG A 2 Offset(0,40)
	EAS2 A 2 Offset(0,37)
	EAS2 A 3 Offset(0,34)
	TNT1 A 0 Offset(0,32)
	Goto Ready2
  ChangeMode2:
	TNT1 A 0 A_Print("Enraged Shells")
	TNT1 A 0 A_PlaySound("EASG/SHELLSActivate")
	TNT1 A 0 A_TakeInventory("EnragedASGMode1")
	EAS2 A 3 Offset(0,34)
	EAS2 A 2 Offset(0,37)
	EAS2 A 2 Offset(0,40)
	EASG A 2 Offset(0,37)
	EASG A 3 Offset(0,34)
	TNT1 A 0 Offset(0,32)
	Goto Ready+6
 Fire:
	TNT1 A 0 A_JumpIfInventory("EnragedASGMode1",1,"Fire2")
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"FireRage")
	TNT1 A 0 A_PlaySound("EASG/Fire",1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_SpawnItemEx("RedShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 AAA 0 A_FireCustomMissile("RedSGTracer",Random(5,-5),0,0,Random(5,-5))
	TNT1 AAA 0 A_FireCustomMissile("RedSGTracer",Random(10,-10),0,0,Random(10,-10))
    TNT1 A 0 A_FireBullets(3,1.5,3,Random(20,28),"EnragedModdedBulletPuff",0)
    EASG B 1 Bright A_FireBullets(6.2,3.4,4,Random(20,28),"EnragedModdedBulletPuff")
    EASG C 1 Bright A_Light2
	TNT1 A 0 A_Light0
    EASG DEFG 1
	EASG HI 2
    Goto Ready+6
  FireRage:
    TNT1 A 0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
    TNT1 A 0 A_PlaySound("NemesisASG/Fire", 1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 AAA 0 A_FireCustomMissile("RedSGTracer",Random(5,-5),0,0,Random(5,-5))
	TNT1 AAA 0 A_FireCustomMissile("RedSGTracer",Random(10,-10),0,0,Random(10,-10))
    TNT1 A 0 A_FireBullets(3,1.5,3,Random(20,28),"EnragedModdedBulletPuff",0)
    EASG B 1 Bright A_FireBullets(6.2,3.4,4,Random(20,28),"EnragedModdedBulletPuff")
    EASG C 1 Bright A_Light2
	TNT1 A 0 A_Light0
    EASG DE 1
	TNT1 A 0 A_Refire("FireRage")
	EASG FG 1
	EASG HI 2
    Goto Ready+6
  Fire2:
	TNT1 A 0 A_JumpIfInventory("EnragedLegendaryShotgunDrum",3,"ActualFire2")
	Goto Empty2
  ActualFire2:
 	TNT1 A 0
 	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"ActualFire2Rage")
	TNT1 A 0 A_PlaySound("EASG/Fire",1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 AAA 0 A_SpawnItemEx("RedShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_TakeInventory("EnragedLegendaryShotgunDrum",3,TIF_NOTAKEINFINITE)
    EAS2 B 2 Bright A_FireCustomMissile("EnragedASGRail",0,0,0,0)
    EAS2 CC 1 Bright A_Light2
	TNT1 A 0 A_Light0
    EAS2 DEFG 3
	EAS2 HI 6
    Goto Ready+6
  ActualFire2Rage:
	TNT1 A 0 A_PlaySound("EASG/Fire",1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 AAA 0 A_SpawnItemEx("RedShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_TakeInventory("EnragedLegendaryShotgunDrum",3,TIF_NOTAKEINFINITE)
	TNT1 A 0 Bright A_FireCustomMissile("ELCBRailCore",0,0,0,0)
    TNT1 A 0 Bright A_FireCustomMissile("EnragedASGDTRail",0,0,0,0)
    EAS2 B 2 Bright A_FireCustomMissile("EnragedASGRail",0,0,0,0)
    EAS2 CC 1 Bright A_Light2
	TNT1 A 0 A_Light0
    EAS2 DEFG 2
	EAS2 HI 3
    Goto Ready+6
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+6
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	EASG ZYXWV 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	EASG VWXYZ 1
	Goto Ready+6
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+6
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	EASG ZYXWV 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+1
	}
}

Actor HDEnragedLegLMGToken : Inventory {inventory.maxamount 1}
Actor EnragedLegLMGStart : Inventory {inventory.maxamount 1}

Actor "INFEnragedLMG" : "NewEnragedLegendaryLightMachineGun" Replaces "Enraged Legendary Light Machine Gun"
{
Tag "Enraged Legendary Light Machine Gun"
States
{
  Deselect:
    TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
    TNT1 A 0 A_TakeInventory("RailgunAction",1)
    TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"DeselectX")
    TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	Goto Deselect2
	TNT1 A 0 A_Lower
	EZL2 A 1 A_Lower
	Goto Deselect+6
  Deselect2:
	TNT1 A 0 A_Lower
	EZL2 H 1 A_Lower
	Loop
  DeselectX:
	TNT1 A 0 A_Lower
	EMGG A 1 A_Lower
	Loop
	
  Startup:
	TNT1 A 0 A_PlaySound("explosivemg/foley",7)
	TNT1 A 0 A_GiveInventory("EnragedLegLMGStart",1)
	EZL4 ABCD 1
	EZL3 DEF 1
	EZL3 G 2
	EZL3 H 2 A_PlaySound("weapons/LMGReload3",6)
	EZL3 IJKLM 2
	Goto ReadyLoop
	
  Ready:
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"ReadyX")
	TNT1 A 0 A_JumpIfInventory("EnragedLegLMGStart",1,1)
	Goto Startup
	TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	EZL1 ABCDEF 1
  ReadyLoop:
	TNT1 A 0 A_JumpIfInventory("ELegLMGSight",1,"Ready.Laser")
    TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	Goto ReadyLoop2
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	EZL2 A 1 A_WeaponReady
	Loop
  ReadyLoop2:
    TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,"ReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    EZL2 H 1 A_WeaponReady
	Loop
  Ready.Laser:
	TNT1 A 0 A_GiveInventory("ELegLMGSight",1)
    TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	Goto Ready.Laser2
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	EZL2 A 0 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING|RGF_CENTERZ,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EZL2 A 1 A_WeaponReady(WRF_NOBOB)
	Loop
  Ready.Laser2:
    TNT1 A 0 A_GiveInventory("ELegLMGSight",1)
    TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,"ReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	EZL2 H 0 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING|RGF_CENTERZ,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EZL2 H 1 A_WeaponReady(WRF_NOBOB)
	Loop
	
  ReadyX:
	TNT1 A 0 A_PlayWeaponSound("weapons/LMGReload3")
	EMGG BCDEFA 1
  ReadyLoopX:
	TNT1 A 0 A_JumpIfInventory("ELegLMGSight",1,"Ready.LaserX")
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,1)
	Goto WeaponSkin2
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheckX")
	EMGG A 1 A_WeaponReady
	Loop
  Ready.LaserX:
	TNT1 A 0 A_GiveInventory("ELegLMGSight",1)
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,1)
	Goto WeaponSkin2
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheckX")
	EMGG A 0 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING|RGF_CENTERZ,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EMGG A 1 A_WeaponReady(WRF_NOBOB)
	Loop
	
  Fire:
    TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"FireX")
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("ELegLMGSight",1,"Fire.Laser")
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"FireRage")
	TNT1 A 0 A_PlaySound("ELMG/Fire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	EZL2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"ELLMGPuff")
	EZL2 CD 1 Bright
	TNT1 A 0 A_Light0
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,4)
	EZL2 EFG 1
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("ELMG/Fire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	EZL2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"ELLMGPuff")
	EZL2 CD 1 Bright
	TNT1 A 0 A_Light0
	TNT1 A 0 A_ReFire
	EZL2 EFG 1 A_ReFire
	Goto ReadyLoop
  FireRage:	
	TNT1 A 0 A_JumpIfInventory("ELegLMGSight",1,"FireRage.Laser")
	TNT1 A 0 A_PlaySound("ELMG/Fire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	EZL2 B 1 Bright A_FireBullets(4.0,2.8,1,Random(100,110),"ELLMGPuff")
	EZL2 CD 1 Bright
	TNT1 A 0 A_Light0
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,4)
	EZL2 EFG 1
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("ELMG/Fire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	EZL2 B 1 Bright A_FireBullets(4.0,2.8,1,Random(100,110),"ELLMGPuff")
	EZL2 CD 1 Bright
	TNT1 A 0 A_Light0
	TNT1 A 0 A_ReFire
	EZL2 EFG 1 A_ReFire
	Goto ReadyLoop
  Fire.Laser:
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"FireRage.Laser")
	TNT1 A 0 A_PlaySound("ELMG/LOnFire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
    TNT1 A 0 A_Light1
	TNT1 A 0 A_FireBullets(1.0,0.5,1,Random(98,100),"ELLMGPuff")
	EZL2 B 1 Bright A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EZL2 CD 1 Bright A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EZL2 EFGA 1 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	TNT1 A 0 A_Light0
	TNT1 A 0 A_ReFire
	Goto Ready.Laser
  FireRage.Laser:
	TNT1 A 0 A_PlaySound("ELMG/LOnFire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
    TNT1 A 0 A_Light1
	TNT1 A 0 A_FireBullets(1.0,0.5,1,Random(100,110),"ELLMGPuff")
	EZL2 B 1 Bright A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EZL2 CD 1 Bright A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EZL2 EF 1 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	TNT1 A 0 A_Light0
	TNT1 A 0 A_ReFire
	EZL2 GA 1 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	Goto Ready.Laser
	
  FireX:
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_JumpIfInventory("ELegLMGSight",1,"Fire.LaserX")
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"FireRageX")
	TNT1 A 0 A_PlaySound("ELMG/Fire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	EMGF A 2 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"ELLMGPuff")
	TNT1 A 0 A_Light0
	EMGF B 1 
	EMGF C 1
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	Goto ReadyLoopX
	TNT1 A 0 A_PlaySound("ELMG/Fire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	EMGF D 2 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"ELLMGPuff")
	TNT1 A 0 A_Light0
	EMGF B 1
	EMGF C 1
	TNT1 A 0 A_ReFire
	Goto ReadyLoopX
  FireRageX:
	TNT1 A 0 A_JumpIfInventory("ELegLMGSight",1,"FireRage.LaserX")
	TNT1 A 0 A_PlaySound("ELMG/Fire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	EMGF A 2 Bright A_FireBullets(4.0,2.8,1,Random(100,110),"ELLMGPuff")
	TNT1 A 0 A_Light0
	EMGF B 1
	EMGF C 1
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	Goto ReadyLoopX
	TNT1 A 0 A_PlaySound("ELMG/Fire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	EMGF D 2 Bright A_FireBullets(4.0,2.8,1,Random(100,110),"ELLMGPuff")
	TNT1 A 0 A_Light0
	EMGF B 1
	EMGF C 1
	TNT1 A 0 A_ReFire
	Goto ReadyLoopX
  Fire.LaserX:
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"FireRage.LaserX")
	TNT1 A 0 A_PlaySound("ELMG/LOnFire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
    TNT1 A 0 A_Light1
	TNT1 A 0 A_FireBullets(1.0,0.5,1,Random(98,100),"ELLMGPuff")
	EMGF A 1 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EMGF BBBCCC 1 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	TNT1 A 0 A_Light0
	TNT1 A 0 A_ReFire
	Goto Ready.LaserX
  FireRage.LaserX:	
	TNT1 A 0 A_PlaySound("ELMG/LOnFire",3,1.0)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_SpawnItemEx("ELegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
    TNT1 A 0 A_Light1
	TNT1 A 0 A_FireBullets(1.0,0.5,1,Random(100,110),"ELLMGPuff")
	EMGF A 1 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	EMGF BBCC 1 A_RailAttack(-1,0,False,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,0,"RailTargetPuff",0,0,0,0,0,0,"EnragedLaserSight")
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,1)
	TNT1 A 0 A_Light0
	TNT1 A 0 A_ReFire
	Goto Ready.LaserX
	
  Empty:
    TNT1 A 0 A_JumpIfNoAmmo("EmptyNoAmmo")
    EZL2 E 2 A_PlayWeaponSound("weapons/click")
	EZL2 FGA 2
	Goto AltFire
  EmptyNoAmmo:
    EZL3 V 2 A_PlayWeaponSound("weapons/click")
	EZL3 WX 2
	EZL2 H 2
  AltFire:
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"AltFireX")
  	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",92,"ReadyLoop")
    TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,1)
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("executor/foley",7)
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,"QuickLoad")
	EZL2 IJK 2
	EZL2 L 1 A_PlayWeaponSound("weapons/LMGReload2")
	EZL2 MN 1
	EZL2 O 2
	EZL2 PQ 3
	EZL2 R 15
	EZL2 STU 2
	EZL2 V 2 A_PlayWeaponSound("weapons/LMGReload1")
	EZL2 W 3
  Reload:
	TNT1 A 0 A_TakeInventory("ELegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("ELLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",92,2)
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
	TNT1 A 0 A_PlaySound("executor/foley",7)
	EZL2 XY 3
	EZL2 "Z" 2
	EZL3 A 2
	EZL3 BCDEF 1
	EZL3 G 2
	EZL3 H 2 A_PlaySound("weapons/LMGReload3",6)
	EZL3 IJKLM 2
	Goto ReadyLoop
  QuickLoad:
	EZL3 NOP 2
	EZL3 Q 1 A_PlayWeaponSound("weapons/LMGReload2")
	EZL3 RS 1
	EZL3 T 2
	EZL3 U 3
	EZL2 Q 3
	EZL2 R 15
	EZL2 STU 2
	EZL2 V 2 A_PlayWeaponSound("weapons/LMGReload1")
	EZL2 W 3
  Reload2:
	TNT1 A 0 A_TakeInventory("ELegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("ELLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",92,2)
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload2")
	TNT1 A 0 A_PlaySound("executor/foley",7)
	EZL2 XY 3
	EZL2 "Z" 2
	EZL3 AB 2
	EZL3 PON 1
	Goto ReadyLoop
	
  EmptyX:
    EMGG A 10 A_PlayWeaponSound("weapons/click")
  AltFireX:
  	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",92,"ReadyLoopX")
    TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,1)
	Goto ReadyLoopX
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",1,"MaxReloadX")
	EMGR A 1 A_PlayWeaponSound("weapons/LMGReload2")
 	EMGR BCD 1
	EMGR E 1 A_FireCustomMissile("LegendaryEmptyDrumSpawner", 0, 0, 0, 1)
	EMGR F 1
	EMGR GG 25
	EMGR HIJK 1 A_PlayWeaponSound("weapons/LMGReload1")
	EMGR L 8	
	EMGR MN 2
	EMGR OP 1
	EMGR QRSTU 1
	EMGR V 2
	EMGR W 3 A_PlayWeaponSound("weapons/LMGReload3")
	EMGR "X" 4
	EMGR "Y" 3
	EMGR "Z" 2
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"ReloadX")
  ReloadX:
	TNT1 A 0 A_TakeInventory("ELegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("ELLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",92,"ReadyLoopX")
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"ReloadX")
	Goto ReadyLoopX
  MaxReloadX:
	EMGR A 1 A_PlayWeaponSound("weapons/LMGReload2")
 	EMGR BCD 1
	EMGR E 1 A_FireCustomMissile("LegendaryEmptyDrumSpawner", 0, 0, 0, 1)
	EMGR F 1
	EMGR G 25
	EMGR HIJK 1 A_PlayWeaponSound("weapons/LMGReload1")
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload2X")
  Reload2X:
	TNT1 A 0 A_TakeInventory("ELegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("ELLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("ELLMGMagazine",92,"FullX")
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload2X")
  FullX:
	EMGR L 8	
	EMGR MN 2
	EMGR OPQRS 1
	EMGG A 2
	Goto ReadyLoopX
	
  Zoom:
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_JumpIfInventory("HDEnragedLegLMGToken",1,"ZoomX")
	TNT1 A 0 A_JumpIfInventory("ELegLMGSight",1,"Off")
	EZL2 A 1 A_Print("Laser Sight Engaged",1)
	TNT1 A 0 A_PlaySound("ELMG/LaserOn")
	Goto Ready.Laser
  Off:
	TNT1 A 0 A_TakeInventory("ELegLMGSight",1)
	EZL2 A 1 A_Print("Laser Sight Disengaged",1)
	TNT1 A 0 A_PlaySound("ELMG/LaserOff")
	Goto ReadyLoop
  ZoomX:
	TNT1 A 0 A_JumpIfInventory("ELegLMGSight",1,"OffX")
	EMGG A 1 A_Print("Laser Sight Engaged",1)
	TNT1 A 0 A_PlaySound("ELMG/LaserOn")
	Goto Ready.LaserX
  OffX:
	TNT1 A 0 A_TakeInventory("ELegLMGSight",1)
	EMGG A 1 A_Print("Laser Sight Disengaged",1)
	TNT1 A 0 A_PlaySound("ELMG/LaserOff")
	Goto ReadyLoopX
	
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	EZL1 FEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+2
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	EZL1 FEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+2
	
  GrenadeCheckX:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeTossX")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoopX
  GrenadeTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	EMGG GFEDCB 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyX+1
  MineCheckX:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineTossX")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	EMGG GFEDCB 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto ReadyX+1
	
  WeaponSkin:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("EnragedLegLMGStart",1)
	EZL2 A 1 Offset(0,35)
	EZL2 A 1 Offset(0,45)
	EZL2 A 1 Offset(0,55)
	EZL2 A 1 Offset(0,65)
	EZL2 A 1 Offset(0,75)
	EZL2 A 1 Offset(0,85)
	EZL2 A 1 Offset(0,95)
	EZL2 A 1 Offset(0,108)
	EZL2 A 1 Offset(0,150)
	EZL2 A 3
	Goto Select
  WeaponSkin2:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("EnragedLegLMGStart",1)
	EMGG A 1 Offset(0,35)
	EMGG A 1 Offset(0,45)
	EMGG A 1 Offset(0,55)
	EMGG A 1 Offset(0,65)
	EMGG A 1 Offset(0,75)
	EMGG A 1 Offset(0,85)
	EMGG A 1 Offset(0,95)
	EMGG A 1 Offset(0,108)
	EMGG A 1 Offset(0,150)
	EMGG A 3
	Goto Select
	}
}

Actor "INFEnragedLegendaryPlasmaticCannon" : NewEnragedLegendaryPlasmaticCannon Replaces "EnragedLegendaryPlasmaticCannon"
{
Weapon.Upsound "ECannon/Draw"
Inventory.PickupSound "ECannon/Pickup"
Tag "Enraged Legendary Plasmatic Cannon"
States
{
  Fire:
	TNT1 A 0 A_JumpIfInventory("EnragedLegCannonMode1",1,"Fire2")
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"FireRage")
    TNT1 A 0 A_GunFlash
	ECAN B 2 Bright
	TNT1 A 0 A_PlaySound("ECannon/Fire",1)
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
    ECAN C 2 Bright A_FireCustomMissile("EnragedLegendaryCannonBallCF",0,1,0,0)
    ECAN DE 2 Bright
	ECAN FFFGGGHHHAAA 1
	ECAN A 3 A_Refire
    Goto Ready
  FireRage:
	ECAN A 18 Bright A_PlaySound("legendarycannon/charge",7)
	ECAN BBB 1 Bright
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("ECannon/Altfire",6)
	TNT1 A 0 A_FireCustomMissile("EnragedLegendaryCannonBallButStronger",0,1,0,0)
    ECAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_JumpIfNoAmmo(2)
	TNT1 A 0 A_Refire("FireRage2")
	TNT1 A 0 A_PlaySound("ECannon/Steam",7)
    ECAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,0)
    Goto Ready
  FireRage2:
	ECAN FFFGGGHHHAAA 1
	Goto FireRage+1
  AltFire:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("EnragedLegCannonMode1",1,"AltFire2")
	TNT1 A 0 A_JumpIfInventory("ILDemonAmmo",100,"AltFireContinue")
	Goto Ready
  AltFireContinue:
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"AltFireRage")
	ECAN A 35 Bright A_PlaySound("legendarycannon/charge",7)
	ECAN BBB 1 Bright
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("ECannon/Altfire",6)
	TNT1 A 0 A_PlaySound("star/fire",1)
	TNT1 A 0 A_TakeInventory("ILDemonAmmo",100,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("EnragedCannonBomb2",0,0,0,0)
    ECAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound("ECannon/Steam",7)
    ECAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	ECAN A 3 A_Refire
    Goto Ready
  AltFireRage:
	ECAN A 35 Bright A_PlaySound("legendarycannon/charge",7)
	ECAN BBB 1 Bright
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("ECannon/Altfire",6)
	TNT1 A 0 A_PlaySound("star/fire",1)
	TNT1 A 0 A_TakeInventory("ILDemonAmmo",100,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("EnragedCannonBomb2ButStronger",0,0,0,0)
    ECAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound("ECannon/Steam",7)
    ECAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	ECAN A 3 A_Refire
    Goto Ready
  AltFire2:
	TNT1 A 0 A_JumpIfInventory("ILDemonAmmo",30,"AltFire2Continue")
	Goto Ready
  AltFire2Continue:
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"AltFire2Rage")
	ECAN A 35 Bright A_PlaySound("legendarycannon/charge",7)
	ECAN BBB 1 Bright
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	TNT1 A 0 A_PlaySound("ECannon/Altfire",6)
	TNT1 A 0 A_PlaySound("star/fire",1)
	TNT1 A 0 A_TakeInventory("ILDemonAmmo",30,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("EnragedCannonRedStar",0,0,0,0)
    ECAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
    ECAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	ECAN A 3 A_Refire
    Goto Ready
  AltFire2Rage:
	TNT1 A 0 A_JumpIfInventory("ILDemonAmmo",30,"AltFire2RageContinue")
	Goto Ready
  AltFire2RageContinue:
	ECAN A 35 Bright A_PlaySound("legendarycannon/charge",7)
	ECAN BBB 1 Bright
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	TNT1 A 0 A_PlaySound("ECannon/Altfire",6)
	TNT1 A 0 A_PlaySound("star/fire",1)
	TNT1 A 0 A_TakeInventory("ILDemonAmmo",30,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("EnragedCannonRedStar",0,0,0,0)
    ECAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
    ECAN FFFFGGGGHHHHAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	ECAN A 3 A_Refire
    Goto Ready
	}
}

Actor "INFEnragedPlasmatic" : "NewEnragedLegendaryPlasmaticRifle" Replaces "Enraged Legendary Plasmatic Rifle"
{
Inventory.PickupSound "EPRifle/Pickup"
Tag "Enraged Legendary Plasmatic Rifle"
States
{
  Ready:
    TNT1 A 0 A_PlaySound("EPRifle/Draw",3,1.0)
	ITRS ABCDE 1
  ReadyLoop:
    TNT1 A 0 A_JumpIfInventory("ILDemonMagazine",1,2)
	TNT1 A 0
	Goto NoBuzzing
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady	 
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK AAA 1 A_WeaponReady
	TNT1 A 0 A_PlaySound("EPRifle/Idle",4,1.0)
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK BB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK BB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK CC 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK CC 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK DD 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK DD 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK EE 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ITEK EE 1 A_WeaponReady
    Goto ReadyLoop
  Fire:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,"FireRage")
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,2,0,1,0)
    TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("EPRifle/Fire",5,1.0)
    ITKF A 1 Bright A_FireCustomMissile("RPlayerLegendaryProjectile",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	ITKF B 1 Bright A_Light2
    ITKF C 2 A_Light0
    TNT1 A 0 A_ReFire
    Goto ReadyLoop
  FireRage:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,2,0,1,0)
    TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("EPRifle/Fire",5,1.0)
    ITKF A 1 Bright A_FireCustomMissile("RPlayerLegendaryProjectileButFaster",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	ITKF B 1 Bright A_Light2
    ITKF C 1 A_Light0
    TNT1 A 0 A_ReFire
    Goto ReadyLoop
  Empty:
    ITEK A 10 A_PlaySound("weapons/click2")
	Goto AltFire
  AltFire:
  	TNT1 A 0 A_JumpIfInventory("ILDemonMagazine",100,2)
    TNT1 A 0 A_JumpIfInventory("ILDemonAmmo",1,2)
	TNT1 A 0
	Goto ReadyLoop
    ITKR AB 2
	ITKR C 3
    ITKR D 4 A_PlaySound("weapons/demontecheject")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	ITKR E 2 A_PlaySound("EPRifle/Steam",CHAN_WEAPON,1.0)
	ITKR F 2 Radius_Quake(2,2,0,1,0)
	ITKR GHI 2 Radius_Quake(2,2,0,1,0)
	ITKR J 3 A_FireCustomMissile("LDemonTechEmptyMag",0,0,0,1)
	ITKR K 15 
	ITKR LMN 2
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",1,"Reload")	 
    ITKR D 6 A_PlayWeaponSound("weapons/demontechload")
    ITKR D 4 A_PlayWeaponSound("weapons/demontechclick")
    ITKR DD 3
	ITKR A 2
	Goto ReadyLoop
  Reload:
	TNT1 A 0 A_TakeInventory("ILDemonAmmo",1)
	TNT1 A 0 A_GiveInventory("ILDemonMagazine",1)
	TNT1 A 0 A_JumpIfInventory("ILDemonMagazine",100,"Full")
	TNT1 A 0 A_JumpIfInventory("ILDemonAmmo",1,"Reload")
	Goto AltFire+19
  Full:
    TNT1 A 0
	Goto AltFire+19
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+6
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	ITRS EDCBA 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+1
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+6
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	ITRS EDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+1 
	}
}

Actor InfinityILDemonAmmo : ILDemonAmmoNEO Replaces NexusILDemonAmmo { +INVENTORY.BIGPOWERUP }

Actor InfinityILDemonAmmoBox : ILDemonAmmoBoxNEO Replaces NexusILDemonAmmoBox { +INVENTORY.BIGPOWERUP }

Actor "INFNemesisPlasmatic" : "Nemesis Plasmatic Cannon" replaces "Nemesis Plasmatic Cannon"
{
Inventory.PickupSound "NemesisCannon/Pickup"
Tag "Nemesis Plasmatic Cannon"
States
{
  Fire3:
	TNT1 A 0 A_JumpIfInventory("NLDemonAmmo",100,"Fire3Continue")
	Goto Ready
  Fire3Continue:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"Fire3Extreme")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"NoSpeedForYou3")
	NCAN A 95 Bright A_PlaySound("NemesisCannon/IonCharge",1)
	TNT1 A 0 A_GunFlash
	NCAN BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("NemesisCannonIonBeamPlayer",0,1,0,0)
    NCAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound("NemesisCannon/IonCool",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    NCAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	NCAN A 3 A_Refire("Fire3")
	Goto Ready	
  NoSpeedForYou3:
	NCAN A 190 Bright A_PlaySound("NemesisCannon/IonCharge",1)
	TNT1 A 0 A_GunFlash
	NCAN BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("NemesisCannonIonBeamPlayer",0,1,0,0)
    NCAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound("NemesisCannon/IonCool",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    NCAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	NCAN A 6 A_Refire("Fire3")
	Goto Ready
  Fire3Extreme:
    NCAN A 65 Bright A_PlaySound("legendarycannon/charge",1)
	TNT1 A 0 A_GunFlash
	NCAN BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("NemesisCannonIonBeamPlayerButFaster",0,1,0,0)
    NCAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound("NemesisCannon/IonCool",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    NCAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	NCAN A 3 A_Refire("Fire3Extreme")
	Goto Ready
	}
}

Actor InfinityNLDemonAmmo : NLDemonAmmoNEO Replaces NexusNLDemonAmmo { +INVENTORY.BIGPOWERUP }

Actor InfinityNLDemonAmmoBox : NLDemonAmmoBoxNEO Replaces NexusNLDemonAmmoBox { +INVENTORY.BIGPOWERUP }

Actor "INFNemesisBFG" : "Nemesis BFG" replaces "Nemesis BFG"
{
Tag "Nemesis BFG"
Weapon.UpSound "NemesisBFG/Draw"
States
{
  Fire:
	TNT1 A 0 A_PlaySound("NemesisBFG/Trigger",6)
	NMB9 A 1
	TNT1 A 0 A_PlaySound("NemesisBFG/Charge",1)
	NMB9 AABBCCDD 1
	TNT1 A 0 A_GiveInventory("GuruCharge",25)
  Gurucharger:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexedGurucharger")
	TNT1 A 0 A_TakeInventory("GuruCharge",1)
	//TNT1 A 0 A_SpawnItemEx("TrueNemesisHellionSmokeSpawner")
	NMB9 ABCD 1 Bright A_Quake(4,2,0,2,"none")
	TNT1 A 0 A_JumpIfInventory("GuruCharge",1,"Gurucharger")
	NMB8 AABBCCDD 1 Bright A_Quake(4,2,0,2,"none")
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	TNT1 A 0 A_FireCustomMissile("PlayerNemesisGuruBall",0,1,12,0)
	TNT1 A 0 A_Recoil(45)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_SetBlend("White",0.5,60)
	TNT1 A 0 A_SetBlend("White",0.25,60)
	NMB8 E 1 Bright A_ZoomFactor(0.9)
	NMB8 E 1 Bright A_ZoomFactor(0.91)
	NMB8 F 1 Bright A_ZoomFactor(0.92)
	NMB8 F 1 Bright A_ZoomFactor(0.93)
	NMB8 G 1 Bright A_ZoomFactor(0.94)
	NMB8 G 1 Bright A_ZoomFactor(0.95)
	NMB8 H 1 Bright A_ZoomFactor(0.96)
	NMB8 H 1 Bright A_ZoomFactor(0.97)
	NMB8 I 1 Bright A_ZoomFactor(0.98)
	NMB8 I 1 Bright A_ZoomFactor(0.99)
	NMB8 KK 1 A_ZoomFactor(1)
	NMB8 LLMMNNOOPPQQ 1
	Goto Ready
   VexedGurucharger:
	TNT1 A 0 A_TakeInventory("GuruCharge",1)
	//TNT1 A 0 A_SpawnItemEx("TrueNemesisHellionSmokeSpawner")
	NMB9 ABCD 1 Bright A_Quake(4,2,0,2,"none")
	TNT1 A 0 A_JumpIfInventory("GuruCharge",1,"Gurucharger")
	NMB8 AABBCCDD 1 Bright A_Quake(4,2,0,2,"none")
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	TNT1 A 0 A_FireCustomMissile("PlayerVexedNemesisGuruBall",0,1,12,0)
	TNT1 A 0 A_Recoil(45)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_SetBlend("White",0.5,60)
	TNT1 A 0 A_SetBlend("White",0.25,60)
	NMB8 E 1 Bright A_ZoomFactor(0.9)
	NMB8 E 1 Bright A_ZoomFactor(0.91)
	NMB8 F 1 Bright A_ZoomFactor(0.92)
	NMB8 F 1 Bright A_ZoomFactor(0.93)
	NMB8 G 1 Bright A_ZoomFactor(0.94)
	NMB8 G 1 Bright A_ZoomFactor(0.95)
	NMB8 H 1 Bright A_ZoomFactor(0.96)
	NMB8 H 1 Bright A_ZoomFactor(0.97)
	NMB8 I 1 Bright A_ZoomFactor(0.98)
	NMB8 I 1 Bright A_ZoomFactor(0.99)
	NMB8 KK 1 A_ZoomFactor(1)
	NMB8 LLMMNNOOPPQQ 1
	Goto Ready
  Altfire:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexedAltfire")
	TNT1 A 0 A_PlaySound("NemesisBFG/Altfire",1)
	TNT1 A 0 A_FireCustomMissile("PlayerMiniNemesisBFGBall",0,1,12,0)
	TNT1 A 0 A_Recoil(25)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_SetBlend("White",0.25,35)
	TNT1 A 0 A_SetBlend("White",0.125,35)
	NMB8 EFGHIJ 1 Bright
	NMB8 LLMMNNOOPPQQ 1
	Goto Ready
  VexedAltfire:
	TNT1 A 0 A_PlaySound("NemesisBFG/Altfire",1)
	TNT1 A 0 A_FireCustomMissile("PlayerVexedMiniNemesisBFGBall",0,1,12,0)
	TNT1 A 0 A_Recoil(25)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_SetBlend("White",0.25,35)
	TNT1 A 0 A_SetBlend("White",0.125,35)
	NMB8 EFGHIJ 1 Bright
	NMB8 LLMMNNOOPPQQ 1
	Goto Ready
	}
}

//Other Fixes

Actor INFEnragedLegendaryRevolver : EnragedLegendaryRevolver Replaces EnragedLegendaryRevolver
{
Tag "Enraged Legendary Revolver"
Weapon.PreferredSkin "INFLegendaryRevolver-Marine"
States
{
  Deselect:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
  DeselectLoop:
	TNT1 A 0 A_Lower
    ERVL E 1 A_Lower
    Loop
  Ready:
	ERVU ABCDEFG 1
	TNT1 A 0 A_PlayWeaponSound("revspin")
  ReadyLoop:
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	TNT1 A 0 A_TakeInventory("RevBreak",1)
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	ERVF A 1 A_WeaponReady
	Loop

  Fire:
    TNT1 A 0
    TNT1 A 0 A_JumpifInventory("EnragedLegRuneToken",1,"FireRage")
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("RevAlt",1,"RevHold")
	TNT1 A 0 A_PlaySound("weapons/legrevfire",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_FireCustomMissile("RedSGTracer",0,0,0,0)
	TNT1 A 0 A_FireCustomMissile("E180-280Bullet",0,1,0,8,false,0)
	TNT1 A 0 A_Light1
	ERVF BC 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	ERVF DE 1
	TNT1 A 0 A_GiveInventory("RevAlt",1)
	TNT1 A 0 A_ReFire(2)
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	ERVF FG 1 A_ReFire
	TNT1 A 0 A_ReFire
	ERVF H 1 A_WeaponReady
	Goto ReadyLoop
	
  FireRage:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("RevAlt",1,"RageRevHold")
	TNT1 A 0 A_PlaySound("weapons/legrevfire",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_FireCustomMissile("ELegRevolverSpecialShot",0,1,0,8,false,0)
	TNT1 A 0 A_Light1
	ERVF BC 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	ERVF DE 1
	TNT1 A 0 A_GiveInventory("RevAlt",1)
	TNT1 A 0 A_ReFire(2)
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	ERVF FG 1 A_ReFire
	TNT1 A 0 A_ReFire
	ERVF H 1 A_WeaponReady 
	Goto ReadyLoop
	
  RevHold:
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	TNT1 A 0 A_GiveInventory("RevBreak",1)
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	ERHF ABCDEF 1
	TNT1 A 0 A_JumpIfNoAmmo("Empty2")
  Hold2:
	TNT1 A 0 A_JumpIfNoAmmo("Empty2")
	TNT1 A 0 A_PlaySound("weapons/legrevfire",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_FireCustomMissile("RedSGTracer",0,0,0,0)
	TNT1 A 0 A_FireCustomMissile("E180-280Bullet",0,1,0,8,false,0)
	TNT1 A 0 A_Light1
	ERHF GH 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	ERHF I 1
	ERHF JKL 1 A_ReFire("Hold2")
	ERHF FEDCBA 1
	Goto ReadyLoop
	
  RageRevHold:
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	TNT1 A 0 A_GiveInventory("RevBreak",1)
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	ERHF ABCDEF 1
	TNT1 A 0 A_JumpIfNoAmmo("Empty2")
  RageHold2:
	TNT1 A 0 A_JumpIfNoAmmo("Empty2")
	TNT1 A 0 A_PlaySound("weapons/legrevfire",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_FireCustomMissile("ELegRevolverSpecialShot",frandom(-2,2),1,0,0,0,frandom(-2,2))
	TNT1 A 0 A_Light1
	ERHF GH 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	ERHF I 1
	ERHF JKL 1 A_ReFire("RageHold2")
	ERHF FEDCBA 1
	Goto ReadyLoop
	
   Empty:
    ERVR A 1 A_PlayWeaponSound("weapons/click")
	Goto AltFire
   Empty2:
    ERHF F 1 A_PlayWeaponSound("weapons/click")
    ERHF EDCBA 1
  AltFire:
  	TNT1 A 0 A_JumpIfInventory("ILegendaryRevolverSpinner",6,"ReadyLoop")
    TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,1)
	Goto ReadyLoop
	ERVR ABCDEF 2
	ERVR G 1 A_PlaySound("REVOPEN")
	ERVR HI 1
	ERVR J 2  A_PlaySound("REVEJECT")
	ERVR J 0 A_JumpIfInventory("ILegendaryRevolverSpinner",5,"LRReload1")
	ERVR J 0 A_JumpIfInventory("ILegendaryRevolverSpinner",4,"LRReload2")
	ERVR J 0 A_JumpIfInventory("ILegendaryRevolverSpinner",3,"LRReload3")
	ERVR J 0 A_JumpIfInventory("ILegendaryRevolverSpinner",2,"LRReload4")
	ERVR J 0 A_JumpIfInventory("ILegendaryRevolverSpinner",1,"LRReload5")
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload2")
  Reload:
	TNT1 A 0 A_TakeInventory("ELegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("ILegendaryRevolverSpinner",1)
	TNT1 A 0 A_JumpIfInventory("ILegendaryRevolverSpinner",6,2)
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
	TNT1 A 0
	Goto ReadyLoop
  LRReload1:
	ERVR K 0 A_SpawnItemEx("ELegBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	ERVR K 1
	ERVR L 5
	ERVR MNOPQ 2
	ERVR R 3 A_PlaySound("REVINSR")
	ERVR RST 2
	ERVR UV 2
	ERVR W 3 A_PlaySound("REVCLOSE")
	ERVR XY 2
	ERVU FG 2
	ERVF A 1 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  LRReload2:
	ERVR KK 0 A_SpawnItemEx("ELegBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	ERVR K 1
	ERVR L 5
	ERVR MNOPQ 2
	ERVR R 3 A_PlaySound("REVINSR")
	ERVR RST 2
	ERVR UV 2
	ERVR W 3 A_PlaySound("REVCLOSE")
	ERVR XY 2
	ERVU FG 2
	ERVF A 1 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  LRReload3:
	ERVR KKK 0 A_SpawnItemEx("ELegBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	ERVR K 1
	ERVR L 5
	ERVR MNOPQ 2
	ERVR R 3 A_PlaySound("REVINSR")
	ERVR RST 2
	ERVR UV 2
	ERVR W 3 A_PlaySound("REVCLOSE")
	ERVR XY 2
	ERVU FG 2
	ERVF A 1 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  LRReload4:
	ERVR KKKK 0 A_SpawnItemEx("ELegBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	ERVR K 1
	ERVR L 5
	ERVR MNOPQ 2
	ERVR R 3 A_PlaySound("REVINSR")
	ERVR RST 2
	ERVR UV 2
	ERVR W 3 A_PlaySound("REVCLOSE")
	ERVR XY 2
	ERVU FG 2
	ERVF A 1 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  LRReload5:
	ERVR KKKKK 0 A_SpawnItemEx("ELegBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	ERVR K 1
	ERVR L 5
	ERVR MNOPQ 2
	ERVR R 3 A_PlaySound("REVINSR")
	ERVR RST 2
	ERVR UV 2
	ERVR W 3 A_PlaySound("REVCLOSE")
	ERVR XY 2
	ERVU FG 2
	ERVF A 1 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  Reload2:
	TNT1 A 0 A_TakeInventory("ELegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("ILegendaryRevolverSpinner",1)
	TNT1 A 0 A_JumpIfInventory("ILegendaryRevolverSpinner",6,"Full")
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload2")
  Full:
	ERVR KKKKKK 0 A_SpawnItemEx("ELegBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	ERVR K 1
	ERVR L 5
	ERVR MNOPQ 2
	ERVR R 3 A_PlaySound("REVINSR")
	ERVR RST 2
	ERVR UV 2
	ERVR W 3 A_PlaySound("REVCLOSE")
	ERVR XY 2
	ERVU FG 2
	ERVF A 1 A_PlayWeaponSound("revspin")
	Goto ReadyLoop
	
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	ERVU GFEDCA 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
    ERVU ABCDEFG 1
	Goto ReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	ERVU GFEDCA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	ERVU ABCDEFG 1
	Goto ReadyLoop
	}
}

Actor INFEnragedLegendaryCoachgun : NewEnragedLegendaryCoachgun Replaces NewEnragedLegendaryCoachgun
{
Tag "Enraged Legendary Coachgun"
Weapon.Preferredskin "INFLegendarySSG-Marine"
States
{
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	ESS8 FEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	ESS8 ABCDEF 1
	Goto ReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	ESS8 FEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	ESS8 ABCDEF 1
	Goto ReadyLoop
	}
}

Actor INFNemesisAssaultShotgun : "Nemesis Assault Shotgun" Replaces "Nemesis Assault Shotgun"
{
Tag "Nemesis Assault Shotgun"
States
{
  Ready:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReady")
    TNT1 A 0 A_PlayWeaponSound("LShotgun/Cock")
	NMSG VWXYZ 1
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    NMSG A 1 A_WeaponReady
  ReadyLoop:
	NMSG A 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
  Goto ReadyLoop
  VexReady:
    TNT1 A 0 A_PlayWeaponSound("LShotgun/Cock")
	VASG CCBBA 3
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    VASG A 1 A_WeaponReady
  VexReadyLoop:
    TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VASG A 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    Goto VexReadyLoop
  Deselect: 
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexDeselect")
    TNT1 A 0 A_PlaySound("weapons/weapondown")
	TNT1 A 0 A_Lower
    NMSG A 1 A_Lower
    Loop
  VexDeselect: 
    TNT1 A 0 A_PlaySound("weapons/weapondown")
	TNT1 A 0 A_Lower
    VASG A 1 A_Lower
    Loop
  Select:
	TNT1 A 0 A_Raise
    loop
  Fire:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexedFire")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireExtreme")
	TNT1 A 0 A_PlaySound("NemesisASG/Fire", 1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 AAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-6,6),0,0,-4,0,frandom(-4,4))
	NMSG B 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-6,6),1,0,-4,0,frandom(-4,4))
    NMSG C 1 Bright A_Light2
	TNT1 A 0 A_Light0
    NMSG DEFG 1
	NMSG HI 2
    Goto ReadyLoop
  VexedFire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
    TNT1 A 0 A_PlaySound("NemesisASG/Fire", 1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 AAAAAA 0 A_FireCustomMissile("VexedNemesisASGBallPlayer",frandom(-6,6),0,0,-4,0,frandom(-4,4))
	TNT1 AA 0 A_FireCustomMissile("VexedNemesisASGBallPlayerWithFire",frandom(-10,10),0,0,-4,0,frandom(-6,6))
	VASG E 1 Bright A_FireCustomMissile("VexedNemesisASGBallPlayer",frandom(-6,6),1,0,-4,0,frandom(-4,4))
    VASG E 1 Bright A_Light2
	TNT1 A 0 A_Light0
    VASG DDA 1
    Goto VexReadyLoop
  FireExtreme:
    TNT1 A 0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
    TNT1 A 0 A_PlaySound("NemesisASG/Fire", 1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 AAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-6,6),0,0,-4,0,frandom(-4,4))
	NMSG B 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-6,6),1,0,-4,0,frandom(-4,4))
    NMSG C 1 Bright A_Light2
	TNT1 A 0 A_Light0
    NMSG DE 1
	TNT1 A 0 A_Refire("FireExtreme")
	NMSG FG 1
	NMSG HI 2
    Goto ReadyLoop
  Empty:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexEmpty")
    NMSG A 10 A_PlaySound("weapons/click")
  AltFire:
  	TNT1 A 0 A_JumpIfInventory("NemesisShotgunDrum",16,2)
    TNT1 A 0 A_JumpIfInventory("NemesisShell",1,2)
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReadyLoop")
	Goto ReadyLoop
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"AltReload")
	NMSG JKLMN 1
	NMSG O 2
	NMSR A 2 A_PlaySound("lasgguy/asgout")
  	NMSR B 3
	NMSG U 40 A_FireCustomMissile("EnragedLegendaryEmptyDrumSpawner", 0, 0, 10, 1) 
	NMSG TSR 1
	NMSG Q 2
  Reload:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReload")
	TNT1 A 0 A_TakeInventory("NemesisShell",1)
	TNT1 A 0 A_GiveInventory("NemesisShotgunDrum",1)
	TNT1 A 0 A_JumpIfInventory("NemesisShotgunDrum",16,2)
	TNT1 A 0 A_JumpIfInventory("NemesisShell",1,"Reload")
	TNT1 A 0
	Goto Reload2
  Reload2:
	NMSG P 3
	NMSG O 6 A_PlaySound("lasgguy/asgin")
	NMSG NMLKJ 1
	Goto ReadyLoop
  AltReload:
	VASG A 2
	VASG B 6 A_PlaySound("lasgguy/asgout")
	VASG A 0 A_FireCustomMissile("EnragedLegendaryEmptyDrumSpawner", 0, 0, 10, 1) 
	VASG BBB 3
  VexReload:
	TNT1 A 0 A_TakeInventory("NemesisShell",1)
	TNT1 A 0 A_GiveInventory("NemesisShotgunDrum",1)
	TNT1 A 0 A_JumpIfInventory("NemesisShotgunDrum",16,2)
	TNT1 A 0 A_JumpIfInventory("NemesisShell",1,"Reload")
	TNT1 A 0
	Goto VexReload2
  VexReload2:
	VASG BB 2
	VASG B 6 A_PlaySound("lasgguy/asgin")
	VASG BC 6
	VASG CBA 3
	Goto VexReadyLoop
  VexEmpty:
    VASG A 10 A_PlaySound("weapons/click")
	Goto AltFire
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReadyLoop")
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NMSG ZYXWV 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReady")
	NMSG VWXYZ 1
	Goto ReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReadyLoop")
	Goto Readyloop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NMSG ZYXWV 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReady")
	Goto Ready
	}
}

Actor INFNemesisSSG : "Nemesis Sawed-Off Shotgun" Replaces "Nemesis Sawed-Off Shotgun"
{
Tag "Nemesis Sawed-Off Shotgun"
States
{
  Ready:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReady")
	TNT1 A 0 A_PlayWeaponSound("Coachgun/Pickup")
	NSSZ ACDFGIKMP 1
	ReadyLoop:
	NSSD A 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	Loop
  Select:
	TNT1 A 0 A_Raise
	loop
  Deselect:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexDeselect")
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	DeselectLoop:
	TNT1 A 0 A_Lower
	NSSD A 1 A_Lower
	Loop
  VexDeselect:
	TNT1 A 0
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	DeselectLoop:
	TNT1 A 0 A_Lower
	D019 A 1 A_Lower
	Loop
  VexReady:
    TNT1 A 0 A_PlayWeaponSound("LShotgun/Cock")
	D019 GFEDCBA 1
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    D019 A 1 A_WeaponReady
  VexReadyLoop:
	D019 A 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    Goto VexReadyLoop
  Fire:
	TNT1 A 0 A_JumpIfInventory("NemesisPellets",2,"FireBoth")
	TNT1 A 0 A_JumpIfInventory("NemesisShell",1,"Reload")
	Goto Empty
  FireBoth:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireBoth")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireBothExtreme")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("NemesisSSG/Fire1")
	TNT1 A 0 Radius_Quake(6,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",2)
	//TNT1 AAAAAAAA 0 Bright A_FireCustomMissile("NemesisTracer",Random(8,-8),0,0,Random(8,-8))
	//TNT1 A 0 Bright A_FireBullets(6.2,3.1,26,0,"NemesisASGPuffExplodePlayer",0)
	//NSSF A 1 Bright A_FireBullets(6.2,3.1,26,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-10,10),0,0,-4,0,frandom(-6,6))
	NSSF A 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-10,10),1,0,-4,0,frandom(-6,6))
	NSSF B 1
	NSSF CD 1 Bright A_Light2
	NSSF E 1 Radius_Quake(6,5,0,1,0)
	NSSF F 1
	NSSF GH 1 A_Light0
	NSSD AAAAAA 1
	SSGReloadCheck:
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexSSGReloadCheck")
	TNT1 A 0 A_JumpIfInventory("NemesisShell",2,2)
	NSSC D 2
	Goto ReadyLoop
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReloadBoth")
	Goto ReloadBoth+4
  FireBothExtreme:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireBoth")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("nemessg/ult1")
	TNT1 A 0 Radius_Quake(6,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",2)
	//TNT1 AAAAAAAA 0 Bright A_FireCustomMissile("NemesisTracer",Random(8,-8),0,0,Random(8,-8))
	//TNT1 A 0 Bright A_FireBullets(6.2,3.1,26,0,"NemesisASGPuffExplodePlayer",0)
	//NSSF A 1 Bright A_FireBullets(6.2,3.1,26,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-15,15),0,0,-4,0,frandom(-8,8)) //,frandom(-10,10),0,0,-4,0,frandom(-6,6))
	NSSF A 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-10,10),1,0,-4,0,frandom(-6,6))
	NSSF B 1
	NSSF CD 1 Bright A_Light2
	NSSF E 1 Radius_Quake(6,5,0,1,0)
	NSSF F 1
	NSSF GH 1 A_Light0
	NSSD AA 1
	Goto SSGReloadCheck
  VexFireBoth:
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("nemessg/ult1")
	TNT1 A 0 Radius_Quake(6,5,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",2)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("VexedNemesisASGBallPlayer",frandom(-15,15),0,0,-4,0,frandom(-8,8)) //,frandom(-10,10),0,0,-4,0,frandom(-6,6))
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("VexedNemesisASGBallPlayerWithFire",frandom(-10,10),0,0,-4,0,frandom(-6,6))
	D012 A 1 Bright A_FireCustomMissile("VexedNemesisASGBallPlayer",frandom(-10,10),1,0,-4,0,frandom(-6,6))
	D012 B 1
	D012 CD 1 Bright A_Light2
	D012 E 1 Radius_Quake(6,5,0,1,0)
	D012 F 1
	D012 GH 1 A_Light0
	D012 II 1
	Goto SSGReloadCheck
	VexSSGReloadCheck:
	TNT1 A 0 A_JumpIfInventory("NemesisShell",2,2)
	D018 A 2
	Goto VexReadyLoop
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReloadBoth")
	Goto ReloadBoth+4
  VexFireLeftExtreme:
	TNT1 A 0 A_PlaySound("nemessg/ult2")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",1)
	//TNT1 AAAA 0 A_FireCustomMissile("NemesisTracer",Random(6,-6),0,0,Random(6,-6))
	//TNT1 A 0 Bright A_FireBullets(2.2,1.3,9,0,"NemesisASGPuffExplodePlayer",0)
	//N1SF A 1 Bright A_FireBullets(2.2,1.3,9,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("VexedNemesisASGBallPlayer",frandom(-6,6),0,0,-4,0,frandom(-3.5,3.5))
	TNT1 AAAAAA 0 A_FireCustomMissile("VexedNemesisASGBallPlayerWithFire",frandom(-10,10),0,0,-4,0,frandom(-6,6))
	D017 A 1 Bright A_FireCustomMissile("VexedNemesisASGBallPlayer",frandom(-4,4),1,0,-4,0,frandom(-2.5,2.5))
	D017 B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0
	D017 CDEF 1
	D019 A 2
	Goto VexReadyLoop
  VexFireRightExtreme:
	TNT1 A 0 A_PlaySound("nemessg/ult2")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",1)
	//TNT1 AAAA 0 A_FireCustomMissile("NemesisTracer",Random(6,-6),0,0,Random(6,-6))
	//TNT1 A 0 Bright A_FireBullets(2.2,1.3,9,0,"NemesisASGPuffExplodePlayer",0)
	//N2SF A 1 Bright A_FireBullets(2.2,1.3,9,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-6,6),0,0,-4,0,frandom(-3.5,3.5))
	TNT1 AAAAA 0 A_FireCustomMissile("VexedNemesisASGBallPlayerWithFire",frandom(-10,10),0,0,-4,0,frandom(-6,6))
	D016 A 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),1,0,-4,0,frandom(-2.5,2.5))
	D016 B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0
	D016 CDEF 1
	D019 A 2
	Goto VexReadyLoop
  AltFire:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexAltFire")
	TNT1 A 0 A_JumpIfInventory("NemesisPellets",2,"FireRight")
	TNT1 A 0 A_JumpIfInventory("NemesisPellets",1,1)
	Goto Reload
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireLeftExtreme")
	TNT1 A 0 A_PlaySound("NemesisSSG/Fire2")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",1)
	//TNT1 AAAA 0 A_FireCustomMissile("NemesisTracer",Random(6,-6),0,0,Random(6,-6))
	//TNT1 A 0 Bright A_FireBullets(2.2,1.3,9,0,"NemesisASGPuffExplodePlayer",0)
	//N1SF A 1 Bright A_FireBullets(2.2,1.3,9,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),0,0,-4,0,frandom(-2.5,2.5))
	N1SF A 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),1,0,-4,0,frandom(-2.5,2.5))
	N1SF B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0
	N1SF CDEF 1
	NSSD A 2
	Goto ReadyLoop
  VexAltFire:
	TNT1 A 0 A_JumpIfInventory("NemesisPellets",2,"FireRight")
	TNT1 A 0 A_JumpIfInventory("NemesisPellets",1,1)
	Goto Reload
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireLeftExtreme")
	TNT1 A 0 A_PlaySound("NemesisSSG/Fire2")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",1)
	//TNT1 AAAA 0 A_FireCustomMissile("NemesisTracer",Random(6,-6),0,0,Random(6,-6))
	//TNT1 A 0 Bright A_FireBullets(2.2,1.3,9,0,"NemesisASGPuffExplodePlayer",0)
	//N1SF A 1 Bright A_FireBullets(2.2,1.3,9,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),0,0,-4,0,frandom(-2.5,2.5))
	D017 A 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),1,0,-4,0,frandom(-2.5,2.5))
	D017 B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0
	D017 CDEF 1
	D019 A 2
	Goto VexReadyLoop
  FireLeftExtreme:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireLeftExtreme")
	TNT1 A 0 A_PlaySound("nemessg/ult2")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",1)
	//TNT1 AAAA 0 A_FireCustomMissile("NemesisTracer",Random(6,-6),0,0,Random(6,-6))
	//TNT1 A 0 Bright A_FireBullets(2.2,1.3,9,0,"NemesisASGPuffExplodePlayer",0)
	//N1SF A 1 Bright A_FireBullets(2.2,1.3,9,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-6,6),0,0,-4,0,frandom(-3.5,3.5))
	N1SF A 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),1,0,-4,0,frandom(-2.5,2.5))
	N1SF B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0
	N1SF CDEF 1
	NSSD A 2
	Goto ReadyLoop
  FireRight:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireRightExtreme")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireRightExtreme")
	TNT1 A 0 A_PlaySound("NemesisSSG/Fire2")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",1)
	//TNT1 AAAA 0 A_FireCustomMissile("NemesisTracer",Random(6,-6),0,0,Random(6,-6))
	//TNT1 A 0 Bright A_FireBullets(2.2,1.3,9,0,"NemesisASGPuffExplodePlayer",0)
	//N2SF A 1 Bright A_FireBullets(2.2,1.3,9,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),0,0,-4,0,frandom(-2.5,2.5))
	N2SF A 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),1,0,-4,0,frandom(-2.5,2.5))
	N2SF B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0
	N2SF CDEF 1
	NSSD A 2
	Goto ReadyLoop
  FireRightExtreme:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireRightExtreme")
	TNT1 A 0 A_PlaySound("nemessg/ult2")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("NemesisPellets",1)
	//TNT1 AAAA 0 A_FireCustomMissile("NemesisTracer",Random(6,-6),0,0,Random(6,-6))
	//TNT1 A 0 Bright A_FireBullets(2.2,1.3,9,0,"NemesisASGPuffExplodePlayer",0)
	//N2SF A 1 Bright A_FireBullets(2.2,1.3,9,random(32,40),"NemesisASGBulletPuffPlayer")
	TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("NemesisASGBallPlayer",frandom(-6,6),0,0,-4,0,frandom(-3.5,3.5))
	N2SF A 1 Bright A_FireCustomMissile("NemesisASGBallPlayer",frandom(-4,4),1,0,-4,0,frandom(-2.5,2.5))
	N2SF B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0
	N2SF CDEF 1
	NSSD A 2
	Goto ReadyLoop
  Empty:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexEmpty")
	TNT1 A 0 A_JumpIfInventory("NemesisPellets",1,"Empty2")
	NSSD A 10 A_PlaySound("weapons/click")
	Goto ReadyLoop
  VexEmpty:
	TNT1 A 0 A_JumpIfInventory("NemesisPellets",1,"Empty2")
	D019 A 10 A_PlaySound("weapons/click")
	Goto VexReadyLoop
  Empty2:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexEmpty2")
	NSSD A 10 A_PlaySound("weapons/click")
	Goto ReadyLoop
  VexEmpty2:
	D019 A 10 A_PlaySound("weapons/click")
	Goto VexReadyLoop
	Reload:
	TNT1 A 0 A_JumpIfInventory("NemesisPellets",1,"ReloadRight")	
	TNT1 A 0 A_JumpIfInventory("NemesisShell",2,"ReloadBoth")
	Goto Empty	
  ReloadBoth:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReloadBoth")
	TNT1 A 0 A_JumpIfInventory("NemesisShell",2,1)
	Goto ReadyLoop
	NSSR EDCBA 1
	NSSR ABCDEF 1
	NSSR G 1 A_PlayWeaponSound("NemesisSSG/Open")
	NSSR HI 1
	NSSR J 1
	TNT1 AA 0 A_SpawnItemEx("NemesisShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	NSS2 A 2
	NSS2 B 2
	NSS2 CD 2
	NSS2 EFG 1
	NSS2 H 1 A_PlayWeaponSound("NemesisSSG/Load")
	NSS2 IJKLMN 1
	TNT1 A 0 A_TakeInventory("NemesisShell",2,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("NemesisPellets",2)
	NSSR KKKK 2
	NSSC AC 1
	NSSC D 1 A_PlayWeaponSound("NemesisSSG/Close")
	NSSC F 1
	NSSC GIJL 1
	NSSC MOPR 1
	Goto ReadyLoop
  VexReloadBoth:
	TNT1 A 0 A_JumpIfInventory("NemesisShell",2,1)
	Goto VexReadyLoop
	D018 AABB 2
	D014 A 2 A_PlayWeaponSound("NemesisSSG/Open")
	D014 ABCDEF 1
	TNT1 AA 0 A_SpawnItemEx("NemesisShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	D014 G 1 
	D014 HI 1
	D014 J 1 A_PlayWeaponSound("NemesisSSG/Load")
	D014 K 2
	D014 L 2
	D014 MN 2
	D015 A 1 A_PlayWeaponSound("NemesisSSG/Close")
	D015 BCD 2
	TNT1 A 0 A_TakeInventory("NemesisShell",2,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("NemesisPellets",2)
	D015 EFG 2
	D015 HI 1
	D015 J 1 
	D015 K 1
	D015 LMNO 1
	D015 PQR 1
	Goto VexReadyLoop
  ReloadRight:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexReloadRight")
	TNT1 A 0 A_JumpIfInventory("NemesisShell",1,1)
	Goto ReadyLoop
	NSSR EDCBA 1
	NSSR ABCDEFGHI 1
	N2SR B 2 A_PlayWeaponSound("NemesisSSG/Open")	
	N2SR CCCCC 1
	N2SR D 2
	N2SR EF 2
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	N2SR GH 2
	N2SR I 1 A_PlayWeaponSound("NemesisSSG/Load")
	TNT1 A 0 A_TakeInventory("NemesisShell",1,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("NemesisPellets",1)
	NSSC AC 1
	NSSC D 1 A_PlayWeaponSound("NemesisSSG/Close")
	NSSC F 1
	NSSC GIJL 1
	NSSC MOPR 1
	Goto ReadyLoop
  VexReloadRight:
	TNT1 A 0 A_JumpIfInventory("NemesisShell",1,1)
	Goto VexReadyLoop
	D018 ADC 2
	D018 C 2 A_PlayWeaponSound("NemesisSSG/Open")
	D018 DEF 2
	D018 G 2 A_SpawnItemEx("NemesisShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	D018 H 3 A_PlayWeaponSound("NemesisSSG/Load")
	D018 I 2
	TNT1 A 0 A_TakeInventory("NemesisShell",1,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("NemesisPellets",1)
	D015 D 1 A_PlayWeaponSound("NemesisSSG/Close")
	D015 EFG 1
	D015 HI 1
	D015 J 1 
	D015 K 1
	D015 LMNO 1
	D015 PQR 1
	Goto VexReadyLoop
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NSSD A 1 Offset(0,30)
	NSSD A 1 Offset(0,40)
	NSSD A 1 Offset(0,50)
	NSSD A 1 Offset(0,60)
	NSSD A 1 Offset(0,70)
	TNT1 A 4 Offset(0,32)
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	NSSD A 1 Offset(0,70)
	NSSD A 1 Offset(0,60)
	NSSD A 1 Offset(0,50)
	NSSD A 1 Offset(0,40)
	NSSD A 1 Offset(0,32)
	Goto ReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NSSD A 1 Offset(0,30)
	NSSD A 1 Offset(0,40)
	NSSD A 1 Offset(0,50)
	NSSD A 1 Offset(0,60)
	NSSD A 1 Offset(0,70)
	TNT1 A 8 Offset(0,32)
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	NSSD A 1 Offset(0,70)
	NSSD A 1 Offset(0,60)
	NSSD A 1 Offset(0,50)
	NSSD A 1 Offset(0,40)
	NSSD A 1 Offset(0,32)
	Goto ReadyLoop
	}
}

Actor INFHackroidASG : "Hackroid ASG" Replaces "Hackroid ASG"
{
Tag "Hackroid Assault Shotgun"
States
{
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+6
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	HGSG ZYXWV 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	HGSG VWXYZ 1
	Goto Ready+6
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+6
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	HGSG ZYXWV 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+1
	}
}

Actor HDNemesisLMGToken : Inventory {inventory.maxamount 1}
Actor NemesisLMGStart : Inventory {inventory.maxamount 1}

Actor INFNemesisDarkMachineGun : NemesisDarkMachineGun Replaces NemesisDarkMachineGun
{
Tag "Nemesis Dark Machine Gun"
States
{
  Deselect:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_JumpIfInventory("HDNemesisLMGToken",1,"DeselectX")
    TNT1 A 0 A_JumpIfInventory("NDMGMagazine",1,1)
	Goto Deselect2
  DeselectLoop:
    TNT1 A 0 A_Lower
	NZL2 A 1 A_Lower
	Loop
  Deselect2:
    TNT1 A 0 A_Lower
	NZL2 H 1 A_Lower
	Loop
  DeselectX:
    TNT1 A 0 A_Lower
	NMGG A 1 A_Lower
	Loop
	
  Startup:
	TNT1 A 0 A_PlaySound("explosivemg/foley",7)
	TNT1 A 0 A_GiveInventory("NemesisLMGStart",1)
	NZL4 ABCD 1
	NZL3 DEF 1
	NZL3 G 2
	NZL3 H 2 A_PlaySound("weapons/LMGReload3",6)
	NZL3 IJKLM 2
	Goto ReadyLoop
	
  Ready:
    TNT1 A 0 A_JumpIfInventory("HDNemesisLMGToken",1,"ReadyX")
	TNT1 A 0 A_JumpIfInventory("NemesisLMGStart",1,1)
	Goto Startup
	TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	NZL1 ABCDEF 1
  ReadyLoop:
    TNT1 A 0 A_JumpIfInventory("NDMGMagazine",1,1)
	Goto ReadyLoop2
	TNT1 A 0 A_JumpIfInventory("HDNemesisLMGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	NZL2 A 1 A_WeaponReady
	Loop
  ReadyLoop2:
    TNT1 A 0 A_JumpIfInventory("NDMGMagazine",1,"ReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HDNemesisLMGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	NZL2 H 1 A_WeaponReady
	Loop
	
  ReadyX:
	TNT1 A 0 A_PlayWeaponSound("weapons/LMGReload3")
	NMGG BCDEFA 1
  ReadyLoopX:
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheckX")
	TNT1 A 0 A_JumpIfInventory("HDNemesisLMGToken",1,1)
	Goto Weaponskin2
	NMGG A 1 A_WeaponReady
	Loop
	
  Fire:
	TNT1 A 0 A_JumpIfInventory("HDNemesisLMGToken",1,"FireX")
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("NemesisDMGMode1",1,"FireBurst")
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFire")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireExtreme")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 2 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 CD 1 Bright
	NZL2 E 1 A_Light0
	NZL2 F 1
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,2)
	NZL2 G 1
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	NZL2 B 2 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 CD 1 Bright
	NZL2 E 1 A_Light0
	NZL2 F 1
	NZL2 G 1 A_ReFire
	Goto ReadyLoop
  VexFire:
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 2 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 CD 1 Bright
	TNT1 A 0 A_Light0
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,4)
	NZL2 EFG 1
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	NZL2 B 2 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 CD 1 Bright
	TNT1 A 0 A_Light0
	TNT1 A 0 A_ReFire
	NZL2 EFG 1
	Goto ReadyLoop
  FireExtreme:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFire")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 2 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 CD 1 Bright
	TNT1 A 0 A_Light0
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,4)
	NZL2 EFG 1
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	NZL2 B 2 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 CD 1 Bright
	TNT1 A 0 A_Light0
	TNT1 A 0 A_ReFire
	NZL2 EFG 1
	Goto ReadyLoop
	
  FireBurst:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireBurst")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireBurstExtreme")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	NZL2 C 1 Bright A_Light0
	NZL2 D 1 Bright
	NZL2 E 3
	NZL2 FG 4
	Goto ReadyLoop
  VexFireBurst:
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	NZL2 EFG 3
	Goto ReadyLoop
  FireBurstExtreme:
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NZL2 B 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	NZL2 C 1 Bright A_Light0
	NZL2 EFG 3
	Goto ReadyLoop

  FireX:
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_JumpIfInventory("NemesisDMGMode1",1,"FireBurstX")
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireX")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireExtremeX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 3 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
	NMGG A 1
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",1,1)
	Goto ReadyLoopX
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	NMGF D 3 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
	NMGG A 1
	TNT1 A 0 A_ReFire
	Goto ReadyLoopX
  VexFireX:
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 2 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",1,1)
	Goto ReadyLoopX
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	NMGF D 2 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
	TNT1 A 0 A_Refire
	Goto ReadyLoopX
  FireExtremeX:
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 2 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",1,1)
	Goto ReadyLoopX
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	NMGF D 2 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
	TNT1 A 0 A_Refire
	Goto ReadyLoopX
	
  FireBurstX:
    TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFireBurstX")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireBurstExtremeX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF D 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF D 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("NemesisDMGBallPlayer",frandom(-2,2),1,0,0,0,frandom(-2,2))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
    NMGG A 10 //A_PlayWeaponSound("weapons/click") //HC why
	Goto ReadyLoopX
  VexFireBurstX:
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF D 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF D 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("VexedNemesisDMGBallPlayer",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
    NMGG A 8 //A_PlayWeaponSound("weapons/click") //HC what's this doing here
	Goto ReadyLoopX
  FireBurstExtremeX:
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF D 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF D 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	NMGF A 1 Bright A_FireCustomMissile("NemesisDMGBallPlayerButStronger",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_Light0
	NMGF B 1
	NMGF C 1
    NMGG A 8 //A_PlayWeaponSound("weapons/click") //HC what's this doing here
	Goto ReadyLoopX
	
  Empty:
    TNT1 A 0 A_JumpIfNoAmmo("EmptyNoAmmo")
    NZL2 E 2 A_PlayWeaponSound("weapons/click")
	NZL2 FGA 2
	Goto AltFire
  EmptyNoAmmo:
    NZL3 V 2 A_PlayWeaponSound("weapons/click")
	NZL3 WX 2
	NZL2 H 2
  AltFire:
	TNT1 A 0 A_JumpIfInventory("HDNemesisLMGToken",1,"AltFireX")
  	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",60,"ReadyLoop")
    TNT1 A 0 A_JumpIfInventory("NemesisDMGBulletMag",1,1)
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("executor/foley",7)
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",1,"QuickLoad")
	NZL2 IJK 2
	NZL2 L 1 A_PlayWeaponSound("weapons/LMGReload2")
	NZL2 MN 1
	NZL2 O 2
	NZL2 PQ 3
	NZL2 R 25
	NZL2 STU 2
	NZL2 V 2 A_PlayWeaponSound("weapons/LMGReload1")
	NZL2 W 3
  Reload:
	TNT1 A 0 A_TakeInventory("NemesisDMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("NDMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",60,2)
	TNT1 A 0 A_JumpIfInventory("NemesisDMGBulletMag",1,"Reload")
	TNT1 A 0 A_PlaySound("executor/foley",7)
	NZL2 XY 3
	NZL2 "Z" 2
	NZL3 A 2
	NZL3 BCDEF 1
	NZL3 G 2
	NZL3 H 2 A_PlaySound("weapons/LMGReload3",6)
	NZL3 IJKLM 2
	Goto ReadyLoop
  QuickLoad:
	NZL3 NOP 2
	NZL3 Q 1 A_PlayWeaponSound("weapons/LMGReload2")
	NZL3 RS 1
	NZL3 T 2
	NZL3 U 3
	NZL2 Q 3
	NZL2 R 25
	NZL2 STU 2
	NZL2 V 2 A_PlayWeaponSound("weapons/LMGReload1")
	NZL2 W 3
  Reload2:
	TNT1 A 0 A_TakeInventory("NemesisDMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("NDMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",60,2)
	TNT1 A 0 A_JumpIfInventory("NemesisDMGBulletMag",1,"Reload2")
	TNT1 A 0 A_PlaySound("executor/foley",7)
	NZL2 XY 3
	NZL2 "Z" 2
	NZL3 AB 2
	NZL3 PON 1
	Goto ReadyLoop
	
  EmptyX:
    NMGG A 10 A_PlayWeaponSound("weapons/click")
  AltFireX:
  	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",60,2)
    TNT1 A 0 A_JumpIfInventory("NemesisDMGBulletMag",1,2)
	TNT1 A 0
	Goto ReadyLoopX
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",1,"MaxReloadX")
	NMGR A 1 A_PlayWeaponSound("weapons/LMGReload2")
 	NMGR BCD 1
	NMGR E 1 A_FireCustomMissile("LegendaryEmptyDrumSpawner", 0, 0, 0, 1)
	NMGR F 1
	NMGR GG 25
	NMGR HIJK 1 A_PlayWeaponSound("weapons/LMGReload1")
	NMGR L 8	
	NMGR MN 2
	NMGR OP 1
	NMGR QRSTU 1
	NMGR V 2
	NMGR W 3 A_PlayWeaponSound("weapons/LMGReload3")
	NMGR "X" 4
	NMGR "Y" 3
	NMGR "Z" 2
	TNT1 A 0 A_JumpIfInventory("NemesisDMGBulletMag",1,"ReloadX")
  ReloadX:
	TNT1 A 0 A_TakeInventory("NemesisDMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("NDMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",60,"ReadyLoopX")
	TNT1 A 0 A_JumpIfInventory("NemesisDMGBulletMag",1,"ReloadX")
	Goto ReadyLoop
  MaxReloadX:
	NMGR A 1 A_PlayWeaponSound("weapons/LMGReload2")
 	NMGR BCD 1
	NMGR E 1 A_FireCustomMissile("LegendaryEmptyDrumSpawner", 0, 0, 0, 1)
	NMGR F 1
	NMGR GG 25
	NMGR HIJK 1 A_PlayWeaponSound("weapons/LMGReload1")
	TNT1 A 0 A_JumpIfInventory("NemesisDMGBulletMag",1,"Reload2X")
  Reload2X:
	TNT1 A 0 A_TakeInventory("NemesisDMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("NDMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("NDMGMagazine",60,"FullX")
	TNT1 A 0 A_JumpIfInventory("NemesisDMGBulletMag",1,"Reload2X")
  FullX:
	NMGR L 8	
	NMGR MN 2
	NMGR OPQRS 1
	NMGG A 2
	Goto ReadyLoopX
	
  Zoom:
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_JumpIfInventory("HDNemesisLMGToken",1,"ZoomX")
	TNT1 A 0 A_JumpIfInventory("NemesisDMGMode1",1,"Off")
	TNT1 A 0 A_GiveInventory("NemesisDMGMode1",1)
	NZL2 A 1 A_Print("Burst",1)
	Goto ReadyLoop
  Off:
	TNT1 A 0 A_TakeInventory("NemesisDMGMode1",1)
	NZL2 A 1 A_Print("Normal",1)
	Goto ReadyLoop
	
  ZoomX:
	TNT1 A 0 A_JumpIfInventory("NemesisDMGMode1",1,"OffX")
	TNT1 A 0 A_GiveInventory("NemesisDMGMode1",1)
	NMGG A 1 A_Print("Burst",1)
	Goto ReadyLoopX
  OffX:
	TNT1 A 0 A_TakeInventory("NemesisDMGMode1",1)
	NMGG A 1 A_Print("Normal",1)
	Goto ReadyLoopX
	
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NZL1 FEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+2
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NZL1 FEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+2

  GrenadeCheckX:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeTossX")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoopX
  GrenadeTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NMGR ABCDEFG 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyX+1
  MineCheckX:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineTossX")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NMGR ABCDEFG 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto ReadyX+1
	
  WeaponSkin:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("NemesisLMGStart",1)
	NZL2 A 1 Offset(0,35)
	NZL2 A 1 Offset(0,45)
	NZL2 A 1 Offset(0,55)
	NZL2 A 1 Offset(0,65)
	NZL2 A 1 Offset(0,75)
	NZL2 A 1 Offset(0,85)
	NZL2 A 1 Offset(0,95)
	NZL2 A 1 Offset(0,108)
	NZL2 A 1 Offset(0,150)
	NZL2 A 3
	Goto Select
  WeaponSkin2:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("NemesisLMGStart",1)
	NMGG A 1 Offset(0,35)
	NMGG A 1 Offset(0,45)
	NMGG A 1 Offset(0,55)
	NMGG A 1 Offset(0,65)
	NMGG A 1 Offset(0,75)
	NMGG A 1 Offset(0,85)
	NMGG A 1 Offset(0,95)
	NMGG A 1 Offset(0,108)
	NMGG A 1 Offset(0,150)
	NMGG A 3
	Goto Select
	}
}

ACTOR "INFEnragedLegendaryBehemothCannon" : "EnragedLegendaryBehemothCannon" Replaces "EnragedLegendaryBehemothCannon"
{
Tag "Enraged Legendary Behemoth Cannon"
States
{
  Deselect:	
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_Lower
	EBHC A 1 A_Lower
	Goto Deselect+4
	}
}

Actor INFLegendaryRailgun : "Legendary Railgun " Replaces "Legendary Railgun "
{
Weapon.PreferredSkin "INFLegendaryRailgun-Marine"
Tag "Legendary Railgun"
States
{
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+6
  GrenadeToss:
  	TNT1 A 0 A_TakeInventory("RailgunZoomed",1)
	TNT1 A 0 A_ZoomFactor(1)
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_JumpIfInventory("LEGRailgunAmmo",10,"GrenadeToss2")
	LERS GFEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+2
  GrenadeToss2:
	LERS GFEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyPulse+1
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+6
  MineToss:
  	TNT1 A 0 A_TakeInventory("RailgunZoomed",1)
	TNT1 A 0 A_ZoomFactor(1)
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_JumpIfInventory("LEGRailgunAmmo",10,"MineToss2")
	LERS GFEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+2
  MineToss2:
	LERS GFEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto ReadyPulse+1
	}
}

Actor INFNemesisRifle : "Nemesis RifleNEO" Replaces "Nemesis RifleNEO"
{
Tag "Nemesis Rifle"
States
{
  Fire:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFire")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireExtreme")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(4,2,0,1,0)
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlayWeaponSound("NemesisRifle/Fire")
	TNT1 A 0 A_FireCustomMissile("NemesisRifleShotPlayer",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	NTEK GH 1 Bright
	NTEK IJ 1 Bright A_Light2
	NTEK LMN 1 A_Light0
	TNT1 A 0 A_ReFire("Fire")
	Goto ReadyLoop
  FireExtreme:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"VexFire")
    TNT1 A 0 A_JumpIfNoAmmo("Empty")
    TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(4,2,0,1,0)
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlayWeaponSound("NemesisRifle/Fire")
	TNT1 A 0 A_FireCustomMissile("NemesisRifleShotPlayerButFaster",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	NTEK GH 1 Bright
	NTEK IJ 1 Bright A_Light2
	TNT1 A 0 A_Refire("FireExtreme")
	NTEK LMN 1 A_Light0
	//TNT1 A 0 A_ReFire
	Goto ReadyLoop
  VexFire:
    TNT1 A 0
    TNT1 A 0 A_JumpIfNoAmmo("Empty")
    TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(4,2,0,1,0)
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlayWeaponSound("NemesisRifle/Fire")
	TNT1 A 0 A_FireCustomMissile("VexedNemesisRifleShotPlayer",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	NTEK GH 1 Bright
	NTEK IJ 1 Bright A_Light2
	TNT1 A 0 A_Refire("FireExtreme")
	NTEK LMN 1 A_Light0
	//TNT1 A 0 A_ReFire
	Goto ReadyLoop
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+6
  GrenadeToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NTRS EDCBA 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+1
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+6
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NTRS EDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+1
	}
}

Actor INFHackroidRifle : HackroidRifle Replaces HackroidRifle
{
Tag "Hackroid Rifle"
States
{
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+6
  GrenadeToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	HPR5 EDCBA 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+1
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+6
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	HPR5 EDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+1
	}
}

Actor INFTrueLegendaryRailgun : "True Legendary Railgun" Replaces "True Legendary Railgun"
{
Tag "True Legendary Railgun"
States
{
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+6
  GrenadeToss:
  	TNT1 A 0
	TNT1 A 0 A_ZoomFactor(1)
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	LRAL EDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+6
  MineToss:
  	TNT1 A 0 A_TakeInventory("RailgunZoomed",1)
	TNT1 A 0 A_ZoomFactor(1)
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	LRAL EDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready
	}
}

//True Legendary

ACTOR "INFLegendaryRevolver" : "BadLegendaryRevolver" Replaces "BadLegendaryRevolver"
{
   Tag "Legendary Revolver"
   Scale 0.50
   Weapon.PreferredSkin "INFLegendaryRevolver-Marine"
   Weapon.SelectionOrder 19
   Weapon.KickBack 160
   Inventory.PickupSound "revspin"
   Weapon.AmmoGive2 12
   Weapon.AmmoUse 1
   Weapon.AmmoType "LEGENDARYRevolverSpinner"
   Weapon.AmmoType2 "LegendaryLMGBulletMag" //"LegendaryBulletMag"
   Inventory.Pickupmessage "Legendary Revolver! Get ready to be rekt."
   Obituary "%o was gibbed to death by A Powerful shot from  %K's Legendary Revolver ." 
   +NOAUTOFIRE
   +WEAPON.AMMO_OPTIONAL
   +WEAPON.NOALERT
   +INVENTORY.UNDROPPABLE
   States 
   { 
  Spawn: 
    LRVI A -1 
    Stop
  Ready:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	LRVU ABCDEF 1
	LRVU G 1 A_PlaySound("REVCLOSE")
	TNT1 A 0 A_PlayWeaponSound("revspin")
  ReadyLoop:
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	TNT1 A 0 A_TakeInventory("RevBreak",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	LRVF A 1 A_WeaponReady
	Loop
  TrueReady:
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TRSU ABCDEF 1
	TRSU G 1 A_PlaySound("REVCLOSE")
	TNT1 A 0 A_PlayWeaponSound("revspin")
  TrueReadyLoop:
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	TNT1 A 0 A_TakeInventory("RevBreak",1)
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	TRVL A 1 A_WeaponReady
	Loop
  Deselect:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselectLoop")
  DeselectLoop:
	TNT1 A 0 A_Lower
    LRVF A 1 A_Lower
    Loop
  TrueDeselectLoop:
	TNT1 A 0 A_Lower
    TRVL E 1 A_Lower
    Loop
  QuickSwitch:
    TNT1 A 0 A_PlayWeaponSound("weapons/quickswitch")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueQuickSwitchLoop")
  QuickSwitchLoop:
    LRVL E 1 A_Lower
	TNT1 A 0 A_Lower
    Loop
  TrueQuickSwitchLoop:
    TRVL E 1 A_Lower
	TNT1 A 0 A_Lower
    Loop
  Select:
	TNT1 A 0 A_Raise
    Wait
  Fire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
	TNT1 A 0 A_JumpIfInventory("RevAlt",1,"RevHold")
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/legrevfire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_JumpIfInventory("LegendaryRevolverToken",5,"SpecialFire")
	TNT1 A 0 A_GiveInventory("LegendaryRevolverToken",1)
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_FireCustomMissile("BlueSGTracer",0,0,0,0)
	TNT1 A 0 A_FireBullets(0, 0, -1,Random(90,110),"LegendaryRevBulletPuff")
	TNT1 A 0 A_Light1
	LRVF BC 1 Bright A_GunFlash
	TNT1 A 0 A_Light0 
	LRVF DEFG 1
	TNT1 A 0 A_GiveInventory("RevAlt",1)
	TNT1 A 0 A_ReFire
	LRVF H 1 A_WeaponReady
	Goto ReadyLoop
  SpecialFire:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/legrevfire")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(1,2,0,1,0)
	TNT1 A 0  A_FireCustomMissile("LegRevolverSpecialShot", 0, true, 0, 8, false, 0)
	TNT1 A 0 A_Light1
	LRVF BC 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	LRVF DEFG 1
	TNT1 A 0 A_GiveInventory("RevAlt",1)
	TNT1 A 0 A_ReFire
	LRVF H 1 A_WeaponReady
	Goto ReadyLoop
  RevHold:
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	TNT1 A 0 A_GiveInventory("RevBreak",1)
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	LRHF ABCDEF 2
	TNT1 A 0 A_JumpIfNoAmmo("Empty2")
  Hold2: 
	TNT1 A 0 A_JumpIfNoAmmo("Empty2")
	TNT1 A 0 A_PlaySound("weapons/legrevfire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_JumpIfInventory("LegendaryRevolverToken",5,"SpecialFireHold")
	TNT1 A 0 A_GiveInventory("LegendaryRevolverToken",1)
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_FireCustomMissile("BlueSGTracer",0,0,0,0)
	TNT1 A 0 A_FireBullets(0, 0, -1,Random(90,110),"LegendaryRevBulletPuff")
	TNT1 A 0 A_Light1
	LRHF GH 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	LRHF HIJKL 1
	LRHF M 1 A_ReFire("Hold2")
	LRHF FEDCBA 2
	Goto ReadyLoop
  SpecialFireHold:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/legrevfire")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_FireCustomMissile("LegRevolverSpecialShot", 0, true, 0, 8, false, 0)
	TNT1 A 0 A_Light1
	LRHF GH 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	LRHF HIJKL 1
	LRHF M 1 A_ReFire("Hold2")
	LRHF FEDCBA 2
	Goto ReadyLoop
  TrueFire:
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
	TNT1 A 0 A_JumpIfInventory("RevAlt",1,"TrueRevHold")
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
	TNT1 A 0 A_PlaySound("weapons/legrevfire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_JumpIfInventory("LegendaryRevolverToken",5,"TrueSpecialFire")
	TNT1 A 0 A_GiveInventory("LegendaryRevolverToken",1)
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_FireCustomMissile("BlueSGTracer",0,0,0,0)
	TNT1 A 0 A_FireCustomMissile("True80-130Bullet",0,true,0,8,false,0)
	TNT1 A 0 A_Light1
	TRVL BC 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	TNT1 A 0 
    TRVL DEFG 1
	TNT1 A 0 A_GiveInventory("RevAlt",1)
	TNT1 A 0 A_ReFire
	TRVL H 1 A_WeaponReady
	Goto TrueReadyLoop
	
  TrueSpecialFire:
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
	TNT1 A 0 A_PlaySound("weapons/legrevfire")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_FireCustomMissile("TrueLegRevolverSpecialShot", 0, true, 0, 8, false, 0)
	TNT1 A 0 A_Light1
	TRVL AB 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	TNT1 A 0 
	TRVL DEFG 1
	TNT1 A 0 A_GiveInventory("RevAlt",1)
	TNT1 A 0 A_ReFire
	TRVL H 1 A_WeaponReady
	Goto TrueReadyLoop
	
  TrueRevHold:
	TNT1 A 0 A_TakeInventory("RevAlt",1)
	TNT1 A 0 A_GiveInventory("RevBreak",1)
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
	TRHF ABCDEF 2
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty2")
  TrueHold2: 
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty2")
	TNT1 A 0 A_PlaySound("weapons/legrevfire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_JumpIfInventory("LegendaryRevolverToken",5,"TrueSpecialFireHold")
	TNT1 A 0 A_GiveInventory("LegendaryRevolverToken",1)
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_FireCustomMissile("BlueSGTracer",0,0,0,0)
	TNT1 A 0 A_FireCustomMissile("True80-130Bullet",0,true,0,8,false,0)
	TNT1 A 0 A_Light1
	TRHF GH 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	TRHF HIJKL 1
	TRHF M 1 A_ReFire("TrueHold2")
	TRHF FEDCBA 2
	Goto ReadyLoop
  TrueSpecialFireHold:
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
	TNT1 A 0 A_PlaySound("weapons/legrevfire")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_FireCustomMissile("TrueLegRevolverSpecialShot", 0, true, 0, 8, false, 0)
	TNT1 A 0 A_Light1
	TRHF GH 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	TRHF HIJKL 1
	TRHF M 1 A_ReFire("TrueHold2")
	TRHF FEDCBA 2
	Goto ReadyLoop
	
   Empty:
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueEmpty")
    LRVR A 1 A_PlayWeaponSound("weapons/click")
	Goto AltFire
   Empty2:
    LRHF F 1 A_PlayWeaponSound("weapons/click")
    LRHF EDCBA 1
  AltFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
  	TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",6,"ReadyLoop")
    TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,1)
	Goto ReadyLoop
	LRVR ABCDEF 2
	LRVR G 1 A_PlaySound("REVOPEN")
	LRVR HI 1
	LRVR J 2  A_PlaySound("REVEJECT")
	LRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",5,"LRReload1")
	LRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",4,"LRReload2")
	LRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",3,"LRReload3")
	LRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",2,"LRReload4")
	LRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",1,"LRReload5")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload2")
  Reload:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LEGENDARYRevolverSpinner",1)
	TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner", 6,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
	TNT1 A 0
	Goto ReadyLoop
  LRReload1:
	LRVR K 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	LRVR K 1
	LRVR L 5
	LRVR MNOPQ 2
	LRVR R 3 A_PlaySound("REVINSR")
	LRVR RST 2
	LRVR UV 2
	LRVR W 3 A_PlaySound("REVCLOSE")
	LRVR XY 2
	LRVU FG 2
	LRVF A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  LRReload2:
	LRVR KK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	LRVR K 1
	LRVR L 5
	LRVR MNOPQ 2
	LRVR R 3 A_PlaySound("REVINSR")
	LRVR RST 2
	LRVR UV 2
	LRVR W 3 A_PlaySound("REVCLOSE")
	LRVR XY 2
	LRVU FG 2
	LRVF A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  LRReload3:
	LRVR KKK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	LRVR K 1
	LRVR L 5
	LRVR MNOPQ 2
	LRVR R 3 A_PlaySound("REVINSR")
	LRVR RST 2
	LRVR UV 2
	LRVR W 3 A_PlaySound("REVCLOSE")
	LRVR XY 2
	LRVU FG 2
	LRVF A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  LRReload4:
	LRVR KKKK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	LRVR K 1
	LRVR L 5
	LRVR MNOPQ 2
	LRVR R 3 A_PlaySound("REVINSR")
	LRVR RST 2
	LRVR UV 2
	LRVR W 3 A_PlaySound("REVCLOSE")
	LRVR XY 2
	LRVU FG 2
	LRVF A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  LRReload5:
	LRVR KKKKK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	LRVR K 1
	LRVR L 5
	LRVR MNOPQ 2
	LRVR R 3 A_PlaySound("REVINSR")
	LRVR RST 2
	LRVR UV 2
	LRVR W 3 A_PlaySound("REVCLOSE")
	LRVR XY 2
	LRVU FG 2
	LRVF A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  Reload2:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LEGENDARYRevolverSpinner",1)
	TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",6,"Full")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload2")
  Full:
	LRVR KKKKKK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	LRVR K 1
	LRVR L 5
	LRVR MNOPQ 2
	LRVR R 3 A_PlaySound("REVINSR")
	LRVR RST 2
	LRVR UV 2
	LRVR W 3 A_PlaySound("REVCLOSE")
	LRVR XY 2
	LRVU FG 2
	LRVF A 1 A_PlayWeaponSound("revspin")
	Goto ReadyLoop
	
  TrueEmpty:
    TRVR A 1 A_PlayWeaponSound("weapons/click")
	Goto TrueAltFire
  TrueEmpty2:
    TRHF F 1 A_PlayWeaponSound("weapons/click")
    TRHF EDCBA 1
	
  TrueAltFire:
  	TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",6,"TrueReadyLoop")
    TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,1)
	Goto TrueReadyLoop
	TRVR ABCDEF 2
	TRVR G 1 A_PlaySound("REVOPEN")
	TRVR HI 1
	TRVR J 2  A_PlaySound("REVEJECT")
	TRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",5,"TrueLRReload1")
	TRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",4,"TrueLRReload2")
	TRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",3,"TrueLRReload3")
	TRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",2,"TrueLRReload4")
	TRVR J 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",1,"TrueLRReload5")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReload2")
  TrueReload:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LEGENDARYRevolverSpinner",1)
	TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner", 6,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReload")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
	TNT1 A 0
	Goto TrueReadyLoop
  TrueLRReload1:
	TRVR K 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	TRVR K 1
	TRVR L 5
	TRVR MNOPQ 2
	TRVR R 3 A_PlaySound("REVINSR")
	TRVR RST 2
	TRVR UV 2
	TRVR W 3 A_PlaySound("REVCLOSE")
	TRVR XY 2
	TRSU FG 2
	TRVL A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  TrueLRReload2:
	TRVR KK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	TRVR K 1
	TRVR L 5
	TRVR MNOPQ 2
	TRVR R 3 A_PlaySound("REVINSR")
	TRVR RST 2
	TRVR UV 2
	TRVR W 3 A_PlaySound("REVCLOSE")
	TRVR XY 2
	TRSU FG 2
	TRVL A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  TrueLRReload3:
	TRVR KKK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	TRVR K 1
	TRVR L 5
	TRVR MNOPQ 2
	TRVR R 3 A_PlaySound("REVINSR")
	TRVR RST 2
	TRVR UV 2
	TRVR W 3 A_PlaySound("REVCLOSE")
	TRVR XY 2
	TRSU FG 2
	TRVL A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  TrueLRReload4:
	TRVR KKKK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	TRVR K 1
	TRVR L 5
	TRVR MNOPQ 2
	TRVR R 3 A_PlaySound("REVINSR")
	TRVR RST 2
	TRVR UV 2
	TRVR W 3 A_PlaySound("REVCLOSE")
	TRVR XY 2
	TRSU FG 2
	TRVL A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto ReadyLoop
  TrueLRReload5:
	TRVR KKKKK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	TRVR K 1
	TRVR L 5
	TRVR MNOPQ 2
	TRVR R 3 A_PlaySound("REVINSR")
	TRVR RST 2
	TRVR UV 2
	TRVR W 3 A_PlaySound("REVCLOSE")
	TRVR XY 2
	TRSU FG 2
	TRVL A 1 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	Goto TrueReadyLoop
  TrueReload2:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LEGENDARYRevolverSpinner",1)
	TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",6,"TrueFull")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReload2")
  TrueFull:
	TRVR KKKKKK 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	TRVR K 1
	TRVR L 5
	TRVR MNOPQ 2
	TRVR R 3 A_PlaySound("REVINSR")
	TRVR RST 2
	TRVR UV 2
	TRVR W 3 A_PlaySound("REVCLOSE")
	TRVR XY 2
	TRSU FG 2
	TRVL A 1 A_PlayWeaponSound("revspin")
	Goto TrueReadyLoop	
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LRVU GFEDCA 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
    LRVU ABCDEFG 1
	Goto ReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LRVU GFEDCA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	LRVU ABCDEFG 1
	Goto ReadyLoop

  TrueGrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReadyLoop
  TrueGrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TRSU GFEDCA 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
    TRSU ABCDEFG 1
	Goto ReadyLoop
  TrueMineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto TrueReadyLoop
  TrueMineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TRSU GFEDCA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TRSU ABCDEFG 1
	Goto TrueReadyLoop
	}
}

ACTOR "INFLegendaryRifle" : "NewLegendaryPlasmaticRifle" Replaces "NewLegendaryPlasmaticRifle"
{
Tag "Legendary Plasmatic Rifle"
States
{
    Ready:
     TNT1 A 0
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
     TNT1 A 0 A_PlaySound("weapons/legup")
	 BTRS ABCDE 1
   ReadyLoop:
     TNT1 A 0 A_JumpIfInventory("DemonMagazine",1,2)
	 TNT1 A 0
	 Goto NoBuzzing
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_PlaySound("weapons/legrifidle")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK EE 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 BTEK EE 1 A_WeaponReady
     Goto ReadyLoop
   NoBuzzing:
     TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueNoBuzzing")
     BTEK A 1 A_WeaponReady
	 Loop
   TrueReady:
     TNT1 A 0 A_PlayWeaponSound("weapons/demontechload")
	 B1RS ABCDE 1
   TrueReadyLoop:
     TNT1 A 0 A_JumpIfInventory("LDemonMagazine",1,2)
	 TNT1 A 0
	 Goto TrueNoBuzzing
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_PlaySound("weapons/legrifidle")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK EE 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	 B1EK EE 1 A_WeaponReady
     Goto TrueReadyLoop
   TrueNoBuzzing:
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
     TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
     B1EK A 1 A_WeaponReady
	 Loop
   Deselect:
     TNT1 A 0
	 TNT1 A 0 A_PlaySound("weapons/weapondown",CHAN_BODY)
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselect")
     TNT1 A 0 A_PlaySound ("D_LEGND",5,5.0,1,ATTN_NONE)
     //TNT1 A 0 ACS_NamedExecuteAlways("StopWeaponMusic",0)
     TNT1 A 0 A_Lower
     BTEK A 1 A_Lower
     Goto Deselect+4
   TrueDeselect:
     TNT1 A 0 A_PlaySound ("D_LEGND",5,5.0,1,ATTN_NONE)
     //TNT1 A 0 ACS_NamedExecuteAlways("StopWeaponMusic",0)
     TNT1 A 0 A_Lower
	 B1EK A 1 A_Lower
     Goto TrueDeselect+1
   Select:
	 TNT1 A 0 A_Raise
	 Wait
   Fire:
     TNT1 A 0
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
     TNT1 A 0 A_JumpIfNoAmmo("Empty")
     //TNT1 A 0 ACS_NamedExecuteAlways("StartWeaponMusic",0,0)
	 TNT1 A 0 A_AlertMonsters
     TNT1 A 0 A_GunFlash
	 TNT1 A 0 Radius_Quake(4,2,0,1,0)
     TNT1 A 0 A_Light1
	 TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
     BTKF A 1 Bright A_FireCustomMissile("PlayerLegendaryProjectile",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	 BTKF B 1 Bright A_Light2
     BTKF C 2 A_Light0
     TNT1 A 0 A_ReFire
     Goto ReadyLoop
   Empty:
     BTEK A 10 A_PlaySound("weapons/click2")	 
   AltFire:
     TNT1 A 0
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
  	 TNT1 A 0 A_JumpIfInventory("LDemonMagazine",50,2)
     TNT1 A 0 A_JumpIfInventory("LDemonAmmo",1,2)
	 TNT1 A 0
	 Goto ReadyLoop
     BTKR AB 2
	 BTKR C 3
	 BTKR D 4 A_PlaySound("weapons/demontecheject")
	 TNT1 A 0 Radius_Quake(2,2,0,1,0)
	 BTKR E 2 A_PlaySound("weapons/demontechsteam")
	 BTKR F 2 Radius_Quake(2,2,0,1,0)
	 BTKR GHI 2 Radius_Quake(2,2,0,1,0)
	 BTKR J 3 A_FireCustomMissile("LDemonTechEmptyMag", 0, 0, 0, 1)
	 BTKR K 15 
	 BTKR LMN 2
	 TNT1 A 0 A_JumpIfInventory("LDemonAmmo",1,"Reload")	 
     BTKR O 6 A_PlayWeaponSound("weapons/demontechload")
     BTKR O 4 A_PlayWeaponSound("weapons/demontechclick")
     BTKR CB 3
	 BTKR A 2
	 Goto ReadyLoop
   TrueFire:
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Fire
     TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
     //TNT1 A 0 ACS_NamedExecuteAlways("StartWeaponMusic",0,0)
	 TNT1 A 0 A_AlertMonsters
     TNT1 A 0 A_GunFlash
	 TNT1 A 0 Radius_Quake(4,2,0,1,0)
     TNT1 A 0 A_Light1
	 TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
     B1KF A 0 A_FireCustomMissile("PlayerTrueLegendaryProjectile",Random(100,-100)/100.00,0,0,0,0,Random(100,-100)/100.00)
     B1KF A 1 Bright A_FireCustomMissile("PlayerTrueLegendaryProjectile",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	 B1KF B 2 Bright A_Light2
     B1KF C 2 A_Light0
     TNT1 A 0 A_ReFire
     Goto TrueReadyLoop
   TrueSuperFire:
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Fire
     TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
     //TNT1 A 0 ACS_NamedExecuteAlways("StartWeaponMusic",0,0)
	 TNT1 A 0 A_AlertMonsters
     TNT1 A 0 A_GunFlash
	 TNT1 A 0 Radius_Quake(4,2,0,1,0)
     TNT1 A 0 A_Light1
	 TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	 TNT1 AAAA 0 a_firecustommissile("nothing") //so ammo is used
     B1KF A 1 Bright A_FireCustomMissile("PlayerSuperLegendaryPlasma",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	 B1KF B 1 Bright A_Light2
     B1KF C 2 A_Light0
     TNT1 A 0 A_ReFire
     Goto TrueReadyLoop
   TrueEmpty:
     B1EK A 10 A_PlayWeaponSound("weapons/click2")	 
   TrueAltFire:
  	 TNT1 A 0 A_JumpIfInventory("LDemonMagazine",50,2)
     TNT1 A 0 A_JumpIfInventory("LDemonAmmo",1,2)
	 TNT1 A 0
	 Goto TrueReadyLoop
     B1KR AB 2
	 B1KR C 3
	 B1KR D 4 A_PlaySound("weapons/demontecheject")
	 TNT1 A 0 Radius_Quake(2,2,0,1,0)
	 B1KR E 2 A_PlaySound("weapons/demontechsteam")
	 B1KR F 2 Radius_Quake(2,2,0,1,0)
	 B1KR GHI 2 Radius_Quake(2,2,0,1,0)
	 B1KR J 3 A_FireCustomMissile("LDemonTechEmptyMag", 0, 0, 0, 1)
	 B1KR K 15 
	 B1KR LMN 2
	 TNT1 A 0 A_JumpIfInventory("LDemonAmmo",1,"TrueReload")	 
     B1KR O 6 A_PlayWeaponSound("weapons/demontechload")
     B1KR O 4 A_PlayWeaponSound("weapons/demontechclick")
     B1KR CB 3
	 B1KR A 2
	 Goto TrueReadyLoop
   Reload:
     TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReload")
	 TNT1 A 0 A_TakeInventory("LDemonAmmo",1)
	 TNT1 A 0 A_GiveInventory("LDemonMagazine",1)
	 TNT1 A 0 A_JumpIfInventory("LDemonMagazine",50,"Full")
	 TNT1 A 0 A_JumpIfInventory("LDemonAmmo",1,"Reload")
	 Goto AltFire+21
   Full:
     TNT1 A 0
	 Goto AltFire+21
   TrueReload:
	 TNT1 A 0 A_TakeInventory("LDemonAmmo",1)
	 TNT1 A 0 A_GiveInventory("LDemonMagazine",1)
	 TNT1 A 0 A_JumpIfInventory("LDemonMagazine",50,"TrueFull")
	 TNT1 A 0 A_JumpIfInventory("LDemonAmmo",1,"TrueReload")
	 Goto TrueAltFire+19
   TrueFull:
     TNT1 A 0
	 Goto TrueAltFire+19
   GrenadeCheck:
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	 TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	 Goto Ready+8
   TrueGrenadeCheck:
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeToss")
	 TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	 Goto TrueReady+6
   GrenadeToss:
  	 TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	 BTRS EDCBA 1
	 TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	 TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	 Goto Ready+3
   TrueGrenadeToss:
  	 TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	 B1RS EDCBA 1
	 TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	 TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0
	 Goto TrueReady+1
   MineCheck:
	 TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	 TNT1 A 0 A_TakeInventory("MineAction",1)
	 Goto Ready+8
   TrueMineCheck:
	 TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineToss")
	 TNT1 A 0 A_TakeInventory("MineAction",1)
	 Goto TrueReady+6
   MineToss:
  	 TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	 BTRS EDCBA 1
	 TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	 Goto Ready+3
   TrueMineToss:
  	 TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	 B1RS EDCBA 1
	 TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	 TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	 Goto Select
	 TNT1 A 0
	 Goto TrueReady+1
  Spawn:
     BTEP A -1
     Stop
	 }
}

ACTOR "INFLegendaryASG" : "NewLegendaryASG" replaces "NewLegendaryASG"
{
//Yeah, the Explosive Assault Shotgun!
  Tag "Legendary Assault Shotgun"
  States
  {
  Ready:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
    TNT1 A 0 A_PlayWeaponSound("LShotgun/Cock")
	LGSG VWXYZ 1
  ReadyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyloop")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    LGSG A 1 A_WeaponReady
    Goto ReadyLoop
  TrueReady:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
    TNT1 A 0 A_PlayWeaponSound("LShotgun/Cock")
	TGSG VWXYZ 1
  TrueReadyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
    TGSG A 1 A_WeaponReady
    Goto TrueReadyLoop
  Deselect:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselect")
    TNT1 A 0 A_PlaySound("weapons/weapondown")
	TNT1 A 0 A_Lower
    LGSG A 1 A_Lower
    Goto Deselect+3
  TrueDeselect:
    TNT1 A 0 A_PlaySound("weapons/weapondown")
	TNT1 A 0 A_Lower
    TGSG A 1 A_Lower
    Goto TrueDeselect+1
  Select:
	TNT1 A 0 A_Raise
    Wait	
  Fire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_SpawnItemEx("BlueShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 AAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(5,-5),0,0,Random(5,-5))
    LGSG B 1 Bright A_FireBullets(6.2,3.4,7,Random(20,28),"LegendaryASGBulletPuff")
    LGSG C 1 Bright A_Light2
	TNT1 A 0 A_Light0
    LGSG DEFG 1
	LGSG HI 2
    Goto ReadyLoop
  TrueFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",1)
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_SpawnItemEx("BlueShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 AAAAAA 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",Random(-4,4),0,0,0,0,frandom(-3,3))
    TGSG B 1 Bright A_FireBullets(6.2,3.4,7,Random(10,15),"TrueLegendaryASGBulletPuff")
    TGSG C 1 Bright A_Light2
	TNT1 A 0 A_Light0
    TGSG DEFG 1
	TGSG HI 2
    Goto TrueReadyLoop
  Empty:
    LGSG A 10 A_PlaySound("weapons/click")
  AltFire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
  	TNT1 A 0 A_JumpIfInventory("LegendaryShotgunDrum",16,2)
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,2)
	TNT1 A 0
	Goto ReadyLoop
	LGSG JKLMN 1
	LGSG O 2
	LGSR A 2 A_PlaySound("lasgguy/asgout")
  	LGSR B 3
	LGSG U 40 A_FireCustomMissile("LegendaryEmptyDrumSpawner", 0, 0, 10, 1) 
	LGSG TSR 1
	LGSG Q 2
  Reload:
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReload")
	TNT1 A 0 A_TakeInventory("LegendaryShell",1)
	TNT1 A 0 A_GiveInventory("LegendaryShotgunDrum",1)
	TNT1 A 0 A_JumpIfInventory("LegendaryShotgunDrum",16,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,"Reload")
	TNT1 A 0
	Goto Reload2
  Reload2:
	LGSG P 3
	LGSG O 6 A_PlaySound("lasgguy/asgin")
	LGSG NMLKJ 1
	Goto ReadyLoop
  TrueEmpty:
    TGSG A 10 A_PlaySound("weapons/click")
  TrueAltFire:
  	TNT1 A 0 A_JumpIfInventory("LegendaryShotgunDrum",16,2)
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,2)
	TNT1 A 0
	Goto TrueReadyLoop
	TGSG JKLMN 1
	TGSG O 2
	TGSR A 2 A_PlaySound("lasgguy/asgout")
  	TGSR B 3
	TGSG U 40 A_FireCustomMissile("LegendaryEmptyDrumSpawner", 0, 0, 10, 1) 
	TGSG TSR 1
	TGSG Q 2
  TrueReload:
	TNT1 A 0 A_TakeInventory("LegendaryShell",1)
	TNT1 A 0 A_GiveInventory("LegendaryShotgunDrum",1)
	TNT1 A 0 A_JumpIfInventory("LegendaryShotgunDrum",16,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,"TrueReload")
	TNT1 A 0
	Goto TrueReload2
  TrueReload2:
	TGSG P 3
	TGSG O 6 A_PlaySound("lasgguy/asgin")
	TGSG NMLKJ 1
	Goto TrueReadyLoop
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LGSG ZYXWV 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	LGSG VWXYZ 1
	Goto ReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LGSG ZYXWV 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+3
  TrueGrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReadyLoop
  TrueGrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TGSG ZYXWV 1
	TNT1 A 6
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TGSG VWXYZ 1
	Goto TrueReadyLoop
  TrueMineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto TrueReadyLoop
  TrueMineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TGSG ZYXWV 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0
	Goto TrueReady+1
  Spawn:
    LMAP A -1
    Stop
	}
}

Actor "INFLegendaryPlasmaticCannon" : "NewLegendaryPlasmaticCannon" replaces "NewLegendaryPlasmaticCannon"
{
Tag "Legendary Plasmatic Cannon"
States
{
  Spawn:
    LEGW Z -1
    Loop
  Ready:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
    LCAN A 1 A_WeaponReady
    Loop
  TrueReady:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
    TCAN A 1 A_WeaponReady
    Loop
  Deselect:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselect")
	TNT1 A 0 A_PlaySound("weapons/weapondown")
    TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_Lower
    LCAN A 1 A_Lower
    Goto Deselect+6
  TrueDeselect:
	TNT1 A 0 A_PlaySound("weapons/weapondown")
    TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_Lower
    TCAN A 1 A_Lower
    Goto TrueDeselect+1
  Select:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueSelect")
    TNT1 A 0 A_Raise
    LCAN A 1 A_Raise
    Goto Select+1
  TrueSelect:
    TNT1 A 0 A_Raise
    TCAN A 1 A_Raise
    Loop
  Fire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
    TNT1 A 0 A_GunFlash
	LCAN B 2 Bright
	TNT1 A 0 A_PlaySound("LegCannon/Fire",1)
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
    LCAN C 2 Bright A_FireCustomMissile("LegendaryCannonBallCF",0,1,0,0)
    LCAN DE 2 Bright
	LCAN FFFGGGHHHAAA 1
	LCAN A 3 A_Refire
    Goto Ready
  TrueFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
	TCAN A 18 Bright A_PlaySound("legendarycannon/charge",7)
	TCAN BBB 1 Bright
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	TNT1 A 0 A_PlaySound("Petrovec/Fire",1)
    TNT1 A 0 A_PlaySound("Petrovec/AddFire",6)
    TNT1 A 0 A_PlaySound("Petrovec/Ambient",5)
    TCAN C 2 Bright A_FireCustomMissile("PlayerTrueLegendaryDTGrenade",0,1,0,0)
    TCAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_JumpIfNoAmmo(2)
	TNT1 A 0 A_Refire("TrueFire")
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
    TCAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,0)
    Goto Ready
  AltFire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
	LCAN A 18 Bright A_PlaySound("legendarycannon/charge",7)
	LCAN BBB 1 Bright
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("LegCannon/Fire2",1)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonProj",frandom(-5,5),1,0,0,0,frandom(-3,3))
	TNT1 AA 0 A_FireCustomMissile("LegendaryCannonProj",frandom(-5,5),0,0,0,0,frandom(-3,3))
    LCAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_JumpIfNoAmmo(2)
	TNT1 A 0 A_Refire("Altfire2")
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
    LCAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,0)
    Goto Ready
  Altfire2:
	LCAN FFFGGGHHHAAA 1
	Goto Altfire+3
  TrueAltFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",60,1)
	Goto TrueReady
	TCAN A 35 Bright A_PlaySound("legendarycannon/charge",7)
	TCAN BBB 1 Bright
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 C 0 A_PlayWeaponSound("lrball3/shot")
	TNT1 AA 0 a_firecustommissile("nothing") //so ammo is used
	TNT1 A 0 A_FireCustomMissile("PlayerTrueLegCannonBomb",0,1,0,0)
    TCAN CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
    TCAN FFFFFFGGGGGGHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	TCAN A 3 A_Refire
    Goto Ready
  Flash:
    TNT1 A 1 A_Light1
    TNT1 A 1 A_Light2
    TNT1 A 1 A_Light1
    TNT1 A 1 A_Light0
    Stop
	}
}

ACTOR "INFLegendaryBehemothCannon" : "NewLegendaryBehemothCannon" Replaces "NewLegendaryBehemothCannon"
{
   Tag "Legendary Behemoth Cannon"
   States
   {
  Spawn:
	LBHC H -1 
	Stop
  Ready:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	LBHC A 1 A_WeaponReady
	Loop
  TrueReady:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TBHC A 1 A_WeaponReady
	Loop
  Select:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueSelect")
	TNT1 A 0 A_Raise
	LBHC A 1 A_Raise
	Goto Select+1
  TrueSelect:
    TNT1 A 0 A_Raise
	TBHC A 1 A_Raise
	Goto TrueSelect
  Deselect:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselect")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_Lower
	LBHC A 1 A_Lower
	Goto Deselect+6
  TrueDeselect:	
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_Lower
	TBHC A 1 A_Lower
	Loop
  Fire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
	LBHC D 3 Bright
	LBHC E 3 Bright A_PlaySound("cannon/fire", CHAN_WEAPON, 1.0, 0)
	LBHC F 1 Bright A_FireCustomMissile("LegBehemothCometPlayer",0,1)
	LBHC F 0 Bright A_FireCustomMissile("LegBehemothCometPlayer",-2,0)
	LBHC F 0 Bright A_FireCustomMissile("LegBehemothCometPlayer",2,0)
	LBHC G 3 Bright
	LBHC CBA 5 Bright
	Goto Ready
  TrueFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
	TBHC D 3 Bright
	TBHC E 3 Bright A_PlaySound("cannon/fire", CHAN_WEAPON, 1.0, 0)
	TBHC F 1 Bright A_FireCustomMissile("TLegBehemothComet2Player",0,1)
	TBHC F 0 Bright A_FireCustomMissile("TLegBehemothCometPlayer",-3,0)
	TBHC F 0 Bright A_FireCustomMissile("TLegBehemothCometPlayer",3,0)
	TBHC G 3 Bright
	TBHC CBA 5 Bright
	Goto Ready
  AltFire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
	LBHC A 35 A_PlaySound("weapons/bfgf", CHAN_WEAPON, 1.0, 0)
	LBHC BCDE 1
	LBHC F 2 A_FireCustomMissile("LegBehBFGBallPlayer")
	LBHC FG 3
	LBHC CBA 5
	Goto Ready
  TrueAltFire:
	TBHC A 35 A_PlaySound("weapons/bfgf", CHAN_WEAPON, 1.0, 0)
	TBHC BCDE 1
	TBHC F 2 A_FireCustomMissile("TrueBehemothBFG9500BPlayer")
	TBHC FG 3
	TBHC CBA 5
	Goto Ready	
	}
}

Actor LegendaryLMGBurst : Inventory {inventory.maxamount 1}
Actor LegendaryLMGStart : Inventory {inventory.maxamount 1}

Actor HDLegLMGToken : Inventory {inventory.maxamount 1}

ACTOR "INFLegendaryLightMachineGun" : "NewLegendaryLightMachineGun" Replaces "NewLegendaryLightMachineGun"
{
Tag "Legendary Light Machine Gun"
States
{
  Spawn:
	LMGL "Z" -1
	Stop	
  Deselect:
    TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
    TNT1 A 0 A_TakeInventory("RailgunAction",1)
    TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselect")
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"DeselectX")
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto Deselect2
	TNT1 A 0 A_Lower
	LZL2 A 1 A_Lower
	Goto Deselect+7
  Deselect2:
	TNT1 A 0 A_Lower
	LZL2 H 1 A_Lower
	Loop
  DeselectX:
	TNT1 A 0 A_Lower
	LLZ2 A 1 A_Lower
	Loop
	
	
  TrueDeselect:
    TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"TrueDeselectX")
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto TrueDeselect2
	TNT1 A 0 A_Lower
	TZL2 A 1 A_Lower
	Goto TrueDeselect+2
  TrueDeselect2:
	TNT1 A 0 A_Lower
	TZL2 H 1 A_Lower
	Loop
  TrueDeselectX:
	TNT1 A 0 A_Lower
	TMGG A 1 A_Lower
	Loop
  Select:
	TNT1 A 0 A_Raise
	Wait
	
  Startup:
	TNT1 A 0 A_PlaySound("explosivemg/foley",7)
	TNT1 A 0 A_GiveInventory("LegendaryLMGStart",1)
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"StartupX")
	LZL4 ABCD 1
	LZL3 DEF 1
	LZL3 G 2
	LZL3 H 2 A_PlaySound("weapons/LMGReload3",6)
	LZL3 IJKLM 2
	Goto ReadyLoop
  StartupX:
	LLZ1 ABCDEFGH 1
	LLZ2 A 1
	LLZ4 MNOPQRST 1
	TNT1 A 0 A_PlaySound("weapons/LMGReload3",6)
	LLZ4 UVWX 2
	LLZ4 YZ 1
	LLZ4 ONM 1
	Goto ReadyLoopX
	
  Ready:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGStart",1,1)
	Goto Startup
	TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"ReadyX")
	LZL1 ABCDEF 1
  ReadyLoop:
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto ReadyLoop2
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	LZL2 A 1 A_WeaponReady
	Loop
  ReadyLoop2:
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,"ReadyLoop")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	LZL2 H 1 A_WeaponReady
	Loop
  ReadyX:
	LLZ1 ABCDEFGH 1
  ReadyLoopX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheckX")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,1)
	Goto Weaponskin2
	LLZ2 A 1 A_WeaponReady
	Loop
	
  TrueReady:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"TrueReadyX")
	TZL1 ABCDEF 1
  TrueReadyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto TrueReadyLoop2
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"TrueWeaponSkin")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	TZL2 A 1 A_WeaponReady
	Loop
  TrueReadyLoop2:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,"TrueReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"TrueWeaponSkin")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	TZL2 H 1 A_WeaponReady
	Loop
  TrueReadyX:
	TNT1 A 0 A_PlayWeaponSound("weapons/LMGReload3")
	TMGG BCDEFA 1
  TrueReadyLoopX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheckX")
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,1)
	Goto TrueWeaponskin2
	TMGG A 1 A_WeaponReady
	Loop
	
  Fire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"FireX")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBurst",1,"BurstFire")
	TNT1 A 0 A_JumpIfNoAmmo("Empty")	
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	LZL2 B 2 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LZL2 CD 1 Bright
	LZL2 E 1 A_Light0
	LZL2 F 1
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,2)
	LZL2 G 1
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	LZL2 B 2 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LZL2 CD 1 Bright
	LZL2 E 1 A_Light0
	LZL2 F 1
	LZL2 G 1 A_ReFire
	Goto ReadyLoop
  BurstFire:
    TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	LZL2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LZL2 CD 1 Bright
	LZL2 E 1 A_Light0
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto BurstEnd
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	LZL2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LZL2 CD 1 Bright
	LZL2 E 1 A_Light0
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto BurstEnd
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	LZL2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LZL2 CD 1 Bright
	LZL2 E 1 A_Light0
	LZL2 F 4
	LZL2 G 6
	LZL2 AAAA 1 A_ReFire
	Goto ReadyLoop
  BurstEnd:
	LZL2 F 4
	LZL2 G 6
	LZL2 A 4
	Goto ReadyLoop
	
	
  FireX:
    TNT1 A 0 A_JumpIfInventory("LegendaryLMGBurst",1,"BurstFireX")
	TNT1 A 0 A_JumpIfNoAmmo("EmptyX")	
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	LLZ2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LLZ2 CD 1 Bright
	TNT1 A 0 A_Light0
	LLZ2 EFG 1
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,3)
	LLZ2 HI 2
	Goto ReadyLoopX
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	LLZ2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LLZ2 CD 1 Bright
	TNT1 A 0 A_Light0
	LLZ2 EFG 1
	LLZ2 HHII 1 A_ReFire
	Goto ReadyLoopX
  BurstFireX:
    TNT1 A 0 A_JumpIfNoAmmo("EmptyX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	LLZ2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LLZ2 CD 1 Bright
	TNT1 A 0 A_Light0
	LLZ2 E 1
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto BurstEndX
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	LLZ2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LLZ2 CD 1 Bright
	TNT1 A 0 A_Light0
	LLZ2 E 1
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto BurstEndX
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	LLZ2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(98,100),"LegendaryASGBulletPuff")
	LLZ2 CD 1 Bright
	TNT1 A 0 A_Light0
	LLZ2 EFG 1
	LLZ2 HI 5
	LLZ2 AAA 1 A_ReFire
	Goto ReadyLoopX
  BurstEndX:
	LLZ2 FG 1
	LLZ2 HI 5
	Goto ReadyLoopX
	
	
  TrueFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"TrueFireX")
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
	TNT1 A 0 A_JumpIfInventory("TrueLegLMGMode1",1,"TrueFireAlt")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	TZL2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(70,90),"TrueLegendaryASGBulletPuff")
	TZL2 CD 1 Bright
	TZL2 E 1 A_Light0
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,2)
	TZL2 F 1
	Goto TrueReadyLoop
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	TZL2 B 1 Bright A_FireBullets(8.0,4.8,1,Random(70,90),"TrueLegendaryASGBulletPuff")
	TZL2 CD 1 Bright
	TZL2 E 1 A_Light0
	TZL2 F 1 A_ReFire
	TZL2 G 1
	Goto TrueReadyLoop
  TrueFireX:
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmptyX")
	TNT1 A 0 A_JumpIfInventory("TrueLegLMGMode1",1,"TrueFireAltX")
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	//TNT1 A 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",0,0,0,0)
	TMGF A 2 Bright A_FireBullets(8.0,4.8,1,Random(70,90),"TrueLegendaryASGBulletPuff")
	TNT1 A 0 A_Light0
	TMGF B 1
	TMGF C 1
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto TrueReadyLoopX
	TNT1 A 0 A_PlaySound("weapons/LMGFire",5)
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	//TNT1 A 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",0,0,0,0)
	TMGF D 2 Bright A_FireBullets(8.0,4.8,1,Random(70,90),"TrueLegendaryASGBulletPuff")
	TNT1 A 0 A_Light0
	TMGF B 1
	TMGF C 1
	TNT1 A 0 A_ReFire
	Goto TrueReadyLoopX
	
  TrueFireAlt:
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmpty")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	TNT1 A 0 A_Jump(128,5)
	TZL2 B 1 Bright A_FireCustomMissile("TLegLMGLaser1",0,1,0,0)
	TZL2 CD 1 Bright
	TNT1 A 0 A_Jump(256,4)
	TZL2 B 1 Bright A_FireCustomMissile("TLegLMGLaser2",0,1,0,0)
	TZL2 CD 1 Bright
	TZL2 E 1 A_Light0
	TZL2 F 1
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,2)
	TZL2 G 1
	Goto TrueReadyLoop
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	TNT1 A 0 A_Jump(128,5)
	TZL2 B 1 Bright A_FireCustomMissile("TLegLMGLaser1",0,1,0,0)
	TZL2 CD 1 Bright
	TNT1 A 0 A_Jump(256,4)
	TZL2 B 1 Bright A_FireCustomMissile("TLegLMGLaser2",0,1,0,0)
	TZL2 CD 1 Bright
	TZL2 E 1 A_Light0
	TZL2 F 1
	TZL2 G 1 A_ReFire
	Goto TrueReadyLoop
  TrueFireAltX:
	TNT1 A 0 A_JumpIfNoAmmo("TrueEmptyX")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
    TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light1
	TNT1 A 0 A_Jump(128,3)
	TMGF A 3 Bright A_FireCustomMissile("TLegLMGLaser1",0,1,0,0)
	TNT1 A 0 A_Jump(256,2)
	TMGF A 3 Bright A_FireCustomMissile("TLegLMGLaser2",0,1,0,0)
	TNT1 A 0 A_Light0
	TMGF B 1
	TMGF C 1
	TMGG A 1
    TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,1)
	Goto TrueReadyLoopX
	TNT1 A 0 A_AlertMonsters	
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(4,3,0,1,0)
	TNT1 A 0 A_SpawnItemEx("LegRifleCasing",30,3,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 A 0 A_Light2
	TNT1 A 0 A_Jump(128,3)
	TMGF A 3 Bright A_FireCustomMissile("TLegLMGLaser1",0,1,0,0)
	TNT1 A 0 A_Jump(256,2)
	TMGF A 3 Bright A_FireCustomMissile("TLegLMGLaser2",0,1,0,0)
	TNT1 A 0 A_Light0
	TMGF B 1
	TMGF C 1
	TMGG A 1
	TNT1 A 0 A_ReFire
	Goto TrueReadyLoopX
	
  Flash:
	TNT1 A 0
	Goto LightDone
  Empty:
    TNT1 A 0 A_JumpIfNoAmmo("EmptyNoAmmo")
    LZL2 E 2 A_PlayWeaponSound("weapons/click")
	LZL2 FGA 2
	Goto AltFire
  EmptyNoAmmo:
    LZL3 V 2 A_PlayWeaponSound("weapons/click")
	LZL3 WX 2
	LZL2 H 2
  AltFire:
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"AltFireX")
  	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",76,"ReadyLoop")
    TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,1)
	Goto ReadyLoop
	TNT1 A 0 A_PlaySound("executor/foley",7)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,"QuickLoad")
	LZL2 IJK 2
	LZL2 L 1 A_PlayWeaponSound("weapons/LMGReload2")
	LZL2 MN 1
	LZL2 O 2
	LZL2 PQ 3
	LZL2 R 25
	LZL2 STU 2
	LZL2 V 2 A_PlayWeaponSound("weapons/LMGReload1")
	LZL2 W 3
  Reload:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",75,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload")
	TNT1 A 0 A_PlaySound("executor/foley",7)
	LZL2 XY 3
	LZL2 "Z" 2
	LZL3 A 2
	LZL3 BCDEF 1
	LZL3 G 2
	LZL3 H 2 A_PlaySound("weapons/LMGReload3",6)
	LZL3 IJKLM 2
	Goto ReadyLoop
  QuickLoad:
	LZL3 NOP 2
	LZL3 Q 1 A_PlayWeaponSound("weapons/LMGReload2")
	LZL3 RS 1
	LZL3 T 2
	LZL3 U 3
	LZL2 Q 3
	LZL2 R 25
	LZL2 STU 2
	LZL2 V 2 A_PlayWeaponSound("weapons/LMGReload1")
	LZL2 W 3
  Reload2:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",76,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"Reload2")
	TNT1 A 0 A_PlaySound("executor/foley",7)
	LZL2 XY 3
	LZL2 "Z" 2
	LZL3 AB 2
	LZL3 PON 1
	Goto ReadyLoop
	
  EmptyX:
    LLZ2 E 2 A_PlayWeaponSound("weapons/click")
	LLZ2 FGH 2
  AltFireX:
  	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",76,"ReadyLoopX")
    TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,1)
	Goto ReadyLoopX
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,2) //93
	TNT1 A 0 A_TakeInventory("LegendaryLMGStart",1)
	TNT1 A 0 A_PlaySound("executor/foley",7)
	LLZ2 JKLMNOPQRSTUVWXYZ 1
	LLZ3 ABC 1
	LLZ3 DEF 2
	LLZ3 G 2 A_PlayWeaponSound("weapons/LMGReload2")
	LLZ3 HIJ 2
	LLZ3 KLM 1
	LLZ3 "NO" 2
	LLZ3 P 3
	LLZ3 QR 2
	LLZ3 STU 1
	LLZ3 V 2
	TNT1 A 0 A_PlayWeaponSound("weapons/LMGReload1")
	LLZ3 WXYZ 2
	TNT1 A 0 A_PlaySound("explosivemg/foley",6)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGStart",1,"ReloadFull")
  ReloadX:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",75,"ReloadFinishX")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"ReloadX")
	Goto ReloadFinishX
  ReloadFull:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",76,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"ReloadFull")
  ReloadFinishX:
	LLZ4 ABCDE 2
	LLZ4 FGHIJKL 1
	LLZ2 TSR 1
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGStart",1,1)
	Goto Startup
	LLZ2 QPONMLKJ 1
	Goto ReadyLoopX
	
  TrueEmpty:
    TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"TrueEmptyX")
    TNT1 A 0 A_JumpIfNoAmmo("TrueEmptyNoAmmo")
    TZL2 E 2 A_PlayWeaponSound("weapons/click")
	TZL2 FGA 2
	Goto TrueAltFire
  TrueEmptyNoAmmo:
    TZL3 V 2 A_PlayWeaponSound("weapons/click")
	TZL3 WX 2
	TZL2 H 2
	Goto TrueAltFire
  TrueAltFire:
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"TrueAltFireX")
  	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",76,"TrueReadyLoop")
    TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,1)
	Goto TrueReadyLoop
	TNT1 A 0 A_PlaySound("executor/foley",7)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,"TrueQuickLoad")
	TZL2 IJK 2
	TZL2 L 1 A_PlayWeaponSound("weapons/LMGReload2")
	TZL2 MN 1
	TZL2 O 2
	TZL2 PQ 3
	TZL2 R 25
	TZL2 STU 2
	TZL2 V 2 A_PlayWeaponSound("weapons/LMGReload1")
	TZL2 W 3
	Goto TrueReload
  TrueReload:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",75,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReload")
	TNT1 A 0 A_PlaySound("executor/foley",7)
	TZL2 XY 3
	TZL2 "Z" 2
	TZL3 A 2
	TZL3 BCDEF 1
	TZL3 G 2
	TZL3 H 2 A_PlaySound("weapons/LMGReload3",6)
	TZL3 IJKLM 2
	Goto TrueReadyLoop
  TrueQuickLoad:
	TZL3 NOP 2
	TZL3 Q 1 A_PlayWeaponSound("weapons/LMGReload2")
	TZL3 RS 1
	TZL3 T 2
	TZL3 U 3
	TZL2 Q 3
	TZL2 R 25
	TZL2 STU 2
	TZL2 V 2 A_PlayWeaponSound("weapons/LMGReload1")
	TZL2 W 3
  TrueReload2:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",76,2)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReload2")
	TNT1 A 0 A_PlaySound("executor/foley",7)
	TZL2 XY 3
	TZL2 "Z" 2
	TZL3 AB 2
	TZL3 PON 1
	Goto TrueReadyLoop
	
  TrueEmptyX:
    TMGG A 10 A_PlayWeaponSound("weapons/click")
  TrueAltFireX:
  	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",76,"TrueReadyLoopX")
    TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,1)
	Goto TrueReadyLoopX
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",1,"TrueMaxReloadX")
	TMGR A 1 A_PlayWeaponSound("weapons/LMGReload2")
 	TMGR BCD 1
	TMGR E 1 A_FireCustomMissile("LegendaryEmptyDrumSpawner", 0, 0, 0, 1)
	TMGR F 1
	TMGR GG 25
	TMGR HIJK 1 A_PlayWeaponSound("weapons/LMGReload1")
	TMGR L 8	
	TMGR MN 2
	TMGR OP 1
	TMGR QRSTU 1
	TMGR V 2
	TMGR W 3 A_PlayWeaponSound("weapons/LMGReload3")
	TMGR "X" 4
	TMGR "Y" 3
	TMGR "Z" 2
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReloadX")
  TrueReloadX:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",75,"TrueReadyLoopX")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReloadX")
	Goto TrueReadyLoopX
  TrueMaxReloadX:
	TMGR A 1 A_PlayWeaponSound("weapons/LMGReload2")
 	TMGR BCD 1
	TMGR E 1 A_FireCustomMissile("LegendaryEmptyDrumSpawner", 0, 0, 0, 1)
	TMGR F 1
	TMGR GG 25
	TMGR HIJK 1 A_PlayWeaponSound("weapons/LMGReload1")
    TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReload2X")
  TrueReload2X:
	TNT1 A 0 A_TakeInventory("LegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("LLMGMagazine",1)
	TNT1 A 0 A_JumpIfInventory("LLMGMagazine",76,"TrueFullX")
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBulletMag",1,"TrueReload2X")
  TrueFullX:
	TMGR L 8	
	TMGR MN 2
	TMGR OPQRS 1
    TMGG A 2
	Goto TrueReadyLoopX
	
  Zoom:
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueZoom")
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_JumpIfInventory("LegendaryLMGBurst",1,"Zoom2")
	TNT1 A 0 A_PlaySound("enforcer/mode")
	TNT1 A 0 A_GiveInventory("LegendaryLMGBurst",1)
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"ZoomX")
	LZL2 F 2 A_Print("Burst fire",1)
	LZL2 G 2
	Goto ReadyLoop
  ZoomX:
	LLZ2 H 2 A_Print("Burst fire",1)
	LLZ2 I 2
	Goto ReadyLoopX
  Zoom2:
	TNT1 A 0 A_PlaySound("enforcer/mode")
	TNT1 A 0 A_TakeInventory("LegendaryLMGBurst",1)
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"Zoom2X")
	LZL2 F 2 A_Print("Automatic fire",1)
	LZL2 G 2
	Goto ReadyLoop
  Zoom2X:
	LLZ2 H 2 A_Print("Automatic fire",1)
	LLZ2 I 2
	Goto ReadyLoopX
	
	
  TrueZoom:
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_JumpIfInventory("HDLegLMGToken",1,"TrueZoomX")
	TNT1 A 0 A_JumpIfInventory("TrueLegLMGMode1",1,"Off")
	TNT1 A 0 A_GiveInventory("TrueLegLMGMode1",1)
	TZL2 A 1 A_Print("Mini Lasers",1)
	Goto TrueReadyLoop
  Off:
	TNT1 A 0 A_TakeInventory("TrueLegLMGMode1",1)
	TZL2 A 1 A_Print("Hitscan",1)
	Goto TrueReadyLoop
	
  TrueZoomX:
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegLMGMode1",1,"OffX")
	TNT1 A 0 A_GiveInventory("TrueLegLMGMode1",1)
	TMGG A 1 A_Print("Mini Lasers",1)
	Goto TrueReadyLoopX
  OffX:
	TNT1 A 0 A_TakeInventory("TrueLegLMGMode1",1)
	TMGG A 1 A_Print("Hitscan",1)
	Goto TrueReadyLoopX
	
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LZL1 FEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	Goto Ready+5
  GrenadeCheckX:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeTossX")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoopX
  GrenadeTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LLZ2 JKLMNOPQ 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	Goto ReadyX
	
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LZL1 FEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	Goto Ready+5
  MineCheckX:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineTossX")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoopX
  MineTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LLZ2 JKLMNOPQ 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	Goto ReadyX

  TrueGrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReadyLoop
  TrueGrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TZL1 FEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	//TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	Goto TrueReady+2

  TrueGrenadeCheckX:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeTossX")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  TrueGrenadeTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TMGR ABCDEFG 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReadyX+1
	
  TrueMineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto TrueReadyLoop
  TrueMineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TZL1 FEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	//TNT1 A 0 A_PlaySound("legendarylmg/draw",7)
	Goto TrueReady+2
	
  TrueMineCheckX:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineTossX")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto TrueReadyLoopX
  TrueMineTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TMGR ABCDEFG 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto TrueReadyX+1
	
  WeaponSkin:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("LegendaryLMGStart",1)
	LZL2 A 1 Offset(0,35)
	LZL2 A 1 Offset(0,45)
	LZL2 A 1 Offset(0,55)
	LZL2 A 1 Offset(0,65)
	LZL2 A 1 Offset(0,75)
	LZL2 A 1 Offset(0,85)
	LZL2 A 1 Offset(0,95)
	LZL2 A 1 Offset(0,108)
	LZL2 A 1 Offset(0,150)
	LZL2 A 3
	Goto Select
  WeaponSkin2:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("LegendaryLMGStart",1)
	LLZ2 A 1 Offset(0,35)
	LLZ2 A 1 Offset(0,45)
	LLZ2 A 1 Offset(0,55)
	LLZ2 A 1 Offset(0,65)
	LLZ2 A 1 Offset(0,75)
	LLZ2 A 1 Offset(0,85)
	LLZ2 A 1 Offset(0,95)
	LLZ2 A 1 Offset(0,108)
	LLZ2 A 1 Offset(0,150)
	LLZ2 A 3
	Goto Select
  TrueWeaponSkin:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	//TNT1 A 0 A_TakeInventory("LegendaryLMGStart",1)
	TZL2 A 1 Offset(0,35)
	TZL2 A 1 Offset(0,45)
	TZL2 A 1 Offset(0,55)
	TZL2 A 1 Offset(0,65)
	TZL2 A 1 Offset(0,75)
	TZL2 A 1 Offset(0,85)
	TZL2 A 1 Offset(0,95)
	TZL2 A 1 Offset(0,108)
	TZL2 A 1 Offset(0,150)
	TZL2 A 3
	Goto Select
  TrueWeaponSkin2:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	//TNT1 A 0 A_TakeInventory("LegendaryLMGStart",1)
	TMGG A 1 Offset(0,35)
	TMGG A 1 Offset(0,45)
	TMGG A 1 Offset(0,55)
	TMGG A 1 Offset(0,65)
	TMGG A 1 Offset(0,75)
	TMGG A 1 Offset(0,85)
	TMGG A 1 Offset(0,95)
	TMGG A 1 Offset(0,108)
	TMGG A 1 Offset(0,150)
	TMGG A 3
	Goto Select
	}
}

ACTOR "INFLegendaryDemonTechDevastator" : "NewLegendaryDemonTechDevastator" Replaces "NewLegendaryDemonTechDevastator"
{	
Tag "Legendary Demon Tech Devastator"
States
{
  Spawn:
    LDEV A -1
    Loop
  Ready:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
    LEVG A 0 A_PlaySound("devastator/idle",6,1.0,1)
    LEVG A 2 A_WeaponReady
    Loop
  TrueReady:
	TNT1 A 0
	TNT1 A 0 A_PlaySound("devastator/idle",6,1.0,1)
  TrueReadyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TEVG A 2 A_WeaponReady
	Loop
  Select:
    TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueSelect")
	TNT1 A 0 A_Raise
    LEVG A 1 A_Raise
    Goto Select+1
  TrueSelect:
    TNT1 A 0 A_Raise
	TEVG A 1 A_Raise
	Loop
  Deselect:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselect")
    TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
    LEVG A 0 A_StopSound(6)
	TNT1 A 0 A_Lower
    LEVG A 1 A_Lower
    Goto Deselect+6
  TrueDeselect:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 AAA 0 A_StopSound(6)
	TNT1 A 0 A_PlaySound("weapons/weapondown",CHAN_WEAPON)
  DeselectLoop:
    TNT1 A 0 A_Lower
	TEVG B 1 A_Lower
	Loop
  Fire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
    LEVG A 0 A_StopSound(6)
    LEVG B 9 A_PlayWeaponSound("devastator/charge")
    LEVG CDEF 10 Bright
    LEVG G 3 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG H 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG I 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG G 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG H 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG I 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG G 3 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG H 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG I 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG G 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG H 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG I 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
    LEVG A 0 A_Refire
    LEVG J 3 Bright A_GunFlash
    TNT1 A 0 A_Recoil(20)
    LEVG J 1 Bright A_Playsound("devastator/fire")
    LEVG K 9 Bright A_FireCustomMissile ("LegendaryDevastatorBall",0,1,0,0)
    LEVG L 7 Bright
    Goto Ready
  AltFire:
    TNT1 A 0 
	LEVG A 1 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
    Goto Ready
  Hold:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueHold")
    LEVG A 0 A_StopSound(6)
    LEVG G 1 Bright A_PlayWeaponSound("weapons/devfch")
    LEVG G 3 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
    LEVG H 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
    LEVG I 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
    LEVG G 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
    LEVG H 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
    LEVG I 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
    LEVG I 0 A_Refire
    LEVG J 4 Bright A_GunFlash
    LEVG J 1 Bright A_Playsound("devastator/fire")
    LEVG K 10 Bright A_FireCustomMissile ("LegendaryDevastatorBall",0,1,0,0)
    LEVG L 7 Bright
    Goto Ready
  TrueFire:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
	TNT1 AAA 0 A_StopSound(6)
	TEVG A 10 A_PlaySound("devastator/charge",CHAN_WEAPON)
	TEVG CDEF 10 Bright
	TEVG G 3 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG H 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG I 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG G 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG H 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG I 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG G 3 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG H 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG I 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG G 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG H 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG I 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TNT1 A 0 A_Refire
	TEVG J 4 Bright A_GunFlash
	TNT1 A 0 A_Recoil(20)
	TEVG J 1 Bright A_Playsound("devastator/fire")
	TEVG K 10 Bright A_FireCustomMissile ("PlayerTrueLegendaryDevastatorBall",0,1,0,0)
	TEVG L 7 Bright
	Goto TrueReady
  TrueHold:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Hold
	TNT1 A 0 A_StopSound(6)
	TEVG G 1 Bright A_PlayWeaponSound("weapons/devfch")
	TEVG G 3 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG H 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG I 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG G 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG H 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TEVG I 4 Bright A_FireBullets(4,4,2,6,"TrueLegDevPuff",0,64)
	TNT1 A 0 A_Refire ("TrueHold")
	TEVG J 4 Bright A_GunFlash
	TEVG J 1 Bright A_Playsound("devastator/fire")
	TEVG K 10 Bright A_FireCustomMissile ("PlayerTrueLegendaryDevastatorBall",0,1,0,0)
	TEVG L 7 Bright
	Goto TrueReady
  TrueAltFire:
	TNT1 AAA 0 A_StopSound(6)
	TNT1 A 0 A_PlaySound("Cardinal/9k",CHAN_WEAPON)
	TEVG A 2 Bright Radius_Quake(1,2,0,1,0)
	TEVG CD 2 Bright Radius_Quake(2,2,0,1,0)
	TEVG EFG 2 Bright Radius_Quake(4,2,0,1,0)
	TEVG HIG 1 Bright Radius_Quake(6,3,0,1,0)
	TNT1 A 0 Bright Radius_Quake(8,3,0,1,0)
	TEVG HIGHIGHIGHIGHIL 1 Bright
	TNT1 A 0 Bright A_GunFlash
	TNT1 A 0 Bright Radius_Quake(10,4,0,1,0)
	TEVG J 2 Bright
	TNT1 A 0 Bright A_Recoil(10)
	TNT1 A 0 Bright Radius_Quake(12,6,0,1,0)
	TEVG K 10 Bright A_FireCustomMissile ("PlayerTrueDTBFG10KBall",0,1,0,0)
	TNT1 A 0 Bright Radius_Quake(3,10,0,1,0)
	TEVG L 7 Bright
	TEVG A 20
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",50,1)
	Goto TrueReady
	TEVG A 60 A_PlaySound("weapons/dtech10kcharge",CHAN_WEAPON)
	TEVG A 10 A_PlaySound("weapons/plasmacellin",CHAN_WEAPON)
	Goto TrueReady
  Flash:
    NULL A 5 A_Light1
    NULL A 10 A_Light2
    NULL A 7 A_Light1
    NULL A 5 A_Light0
    stop
   }
}

Actor "INFLegendarySaber" : "NewLegendarySaber" Replaces LegendarySaber
{
  Tag "Legendary Saber"
  States
  {
  Ready:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,"Ready2")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"ChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	LGSB A 1 A_WeaponReady
	Loop
  TrueReady:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,"TrueReady2")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"TrueChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	TGSB A 1 A_WeaponReady
	Loop
  Ready2:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady2")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"ChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	LSB2 AAAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady2")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"ChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	LSB2 BBBB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady2")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"ChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	LSB2 CCCC 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady2")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"ChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	LSB2 DDDD 1 A_WeaponReady
	Loop
  TrueReady2:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"TrueChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	TSB2 AAAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"TrueChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	TSB2 BBBB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"TrueChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	TSB2 CCCC 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"TrueChangeMode")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	TSB2 DDDD 1 A_WeaponReady
	Loop
  Deselect:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselect")
	TNT1 A 0 A_PlaySound("weapons/weapondown",1)
	TNT1 A 0 A_Lower
	LGSB A 1 A_Lower
	Goto Deselect+2
  TrueDeselect:
	TNT1 A 0 A_PlaySound("weapons/weapondown",1)
	TNT1 A 0 A_Lower
	TGSB A 1 A_Lower
	Goto TrueDeselect+1
  Select:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueSelect")
	TNT1 A 0 A_Raise
	LGSB A 1 A_Raise
	Goto Select+1
  TrueSelect:
	TNT1 A 0 A_Raise
	TGSB A 1 A_Raise
	Loop
  Fire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",15,"Fire2")
	Goto FireNoAmmo
  Fire2:
	LSB2 EF 2
  Refire2:
	TNT1 A 0 A_PlaySound("Saber/Swing",CHAN_AUTO)
	TNT1 A 0 A_Quake(3,10,0,10,0)
	LGSB DE 1
	LSB2 GHIJ 1
	TNT1 A 0 A_CustomPunch((random(50,150)*random(1,3)),0,0,"SaberBulletPuff2",110)
	LSB2 KLMNOP 1
	TNT1 A 4
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",15,2)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Refire("Refire2")
	TNT1 A 0
	Goto Done2
  FireNoAmmo:
	LGSB BC 2
  RefireNoAmmo:
	TNT1 A 0 A_PlaySound("Saber/NoASwing",1)
	TNT1 A 0 A_Quake(3,10,0,10,0)
	LGSB DEFGHI 1
	TNT1 A 0 A_CustomPunch(random(15,30),0,0,"SaberBulletPuff",110)
	LGSB JKLM 1
	TNT1 A 6
	TNT1 A 0 A_Refire("RefireNoAmmo")
	Goto Done
  TrueFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
	TNT1 A 0 A_JumpIfInventory("TrueSaberModeToken1",1,"TrueFire2")
	TNT1 A 0 A_JumpIfInventory("TrueSaberModeToken2",1,"TrueFire3")
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,"TrueFireContinue")
	Goto TrueReady
  TrueFireContinue:
	TSB2 EF 2
  TrueRefire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Refire2
	TNT1 A 0 A_PlaySound("Saber/Swing",CHAN_AUTO)
	TNT1 A 0 A_Quake(3,10,0,10,0)
	TGSB DE 1
	TSB2 GHIJ 1
	TNT1 A 0 A_CustomPunch((random(50,150)*random(1,3)),0,0,"TrueSaberBulletPuff",110)
	TSB2 KLMNOP 1
	TNT1 A 4
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",15,2)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Refire("TrueRefire")
	TNT1 A 0
	Goto TrueDone2
  TrueFire2:
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,"TrueFire2Continue")
	Goto TrueReady
  TrueFire2Continue:
	TSB2 EF 2
  TrueRefire2:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Refire2
	TNT1 A 0 A_PlaySound("Saber/Swing",1)
	TNT1 A 0 A_PlaySound("Saber/AltSwing",7)
	TNT1 A 0 A_Quake(4,20,0,10,0)
	TGSB DDEE 1
	TSB2 GGHHIIJJ 1
	TNT1 A 0 A_TakeInventory("LDemonAmmo",20,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("TrueCrusaderRazorWind",0,0,0,0)
	TSB2 KKLLMMNNOOPP 1
	TNT1 A 5
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,2)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Refire("TrueRefire2")
	TNT1 A 0
	Goto TrueDone2
  TrueFire3:
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",50,"TrueFire3Continue")
	Goto TrueReady
  TrueFire3Continue:
	TSB2 EF 2
  TrueRefire3:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Refire2
	TNT1 A 0 A_PlaySound("Saber/Swing",1)
	TNT1 A 0 A_PlaySound("Saber/AltSwing",7)
	TNT1 A 0 A_Quake(4,20,0,10,0)
	TGSB DDEE 1
	TSB2 GGHHII 1
	TNT1 A 0 A_TakeInventory("LDemonAmmo",50,TIF_NOTAKEINFINITE)
	TSB2 JJ 1
	TNT1 A 0 A_FireCustomMissile("PlayerTrueDarkMatter2",-6,0,0,0)
	TSB2 KK 1
	TNT1 A 0 A_FireCustomMissile("PlayerTrueDarkMatter2",-3,0,0,0)
	TSB2 LL 1
	TNT1 A 0 A_FireCustomMissile("PlayerTrueDarkMatter2",0,0,0,0)
	TSB2 MMNNOOPP 1
	TNT1 A 5
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",50,2)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Refire("TrueRefire3")
	TNT1 A 0
	Goto TrueDone2
  AltFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,"AltFireContinue")
	Goto Ready
  AltFireContinue:
	LSB2 EF 2
  AltFireRefire:
	TNT1 A 0 A_PlaySound("Saber/Swing",1)
	TNT1 A 0 A_PlaySound("Saber/AltSwing",7)
	TNT1 A 0 A_Quake(4,20,0,10,0)
	LGSB DDEE 1
	LSB2 GGHHIIJJ 1
	TNT1 A 0 A_TakeInventory("LDemonAmmo",20,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("CrusaderRazorWind",0,0,0,0)
	LSB2 KKLLMMNNOOPP 1
	TNT1 A 5
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,2)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Refire("AltFireRefire")
	TNT1 A 0
	Goto Done2
  TrueAltFire:
	TNT1 A 0 A_JumpIfInventory("TrueSaberModeToken1",1,"TrueAltFire2")
	TNT1 A 0 A_JumpIfInventory("TrueSaberModeToken2",1,"TrueAltFire3")
	TNT1 A 0 A_GiveInventory("TrueSaberModeToken1")
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,"TrueAltFireContinue")
	TGSB A 1 A_Print("Razor Wind",1.5)
	TNT1 A 0 A_Refire("NoAutoAltFirePlsNoAmmo")
	Goto TrueAltFireNoAmmo
  TrueAltFireContinue:
	TSB2 A 1 A_Print("Razor Wind",1.5)
	TNT1 A 0 A_Refire("NoAutoAltFirePls")
	Goto TrueReady
  TrueAltFire2:	
	TNT1 A 0 A_TakeInventory("TrueSaberModeToken1")
	TNT1 A 0 A_GiveInventory("TrueSaberModeToken2")
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,"TrueAltFireContinue2")
	TGSB A 1 A_Print("True Dark Matter",1.5)
	TNT1 A 0 A_Refire("NoAutoAltFirePlsNoAmmo")
	Goto TrueReady
  TrueAltFireContinue2:
	TSB2 A 1 A_Print("True Dark Matter",1.5)
	TNT1 A 0 A_Refire("NoAutoAltFirePls")
	Goto TrueReady
  TrueAltFire3:	
	TNT1 A 0 A_TakeInventory("TrueSaberModeToken1")
	TNT1 A 0 A_TakeInventory("TrueSaberModeToken2")
	TNT1 A 0 A_JumpIfInventory("LDemonAmmo",20,"TrueAltFireContinue3")
	TGSB A 1 A_Print("Normal",1.5)
	TNT1 A 0 A_Refire("NoAutoAltFirePlsNoAmmo")
	Goto TrueReady
  TrueAltFireContinue3:
	TSB2 A 1 A_Print("Normal",1.5)
	TNT1 A 0 A_Refire("NoAutoAltFirePls")
	Goto TrueReady
  NoAutoAltFirePls:
	TSB2 A 1
	TSB2 A 1 A_Refire("NoAutoAltFirePls")
	Goto TrueReady
  NoAutoAltFirePlsNoAmmo:
	TGSB A 1
	TGSB A 1 A_Refire("NoAutoAltFirePlsNoAmmo")
	Goto TrueReady
  Done:
	LGSB NOPQ 2 Bright
	Goto Ready
  Done2:
	LSB2 RSTU 2 Bright
	Goto Ready
  TrueDone:
	TGSB NOPQ 2 Bright
	Goto TrueReady
  TrueDone2:
	TSB2 RSTU 2 Bright
	Goto TrueReady
  ChangeMode:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueChangemode")
	TNT1 A 0 A_JumpIfInventory("DustMana",200,"ResistanceBuff")
	TNT1 A 0 A_TakeInventory("RailgunAction")
	Goto Ready
  TrueChangemode:
	TNT1 A 0 A_JumpIfInventory("DustMana",200,"TrueResistanceBuff")
	TNT1 A 0 A_TakeInventory("RailgunAction")
	Goto TrueReady
  ResistanceBuff:
	LSB2 EF 2
	TNT1 A 0 A_PlaySound("Saber/Buff",1)
	TNT1 A 0 A_Quake(4,20,0,10,0)
	LGSB DDEE 1
	LSB2 GGHHIIJJ 1
	TNT1 A 0 A_TakeInventory("DustMana",200)
	TNT1 A 0 A_TakeInventory("RailgunAction")
	TNT1 A 0 A_SpawnItemEx("SaberPlayerResistanceBuffGiver",0,0,32,0,0,0,0,SXF_NOCHECKPOSITION)
	LSB2 KKLLMMNNOOPP 1
	TNT1 A 5
	Goto Done2
  TrueResistanceBuff:
	TSB2 EF 2
	TNT1 A 0 A_PlaySound("Saber/Buff",1)
	TNT1 A 0 A_Quake(4,20,0,10,0)
	TGSB DDEE 1
	TSB2 GGHHIIJJ 1
	TNT1 A 0 A_TakeInventory("DustMana",200)
	TNT1 A 0 A_TakeInventory("RailgunAction")
	TNT1 A 0 A_SpawnItemEx("SaberPlayerResistanceBuffGiver",0,0,32,0,0,0,0,SXF_NOCHECKPOSITION)
	TSB2 KKLLMMNNOOPP 1
	TNT1 A 5
	Goto TrueDone2
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LGSB ABC 2
	TNT1 A 3
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	LGSB CBA 2
	Goto Ready
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LGSB ABC 2
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	LGSB CBA 2
	Goto Ready
  TrueGrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReady
  TrueGrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TGSB ABC 2
	TNT1 A 3
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TGSB CBA 2
	Goto TrueReady
  TrueMineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready
  TrueMineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TGSB ABC 2
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TGSB CBA 2
	Goto Ready
  Spawn:
	HEVB A 1
	Loop
  }
}

ACTOR "INFLegendaryCoachgun" : "NewLegendaryCoachgun" Replaces "NewLegendaryCoachgun"
{
Tag "Legendary Coachgun"
States
{
  Spawn:
	LSS0 Z -1 Bright
	Loop
  Ready:
    TNT1 A 0 A_JumpIfInventory("LegSSGSwitched",1,"ReadyX")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("legcoach/foley",6)
	LCZ0 ABCDEFGHIJKL 1
	TNT1 A 0 A_PlayWeaponSound("Coachgun/Pickup")
	LCZ0 MNOPQRST 1
  ReadyLoop:
	LCZ1 A 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	Loop
  TrueReady:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
    TNT1 A 0 A_JumpIfInventory("LegSSGSwitched",1,"TrueReadyX")
	TNT1 A 0 A_PlayWeaponSound("Coachgun/Pickup")
	TXS7 ABCDEFGH 1
  TrueReadyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TXSG A 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
	Loop
  ReadyX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyX")
    TNT1 A 0 A_PlayWeaponSound("Pickups/LegSSG")
	LHRS ABCDEF 1
	LHRS GH 2
  ReadyLoopX:
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"Ready2X")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"Ready3X")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoopX")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheckX")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
    LHTE A 1 A_WeaponReady
    Goto ReadyX+12
  Ready2X:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady2X")
  	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheckX")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
    LHT2 A 1 A_WeaponReady
    Goto ReadyX+12
  Ready3X:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady3X")
  	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheckX")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
    LST2 A 1 A_WeaponReady
    Goto ReadyX+12
  TrueReadyX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
    TNT1 A 0 A_PlayWeaponSound("Pickups/LegSSG")
	TSXZ ACEGIKMO 1
  TrueReadyLoopX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"TrueReady2X")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"TrueReady3X")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheckX")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
    TSXG A 1 A_WeaponReady
    Goto ReadyX+12
  TrueReady2X:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
  	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheckX")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
    TSXG A 1 A_WeaponReady
    Goto TrueReadyX+12
  TrueReady3X:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
  	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheckX")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheckX")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
    TSXG A 1 A_WeaponReady
    Goto TrueReadyX+12
  Select:
	TNT1 A 0 A_Raise
	Wait
  Deselect:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselect")
	TNT1 A 0 A_JumpIfInventory("LegSSGSwitched",1,"DeselectX")
  DeselectLoop:
    TNT1 A 0 A_Lower
	LXSG A 1 A_Lower
	Loop
  DeselectX:
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",2,"Deselect2X")
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",1,"Deselect3X")
    TNT1 A 0 A_Lower
	LHTE A 1 A_Lower
	Loop
  Deselect2X:
    TNT1 A 0 A_Lower
	LHT2 A 1 A_Lower
	Loop
  Deselect3X:
    TNT1 A 0 A_Lower
	LST2 A 1 A_Lower
	Loop
  TrueDeselect:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("LegSSGSwitched",1,"TrueDeselectLoopX")
  TrueDeselectLoop:
    TNT1 A 0 A_Lower
	TXSG A 1 A_Lower
	Loop
  TrueDeselectLoopX:
    TNT1 A 0 A_Lower
	TSXR A 1 A_Lower
	Loop
  Zoom:
    TNT1 A 0
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueChangeWeapon")
  ChangeWeapon:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("LegSSGSwitched",1,"ChangeWeapon2")
	TNT1 A 0 A_GiveInventory("LegSSGSwitched",1)
	LXSG A 1 Offset(1,35)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	LXSG A 1 Offset(15,33)
	LXSG A 1 Offset(35,32)
	LXSH A 1 Offset(55,27)
	LXSH A 1 Offset(70,25)
	LXSH A 1 Offset(90,21)
	LXSH A 1 Offset(105,19)
	LXSH A 1 Offset(125,16)
	LXSH A 1 Offset(139,14)
	LXSH A 1 Offset(169,13)
	LXSH A 1 Offset(180,12)
	LXSH A 1 Offset(199,12)
	LXSH A 1 Offset(215,12)
	LXSH A 1 Offset(1,150)
	LXSH A 5
	Goto Select
  ChangeWeapon2:
    TNT1 A 0
	TNT1 A 0 A_TakeInventory("LegSSGSwitched",1)
	LHT2 A 1 Offset(1,35)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	LHT2 A 1 Offset(15,33)
	LHT2 A 1 Offset(35,32)
	LXSH B 1 Offset(55,27)
	LXSH B 1 Offset(70,25)
	LXSH B 1 Offset(90,21)
	LXSH B 1 Offset(105,19)
	LXSH B 1 Offset(125,16)
	LXSH B 1 Offset(139,14)
	LXSH B 1 Offset(169,13)
	LXSH B 1 Offset(180,12)
	LXSH B 1 Offset(199,12)
	LXSH B 1 Offset(215,12)
	LXSH B 1 Offset(1,150)
	LXSH B 5
	Goto Select
  TrueChangeWeapon:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("LegSSGSwitched",1,"TrueChangeWeapon2")
	TNT1 A 0 A_GiveInventory("LegSSGSwitched",1)
	TXSG A 1 Offset(1,35)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TXSG A 1 Offset(15,33)
	TXSG A 1 Offset(35,32)
	TXSH A 1 Offset(55,27)
	TXSH A 1 Offset(70,25)
	TXSH A 1 Offset(90,21)
	TXSH A 1 Offset(105,19)
	TXSH A 1 Offset(125,16)
	TXSH A 1 Offset(139,14)
	TXSH A 1 Offset(169,13)
	TXSH A 1 Offset(180,12)
	TXSH A 1 Offset(199,12)
	TXSH A 1 Offset(215,12)
	TXSH A 1 Offset(1,150)
	TXSH A 5
	Goto Select
  TrueChangeWeapon2:
    TNT1 A 0
	TNT1 A 0 A_TakeInventory("LegSSGSwitched",1)
	TSXR A 1 Offset(1,35)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TSXR A 1 Offset(15,33)
	TSXR A 1 Offset(35,32)
	TXSH B 1 Offset(55,27)
	TXSH B 1 Offset(70,25)
	TXSH B 1 Offset(90,21)
	TXSH B 1 Offset(105,19)
	TXSH B 1 Offset(125,16)
	TXSH B 1 Offset(139,14)
	TXSH B 1 Offset(169,13)
	TXSH B 1 Offset(180,12)
	TXSH B 1 Offset(199,12)
	TXSH B 1 Offset(215,12)
	TXSH B 1 Offset(1,150)
	TXSH B 5
	Goto Select
  Fire:
    TNT1 A 0 A_JumpIfInventory("LegSSGSwitched",1,"FireX")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"FireBoth")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,"Reload")
	Goto Empty
  FireBoth:
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("Coachgun/Fire1",1)
	TNT1 A 0 Radius_Quake(6,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",2)
	TNT1 AAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(8,-8))
	TNT1 A 0 A_FireBullets(10,5,24,random(20,28),"LegendaryASGBulletPuff")
	TNT1 A 0 A_Light2
	LCZ1 BC 1 Bright Radius_Quake(6,5,0,1,0)
	LCZ1 D 1 Bright
	LCZ1 E 1
	TNT1 A 0 A_Light0
	LCZ1 FG 1
	LCZ1 HI 2
	TNT1 A 0 A_Light0
	LCZ1 A 3
  SSGReloadCheck:
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto ReadyLoop
	TNT1 A 0
	Goto ReloadBoth
  TrueFire:
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"TrueFireBoth")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,"TrueReload")
	Goto TrueEmpty
  TrueFireBoth:
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("Coachgun/Fire1",1)
	TNT1 A 0 Radius_Quake(6,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",2)
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",Random(-8,8),0,0,0,0,frandom(-4,4))
	TNT1 A 0 A_FireBullets(10,5,24,random(10,15),"TrueLegendaryASGBulletPuff")
	TNT1 A 0 A_Light2
	TXSF AB 1 Bright Radius_Quake(6,5,0,1,0)
	TXSF CD 1
	TNT1 A 0 A_Light0
	TXSF EEFFGG 1
	TNT1 A 0 A_Light0
	TXSG AAA 1
  TrueSSGReloadCheck:
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,2)
	TXSG A 2
	Goto TrueReadyLoop
	TNT1 A 0
	Goto TrueReloadBoth
  FireX:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFireX")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"FireBothX")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,"ReloadX")
	Goto EmptyX
  FireBothX:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("Weapons/LegSGboth1")
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",2)
	TNT1 AAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(8,-8))
    LH2F A 2 Bright A_FireBullets(11.2,7.1,20,20,"LegendarySSGBulletPuff")
    LH2F B 2 Bright A_Light2
	LH2E A 1 A_Light0
    LHT2 B 1
	LHT2 CDEF 1
    LHT2 EDCB 2
  SSGReloadCheckX:
  	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,2)
	LH2E A 2
	Goto Ready3X
	TNT1 A 0
	Goto ReloadBothX+4
  TrueFireX:
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"TrueFireBothX")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,"TrueReloadX")
	Goto TrueEmptyX
  TrueFireBothX: //Rip Harpoons
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("Weapons/LegSGboth")
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",2)
	//TNT1 AAAAAAAA 0 Bright A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(8,-8))
	//TSXF AAAAAAAAAAAAAAAA 0 Bright A_FireCustomMissile("50-75Bullet", frandom(-6.2,6.2),false,0,8,false,frandom(-3.1,3.1))
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",Random(-8,8),0,0,0,0,frandom(-4,4))
	TNT1 A 0 A_FireBullets(10,5,24,random(10,15),"TrueLegendaryASGBulletPuff")
    TSXF BCD 1 A_Recoil(8)
	TSXF FG 1 Bright A_Light2
	TSXF GH 1 Radius_Quake(10,5,0,1,0)
	TSXF IJ 1
	TSXF K 1 A_Light0
    TSXR A 1
  TrueSSGReloadCheckX:
  	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,2)
	TSXR A 2
	Goto TrueReady3X
	TNT1 A 0
	Goto TrueReloadBothX+4
  AltFire:
    TNT1 A 0 A_JumpIfInventory("LegSSGSwitched",1,"AltFireX")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"FireRight")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,1)
	Goto Reload
	TNT1 A 0 A_PlaySound("Coachgun/Fire2",1)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",1)
	TNT1 AAAA 0 A_FireCustomMissile("BlueSGTracer",Random(6,-6),0,0,Random(6,-6))
	LCZ3 H 1 Bright A_FireBullets(4,2,10,Random(20,28),"LegendaryASGBulletPuff")
	LCZ3 I 1 Bright A_Light2
	TNT1 A 0 A_Light0
	LCZ3 CDEFG 1
	Goto ReadyLoop
  FireRight:
	TNT1 A 0 A_PlaySound("Coachgun/Fire2",6)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",1)
	TNT1 AAAA 0 A_FireCustomMissile("BlueSGTracer",Random(6,-6),0,0,Random(6,-6))
	LCZ3 A 1 Bright A_FireBullets(4,2,10,Random(20,28),"LegendaryASGBulletPuff")
	LCZ3 B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	LCZ3 CDEFG 1
	Goto ReadyLoop
  TrueAltFire:
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"TrueFireRight")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,1)
	Goto TrueReload
	TNT1 A 0 A_PlaySound("Coachgun/Fire2",1)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",1)
	TNT1 AAAAAA 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",Random(-4,4),0,0,0,0,frandom(-3,3))
	TXS9 G 1 Bright A_FireBullets(4,2,10,Random(10,15),"TrueLegendaryASGBulletPuff")
	TXS9 H 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TXS9 IDEF 1
	TXSG A 2
	Goto TrueReadyLoop
  TrueFireRight:
	TNT1 A 0 A_PlaySound("Coachgun/Fire2",6)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 Radius_Quake(4,4,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",1)
	TNT1 AAAAAA 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",Random(-4,4),0,0,0,0,frandom(-3,3))
	TXS9 A 1 Bright A_FireBullets(4,2,10,Random(10,15),"TrueLegendaryASGBulletPuff")
	TXS9 B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TXS9 CDEF 1
	TXSG A 2
	Goto TrueReadyLoop
  AltFireX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFireX")
    TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"FireRightX")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,1)
	Goto ReloadX
    TNT1 A 0 A_PlaySound("Weapons/LegSGsingle")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",1)
	TNT1 AAAA 0 A_FireCustomMissile("BlueSGTracer",Random(6,-6),0,0,Random(6,-6))
    L2SF C 2 Bright A_FireBullets(6.2,3.4,7,Random(20,28),"LegendarySSGBulletPuff")
	L2SF D 2 Bright A_Light2
	TNT1 A 0 A_Light0
	LH2R EFGH 1
	LHTE A 2
    Goto Ready3X
  FireRightX:
    TNT1 A 0 A_PlaySound("Weapons/LegSGsingle")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",1)
	TNT1 AAAA 0 A_FireCustomMissile("BlueSGTracer",Random(6,-6),0,0,Random(6,-6))
    L2SF A 2 Bright A_FireBullets(6.2,3.4,7,Random(20,28),"LegendarySSGBulletPuff")
	L2SF B 2 Bright A_Light2
	TNT1 A 0 A_Light0
	LH2R ABCD 1
	LST2 A 2
    Goto Ready3X
  TrueAltFireX:
    TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",2,"TrueFireRightX")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,1)
	Goto TrueReloadX
    TNT1 A 0 A_PlaySound("Weapons/LegSGsingle")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",1)
	TNT1 AAAAAA 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",Random(-4,4),0,0,0,0,frandom(-3,3))
	TSXS AAAAAAAA 0 Bright A_FireCustomMissile("True50-75Bullet", frandom(-2.2, 2.2), false, 0, 8, false, frandom(-1.3, 1.3))
	TSXS A 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 A_Recoil(4)
	TSXS BC 1
	TSXS DEF 1
    Goto TrueReady3X
  TrueFireRightX:
    TNT1 A 0 A_PlaySound("Weapons/LegSGsingle",6)
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryCoachShells",1)
	TNT1 AAAAAA 0 A_FireCustomMissile("PlayerTrueLegendaryExplosiveTracer",Random(-4,4),0,0,0,0,frandom(-3,3))
    //L2SF A 1 Bright A_FireBullets(2.2,1.3,9,Random(24,28),"LegendaryASGBulletPuff")
	TSXS GGGGGGGG 0 Bright A_FireCustomMissile("True50-75Bullet", frandom(-2.2, 2.2), false, 0, 8, false, frandom(-1.3, 1.3))
	TSXS G 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 A_Recoil(4)
	TSXS HI 1
	TSXS DEF 1
    Goto TrueReady3X
  Empty:
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"Empty2")
	LXSG A 10 A_PlaySound("weapons/click")
	Goto ReadyLoop
  Empty2:
	LXSG A 10 A_PlaySound("weapons/click")
	Goto ReadyLoop
  EmptyX:
    TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"Empty2X")
    LHTE A 10 A_PlaySound("weapons/click")
	Goto Ready3X
  Empty2X:
    LST2 A 10 A_PlaySound("weapons/click")
	Goto Ready3X
  TrueEmpty:
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"TrueEmpty2")
	TXSG A 10 A_PlaySound("weapons/click")
	Goto TrueReadyLoop
  TrueEmpty2:
	TXSG A 10 A_PlaySound("weapons/click")
	Goto TrueReadyLoop
  TrueEmptyX:
    TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"TrueEmpty2X")
	TSXF JI 2
	TSXF K 2 A_PlaySound("weapons/click")
	TSXF IJ 2
	Goto TrueReady3X
  TrueEmpty2X:
	TSXF JI 2
	TSXF K 2 A_PlaySound("weapons/click")
	TSXF IJ 2
	Goto TrueReady3X
  Reload:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReload")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"ReloadRight")	
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,"ReloadBoth")
	Goto Empty
  ReloadBoth:
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto ReadyLoop
	LCZ1 A 1
	LCZ1 JKLMNOP 1
	LCZ1 Q 1 A_PlaySound("Coachgun/Open",7)
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	LCZ1 RST 2
	LCZ1 UVWXYZ 1
	LCZ2 A 1
	LCZ2 BCDE 2
	TNT1 A 0 A_PlaySound("Coachgun/Load",7)
	TNT1 A 0 A_TakeInventory("LegendaryShell",2,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("LegendaryCoachShells",2)
	LCZ2 FG 2
	LCZ2 HIJKLMN 1
	LCZ2 O 1 A_PlaySound("Coachgun/Close",7)
	LCZ2 PQRSTUVW 1
	LCZ0 NOPQRST 1
	Goto ReadyLoop
  ReloadRight:
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,1)
	Goto ReadyLoop
	LCZ1 JKLMNO 1
	LCZ3 J 1
	LCZ3 K 1 A_PlaySound("Coachgun/Open",7)
	TNT1 A 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	LCZ3 LMN 1
	LCZ3 OPQRST 1
	LCZ3 U 1
	LCZ3 VW 2
	LCZ2 DE 2
	TNT1 A 0 A_PlaySound("Coachgun/Load",7)
	TNT1 A 0 A_TakeInventory("LegendaryShell",1,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("LegendaryCoachShells",1)
	LCZ2 FG 1
	LCZ2 HIJKLMN 1
	LCZ2 O 1 A_PlaySound("Coachgun/Close",7)
	LCZ2 PQRSTUVW 1
	LCZ0 NOPQRST 1
	Goto ReadyLoop
  ReloadX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReloadX")
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"ReloadRightX")	
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,"ReloadBothX")
	Goto EmptyX
  ReloadBothX:
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto Ready3X
	LHT2 RQ 2
	LH2E B 2
	LHT2 GH 2
	LH2E F 1 A_PlayWeaponSound("Weapons/LegSGopen")
	LHT2 I 1
	LH2E G 1
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	LH2E D 4
    LHT2 J 2 
	LH2E EH 2
	LHT2 K 3
    LHT2 L 3 A_PlayWeaponSound("weapons/shellslide")
	TNT1 A 0 A_TakeInventory("LegendaryShell",2,TIF_NOTAKEINFINITE)
	LHT2 M 2 A_GiveInventory("LegendaryCoachShells",2)
	LHT2 N 2
	LHT2 OP 1 
	LH2E I 1 A_PlayWeaponSound("Weapons/LegSGclose")
	LH2E C 1
	LH2E B 2
	LHT2 QR 2	
	Goto Ready3X
  ReloadRightX:
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,1)
	Goto Ready3X
	LHT2 RQ 2
	LH2E B 2
	LH2E C 1
	LH2E I 1 A_PlayWeaponSound("Weapons/LegSGopen")
 	LHT2 PO 1
	L2SR AB 1
	TNT1 A 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	L2SR C 4
	L2SR DEFG 2
    LHT2 L 2 A_PlayWeaponSound("weapons/shellslide")
	TNT1 A 0 A_TakeInventory("LegendaryShell",1, TIF_NOTAKEINFINITE)
	LHT2 M 2 A_GiveInventory("LegendaryCoachShells",1)
	LHT2 N 2
	LHT2 OP 1 
	LH2E I 1 A_PlayWeaponSound("Weapons/LegSGclose")
	LH2E C 1
	LH2E B 2
	LHT2 QR 2
	Goto Ready3X
  TrueReload:
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"TrueReloadRight")	
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,"TrueReloadBoth")
	Goto TrueEmpty
  TrueReloadBoth:
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto TrueReadyLoop
	TXSG A 1
	TXSR BCDEFGHIJKLMNOP 1
	TXSR P 2 A_PlaySound("Coachgun/Open",7)
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TXS2 ABCDEFGHIJ 1
	TNT1 A 0 A_PlaySound("Coachgun/Load",7)
	TNT1 A 0 A_TakeInventory("LegendaryShell",2,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("LegendaryCoachShells",2)
	TXS2 KLMNO 1
	TXS3 ABCDEFGH 1
	TXS3 I 2 A_PlaySound("Coachgun/Close",7)
	TXS3 IJK 1
	Goto TrueReadyLoop
  TrueReloadRight:
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,1)
	Goto TrueReadyLoop
	TXSR BCDEFGNOP 1
	TXS3 P 1 A_PlaySound("Coachgun/Open",7)
	TNT1 A 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TXS3 PQR 1
	TXSG UVWX 1
	TNT1 A 0 A_PlaySound("Coachgun/Load",7)
	TNT1 A 0 A_TakeInventory("LegendaryShell",1,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("LegendaryCoachShells",1)
	TXS2 KLMNO 1
	TXS3 ABCDEFGH 1
	TXS3 I 2 A_PlaySound("Coachgun/Close",7)
	TXS3 IJK 1
	Goto TrueReadyLoop
  TrueReloadX:
	TNT1 A 0 A_JumpIfInventory("LegendaryCoachShells",1,"TrueReloadRightX")	
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,"TrueReloadBothX")
	Goto TrueEmptyX
  TrueReloadBothX:
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto TrueReady3X
	TSXR ACEGI 1
	TSXR IGECA 1
	TSXR J 1 A_PlayWeaponSound("Weapons/LegSGopen")
	TSXR K 1
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TSXD A 5
    TSXD B 2
	TSXD CD 2
	TSXD EFG 1
    TSXD H 1 A_PlayWeaponSound("Weapons/LegSGin")
	TSXD ILNP 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryCoachShells",2)	
	TSXD Q 1 A_PlayWeaponSound("Weapons/LegSGclose")
	TSXD RST 1
	Goto TrueReady3X
  TrueReloadRightX:
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,1)
	Goto TrueReady3X
	TSXR ACEGI 1
	TSXR IGECA 1
	TSXR J 1 A_PlayWeaponSound("Weapons/LegSGopen")
	TSXR K 1
 	TSXI A 5
	TSXI BCD 2
	TSXI E 2
	TNT1 A 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TSXI FH 1
	TSXI J 1 A_PlayWeaponSound("Weapons/LegSGin")
	TSXI KM 1
	TSXD NP 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",1)
	TNT1 A 0 A_GiveInventory("LegendaryCoachShells",1)
	TSXD Q 2 A_PlayWeaponSound("Weapons/LegSGclose")
	TSXD RST 1
	Goto TrueReady3X
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LCZ1 JKLMN 1
	LCZ3 XYZ 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready
  TrueGrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReadyLoop
  TrueGrenadeToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TXS8 FEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TXS8 ABCDEF 1
	Goto TrueReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LCZ1 JKLMN 1
	LCZ3 XYZ 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready
  TrueMineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  TrueMineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TXS8 FEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TXS8 ABCDEF 1
	Goto TrueReadyLoop
  GrenadeCheckX:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeTossX")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready3X
  GrenadeTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	L2GN FEDCBA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	L2GN ABCDEF 1
	Goto Ready3X
  MineCheckX:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineTossX")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+17
  MineTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	L2GN FEDCBA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	L2GN ABCDEF 1
	Goto Ready3X
  TrueGrenadeCheckX:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeTossX")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReady3X
  TrueGrenadeTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TSXZ OMKIGECA 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TSXZ ACEGIKMO 1
	Goto TrueReady3X
  TrueMineCheckX:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineTossX")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto TrueReady+17
  TrueMineTossX:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TSXZ OMKIGECA 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TSXZ ACEGIKMO 1
	Goto TrueReady3X
	}
}

ACTOR INFLegendaryQuadShotgun : LegendaryQuadShotgun Replaces LegendaryQuadShotgun 
{
  Inventory.PickupMessage "Legendary Quad Barrel Shotgun. The great OOFinator."
  Obituary "%o was a victim to %k's deathmatch addiction."
  States
  {
  Ready:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	LQ78 HG 1
 	LQ78 FE 1
 	LQ78 D 2
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Up")
 	LQ78 C 1
 	LQ78 BA 1
    LQ77 H 1
    LQ77 A 2
  ReadyLoop:
  	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    LQ77 A 1 A_WeaponReady
    Loop
  TrueReady:
	TQ78 HG 1
 	TQ78 FE 1
 	TQ78 D 2
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Up")
 	TQ78 C 1
 	TQ78 BA 1
    TQ77 H 1
    TQ77 A 2
  TrueReadyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Select
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"TrueGrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"TrueMineCheck")
    TQ77 A 1 A_WeaponReady
    Loop
  Deselect:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselectLoop")
  DeselectLoop:
    TNT1 A 0 A_Lower
    LQ77 A 1 A_Lower
    Loop
  TrueDeselectLoop:
    TNT1 A 0 A_Lower
    TQ77 A 1 A_Lower
    Loop
  Select:
    TNT1 A 0 A_Raise
    Wait
  Fire:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
	TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",4,"QuadFire")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,"Reload")
	Goto Empty
  QuadFire:
 	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"QuadFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"QuadFireNoSpeed")
    TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"QuadFireNoSpeed")
	TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/QuadFire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(12)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(20,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",4)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    LQ77 B 2 Bright A_FireBullets(11.8,7.3,48,Random(30,35),"LegendaryASGBulletPuff")
    LQ77 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(20,5,0,1,0)
	LQ77 D 2
	LQ77 E 2
	LQ77 F 1
	LQ77 G 1
    LQ77 A 4
	Goto QuadReloadCheck
  TrueFire:
	TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",4,"TrueQuadFire")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,"TrueReload")
	Goto TrueEmpty
  TrueQuadFire:
 	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"TrueQuadFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"TrueQuadFireNoSpeed")
    TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"TrueQuadFireNoSpeed")
	TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/QuadFire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(12)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(20,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",4)	
/*
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 2 Bright A_FireBullets(11.8,7.3,48,Random(10,15),"TrueLegendaryASGBulletPuff")
*/
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",random(8,-8),0,0,0,0,random(8,-8))
	TNT1 AAAAAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAAAAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile2",random(-4,4),0,0,0,0,random(-4,4))
	TQ77 B 2 Bright A_FireBullets(11.8,7.3,48,random(10,16),"TrueLegendaryASGBulletPuff")
    TQ77 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(20,5,0,1,0)
	TQ77 D 2
	TQ77 E 2
	TQ77 F 1
	TQ77 G 1
    TQ77 A 4
	Goto TrueQuadReloadCheck
  TrueQuadFireNoSpeed:
	TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/QuadFire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(12)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(20,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",4)	
/*
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 2 Bright A_FireBullets(11.8,7.3,48,Random(10,15),"TrueLegendaryASGBulletPuff")
*/
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",random(8,-8),0,0,0,0,random(8,-8))
	TNT1 AAAAAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAAAAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile2",random(-4,4),0,0,0,0,random(-4,4))
	TQ77 B 2 Bright A_FireBullets(11.8,7.3,48,random(10,16),"TrueLegendaryASGBulletPuff")
    TQ77 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(20,5,0,1,0)
	TQ77 D 4
	TQ77 E 4
	TQ77 F 2
	TQ77 G 2
    TQ77 A 8
	Goto TrueQuadReloadCheck
  QuadReloadCheck:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueQuadReloadCheck")
  	TNT1 A 0 A_JumpIfInventory("LegendaryShell",4,2)
	Goto ReadyLoop
	TNT1 A 0
	Goto ReloadFourShells
  TrueQuadReloadCheck:
  	TNT1 A 0 A_JumpIfInventory("LegendaryShell",4,2)
	Goto TrueReadyLoop
	TNT1 A 0
	Goto TrueReloadFourShells
  AltFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"AltFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"AltFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"AltFireNoSpeed")
    TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",4,"FireLeft")
	TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",2,1)
	Goto Reload
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",2)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    LQ77 B 2 Bright A_FireBullets(11.8,7.3,24,Random(30,35),"LegendaryASGBulletPuff")
    LQ77 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	LQ77 D 2
	LQ77 E 2
	LQ77 F 1
	LQ77 G 1
    LQ77 A 6
    Goto ReadyLoop
  AltFireNoSpeed:
    TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",4,"FireLeft")
	TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",2,1)
	Goto Reload
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",2)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    LQ77 B 4 Bright A_FireBullets(11.8,7.3,24,Random(30,35),"LegendaryASGBulletPuff")
    LQ77 C 4 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	LQ77 D 4
	LQ77 E 4
	LQ77 F 2
	LQ77 G 2
    LQ77 A 12
    Goto ReadyLoop
  FireLeft:
	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"FireLeftNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"FireLeftNoSpeed")
	TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"FireLeftNoSpeed")
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",2)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    LQ77 B 2 Bright A_FireBullets(11.8,7.3,24,Random(30,35),"LegendaryASGBulletPuff")
    LQ77 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	LQ77 D 2
	LQ77 E 2
	LQ77 F 1
	LQ77 G 1
    LQ77 A 4
    Goto ReadyLoop
  FireLeftNoSpeed:
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",2)	
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    LQ77 B 4 Bright A_FireBullets(11.8,7.3,24,Random(30,35),"LegendaryASGBulletPuff")
    LQ77 C 4 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	LQ77 D 4
	LQ77 E 4
	LQ77 F 2
	LQ77 G 2
    LQ77 A 8
    Goto ReadyLoop
  TrueAltFire:
	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"TrueAltFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"TrueAltFireNoSpeed")
	TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"TrueAltFireNoSpeed")
    TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",4,"TrueFireLeft")
	TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",2,1)
	Goto TrueReload
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",2)
/*
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 2 Bright A_FireBullets(11.8,7.3,24,Random(10,15),"TrueLegendaryASGBulletPuff")
*/
	TNT1 AAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile2",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 2 Bright A_FireBullets(11.8,7.3,24,Random(10,15),"TrueLegendaryASGBulletPuff")
    TQ77 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TQ77 D 2
	TQ77 E 2
	TQ77 F 1
	TQ77 G 1
    TQ77 A 6
    Goto TrueReadyLoop
  TrueAltFireNoSpeed:
    TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",4,"TrueFireLeft")
	TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",2,1)
	Goto TrueReload
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",2)
/*
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 2 Bright A_FireBullets(11.8,7.3,24,Random(10,15),"TrueLegendaryASGBulletPuff")
*/
	TNT1 AAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile2",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 4 Bright A_FireBullets(11.8,7.3,24,Random(10,15),"TrueLegendaryASGBulletPuff")
    TQ77 C 4 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TQ77 D 4
	TQ77 E 4
	TQ77 F 2
	TQ77 G 2
    TQ77 A 12
    Goto TrueReadyLoop
  TrueFireLeft:
	TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"TrueFireLeftNoSpeed")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"TrueFireLeftNoSpeed")
	TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"TrueFireLeftNoSpeed")
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",2)	
/*
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 2 Bright A_FireBullets(11.8,7.3,24,Random(10,15),"TrueLegendaryASGBulletPuff")
*/
	TNT1 AAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile2",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 2 Bright A_FireBullets(11.8,7.3,24,Random(10,15),"TrueLegendaryASGBulletPuff")
    TQ77 C 2 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TQ77 D 2
	TQ77 E 2
	TQ77 F 1
	TQ77 G 1
    TQ77 A 4
    Goto TrueReadyLoop
  TrueFireLeftNoSpeed:
    TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire")	
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_Recoil(8)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryQuadShell",2)
/*
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 2 Bright A_FireBullets(11.8,7.3,24,Random(10,15),"TrueLegendaryASGBulletPuff")
*/
	TNT1 AAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAA 0 A_FireCustomMissile("TLegQuadShotgunProjectile2",random(-4,4),0,0,0,0,random(-4,4))
	TNT1 AAAAAAAAAAAA 0 A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(10,-10))
    TQ77 B 4 Bright A_FireBullets(11.8,7.3,24,Random(10,15),"TrueLegendaryASGBulletPuff")
    TQ77 C 4 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TQ77 D 4
	TQ77 E 4
	TQ77 F 2
	TQ77 G 2
    TQ77 A 8
    Goto TrueReadyLoop
  Empty:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("truelegendarybfgupgrade",1,"TrueEmpty")
    LQ77 A 10 A_PlayWeaponSound("weapons/click")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",4,"ReloadFourShells")
	Goto ReadyLoop
  Reload:
	TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",2,"ReloadTwoShells")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",4,"ReloadFourShells")
	Goto Empty
  TrueEmpty:
    TQ77 A 10 A_PlayWeaponSound("weapons/click")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",4,"TrueReloadFourShells")
	Goto TrueReadyLoop
  TrueReload:
	TNT1 A 0 A_JumpIfInventory("LegendaryQuadShell",2,"TrueReloadTwoShells")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",4,"TrueReloadFourShells")
	Goto TrueEmpty
  ReloadFourShells:
	//TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"ReloadFourShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"ReloadFourShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"ReloadFourShellsNoSpeed")
	LQ77 H 2
 	LQ78 A 1
 	LQ78 B 1
 	LQ78 C 2
 	LQ78 D 6
 	LQ78 E 2
 	LQ78 F 1
 	LQ78 G 1
 	LQ78 H 1
 	TNT1 A 2
	TNT1 AAAA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	LQ79 ABCD 1
	LQ79 D 6
	LQ80 ABCD 2
	LQ80 EFGH 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")
	LQ81 A 6
	LQ81 ABCD 2
	LQ81 EFGHI 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 12
	LQ78 HG 1
 	LQ78 FE 1
 	LQ78 D 2
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	LQ78 C 1
 	LQ78 BA 1
    LQ77 H 2
    LQ77 A 2
    Goto ReadyLoop
  ReloadTwoShells:
	//TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"ReloadTwoShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"ReloadTwoShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"ReloadTwoShellsNoSpeed")
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto ReadyLoop
	LQ77 H 2
 	LQ78 A 1
 	LQ78 B 1
 	LQ78 C 2
 	LQ78 D 6
 	LQ78 E 2
 	LQ78 F 1
 	LQ78 G 1
 	LQ78 H 1
 	TNT1 A 2
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	LQ81 ABCD 2
	LQ81 EFGHI 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 8
	LQ78 HG 1
 	LQ78 FE 1
 	LQ78 D 1
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	LQ78 C 1
 	LQ78 BA 1
    LQ77 H 1
    LQ77 A 2
	Goto ReadyLoop
  TrueReloadFourShells:
	TQ77 H 2
 	TQ78 A 1
 	TQ78 B 1
 	TQ78 C 2
 	TQ78 D 6
 	TQ78 E 2
 	TQ78 F 1
 	TQ78 G 1
 	TQ78 H 1
 	TNT1 A 2
	TNT1 AAAA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	TQ79 ABCD 1
	TQ79 D 6
	TQ80 ABCD 2
	TQ80 EFGH 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")
	TQ81 A 6
	TQ81 ABCD 2
	TQ81 EFGHI 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 12
	TQ78 HG 1
 	TQ78 FE 1
 	TQ78 D 2
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	TQ78 C 1
 	TQ78 BA 1
    TQ77 H 2
    TQ77 A 2
    Goto TrueReadyLoop
  TrueReloadTwoShells:
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto TrueReadyLoop
	TQ77 H 2
 	TQ78 A 1
 	TQ78 B 1
 	TQ78 C 2
 	TQ78 D 6
 	TQ78 E 2
 	TQ78 F 1
 	TQ78 G 1
 	TQ78 H 1
 	TNT1 A 2
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	TQ81 ABCD 2
	TQ81 EFGHI 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 8
	TQ78 HG 1
 	TQ78 FE 1
 	TQ78 D 1
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	TQ78 C 1
 	TQ78 BA 1
    TQ77 H 1
    TQ77 A 2
	Goto ReadyLoop
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
 	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LQ78 ABCDEFGH 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LQ78 ABCDEFGH 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready
  TrueGrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"TrueGrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReadyLoop
  TrueGrenadeToss:
 	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TQ78 ABCDEFGH 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto TrueReady
  TrueMineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"TrueMineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto TrueReadyLoop
  TrueMineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	TQ78 ABCDEFGH 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto TrueReady
  Spawn:
    QS2S Z -1
    Stop
    }
}

Actor TLegQuadShotgunProjectile
{
  Radius 4
  Height 4
  Speed 150
  Damage 16
  Scale 1.0
  Projectile
  RenderStyle Add
  +SPAWNSOUNDSOURCE
  +NOTIMEFREEZE
  +MTHRUSPECIES
  +FORCERADIUSDMG
  +NODAMAGETHRUST
  Alpha 0.8
  SeeSound "lrball1/shot"
  DeathSound "lrball1/exp"
  Decal CacoScorch
  DamageType "TrueLegendaryPlayer"
  States
  {
  Spawn:
	LRB1 ABCD 1 A_CustomMissile("LegRevBallFX",0,0,0,0)
	Loop
  Death:
	LRB1 ABCD 2 A_SpawnItemEx("LegendaryBlueParticleSpawner",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(48,64,0) 
	TNT1 A 0 A_PlaySound("weapons/clrocketexplode")
	TNT1 A 0 A_SpawnItemEx("LegendaryBlueParticleSpawner",0,0,0,0,0,0,0,128) 
	TNT1 A 0 A_CustomMissile("LegendaryKaboom6",0,0,random(0,360),2,random(0,360)) //TNT1 AAA 0 
	TNT1 A 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),2,random(0,360))	//TNT1 AAA 0 
	LRB1 EFGHIJKLMNO 3
	Stop
	}
}

Actor TLegQuadShotgunProjectile2 : TLegQuadShotgunProjectile
{
  Radius 8
  Height 8
  Scale 1.5
  States
  {
  Spawn:
	LRB1 ABCD 1 A_CustomMissile("LegRevBallFX",0,0,0,0)
	Loop
  Death:
	LRB1 ABCD 2 A_SpawnItemEx("LegendaryBlueParticleSpawner",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(128,64,0) 
	TNT1 A 0 A_PlaySound("weapons/clrocketexplode")
	TNT1 A 0 A_SpawnItemEx("LegendaryBlueParticleSpawner",0,0,0,0,0,0,0,128) 
	TNT1 A 0 A_CustomMissile("LegendaryKaboom6",0,0,random(0,360),2,random(0,360)) //TNT1 AAA 0 
	TNT1 A 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),2,random(0,360))	//TNT1 AAA 0 
	LRB1 EFGHIJKLMNO 3
	Stop
	}
}

Actor HDLeg10KToken : Inventory {inventory.maxamount 1}

Actor "INFLegendaryBFG10K" : "NewLegendaryBFG10K" Replaces LegendaryBFG10k
{
  Tag "Legendary BFG 10,000"
  States
  {
  Spawn:
	LB10 A -1
	Loop
  Select:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"SelectX")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueSelectLoop")
  SelectLoop:
	TNT1 A 0 A_Raise
	20LH A 1 A_Raise
	Loop
  TrueSelectLoop:
	TNT1 A 0 A_Raise
	20TH A 1 A_Raise
	Loop
  SelectX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueSelectLoopX")
  SelectLoopX:
	TNT1 A 0 A_Raise
	LG10 A 1 A_Raise
	Loop
  TrueSelectLoopX:
	TNT1 A 0 A_Raise
	TG10 A 1 A_Raise
	Loop
  Deselect:
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_StopSound(5)
	TNT1 AAA 0 A_StopSound(7)
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"DeselectX")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselectLoop")
  DeselectLoop:
	TNT1 A 0 A_Lower
	20LH A 1 A_Lower
	Loop
  TrueDeselectLoop:
	TNT1 A 0 A_Lower
	20TH A 1 A_Lower
	Loop
  DeselectX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselectLoopX")
  DeselectLoopX:
	TNT1 A 0 A_Lower
	LG10 A 1 A_Lower
	Loop
  TrueDeselectLoopX:
	TNT1 A 0 A_Lower
	TG10 A 1 A_Lower
	Loop
  Ready:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"ReadyX")
  ReadyLoop:
    TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20LH BBB 1 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20LH CCC 1 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20LH DDD 1 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20LH EEE 1 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20LH FFF 1 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20LH EEE 1 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20LH DDD 1 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20LH CCC 1 A_WeaponReady
	Loop
  TrueReady:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20TH BBB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20TH CCC 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20TH DDD 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20TH EEE 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20TH FFF 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20TH EEE 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20TH DDD 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"WeaponSkin")
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	20TH CCC 1 A_WeaponReady
	Loop
  ReadyX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyX")
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,1)
	Goto WeaponSkin2
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	LG10 A 1 A_WeaponReady
	Loop
  TrueReadyX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto ReadyX
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,1)
	Goto WeaponSkin2
	TNT1 A 0 A_PlaySound("Leg10K/Idle",7,1.0,1)
	TG10 A 1 A_WeaponReady
	Loop
  Leg10kDone:
	TNT1 A 0 A_PlaySound("Leg10K/PCool",5) 
	20LH QRSTUVWXYZ 3
	21LH AB 3
	Goto Ready
  Leg10kDoneX:
	TNT1 A 0 A_PlaySound("Leg10K/PCool",5) 
	LG12 ABCDEFGHIJKL 3
	Goto Ready
  TrueLeg10kDone:
	TNT1 A 0 A_PlaySound("Leg10K/PCool",5) 
	20TH QRSTUVWXYZ 3
	21TH AB 3
	Goto TrueReady
  TrueLeg10kDoneX:
	TNT1 A 0 A_PlaySound("Leg10K/PCool",5) 
	TG12 ABCDEFGHIJKL 3
	Goto TrueReadyX
  Fire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"FireX")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
	TNT1 A 0 A_PlaySound("Leg10K/PCharge",1,5)
	TNT1 A 0 Radius_Quake(3,30,0,1,0)
	20LH BCDEFGHI 3 Bright
	20LH JKL 2 Bright
  FireLoop:
	20LH MN 1 Bright
	TNT1 A 0 A_PlaySound("Leg10K/PFire",1)
	TNT1 A 0 A_FireCustomMissile("LegPlayer10KProjectile",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	20LH OP 1 Bright
	TNT1 A 0 A_JumpIfNoAmmo("Leg10kDone")
	TNT1 A 0 A_Refire("FireLoop")
	Goto Leg10kDone
  TrueFire:
	TNT1 A 0 A_PlaySound("Leg10K/PCharge",1,5)
	TNT1 A 0 Radius_Quake(3,30,0,1,0)
	20TH BCDEFGHI 3 Bright
	20TH JKL 2 Bright
  TrueFireLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto FireLoop
	20TH MN 1 Bright
	TNT1 A 0 A_PlaySound("Leg10K/PFire",1)
	TNT1 A 0 A_FireCustomMissile("TrueLegPlayer10KProjectile",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	20TH OP 1 Bright
	TNT1 A 0 A_JumpIfNoAmmo("TrueLeg10kDone")
	TNT1 A 0 A_Refire("TrueFireLoop")
	Goto TrueLeg10kDone
  FireX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFireX")
	TNT1 A 0 A_PlaySound("Leg10K/PCharge",1,5)
	TNT1 A 0 Radius_Quake(3,30,0,1,0)
	LG10 BCDEF 6 Bright
  FireLoopX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFireLoop")
	LG10 GH 1 Bright
	TNT1 A 0 A_PlaySound("Leg10K/PFire",1)
	TNT1 A 0 A_FireCustomMissile("LegPlayer10KProjectile",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	LG10 IJ 1 Bright
	TNT1 A 0 A_JumpIfNoAmmo("Leg10kDoneX")
	TNT1 A 0 A_Refire("FireLoopX")
	Goto Leg10kDoneX
  TrueFireX:
	TNT1 A 0 A_PlaySound("Leg10K/PCharge",1,5)
	TNT1 A 0 Radius_Quake(3,30,0,1,0)
	TG10 BCDEF 6 Bright
  TrueFireLoopX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto FireLoopX
	TG10 GH 1 Bright
	TNT1 A 0 A_PlaySound("Leg10K/PFire",1)
	TNT1 A 0 A_FireCustomMissile("TrueLegPlayer10KProjectile",frandom(-1,1),1,0,0,0,frandom(-1,1))
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	TG10 IJ 1 Bright
	TNT1 A 0 A_JumpIfNoAmmo("TrueLeg10kDoneX")
	TNT1 A 0 A_Refire("TrueFireLoopX")
	Goto TrueLeg10kDoneX
  AltFire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("HDLeg10KToken",1,"AltFireX")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
	TNT1 A 0 A_PlaySound("Leg10K/ACharge",1,5)
	TNT1 A 0 Radius_Quake(3,30,0,1,0)
	20LH BCDEFGHIJ 4 Bright
	20LH KL 2
  AltFireLoop:
	21LH CD 2 Bright
	TNT1 A 0 A_PlaySound("Leg10K/AFire",1)
	TNT1 A 0 A_FireCustomMissile("PlayerBlueLeg10kBall",0,1)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	21LH EF 3 Bright
	TNT1 A 0 A_JumpIfNoAmmo("Leg10kDone")
	TNT1 A 0 A_Refire("AltFireLoop")
	Goto Leg10kDone
  TrueAltFire:
	TNT1 A 0 A_PlaySound("Leg10K/ACharge",1,5)
	TNT1 A 0 Radius_Quake(3,30,0,1,0)
	20TH BCDEFGHIJ 4 Bright
	20TH KL 2
  TrueAltFireLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto AltFireLoop
	20TH MN 3 Bright
	TNT1 A 0 A_PlaySound("Leg10K/AFire",1)
	TNT1 A 0 A_Jump(128,3)
	TNT1 A 0 A_FireCustomMissile("PlayerBlueTrueLeg10kBall1",0,1,0,1)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_FireCustomMissile("PlayerBlueTrueLeg10kBall2",0,1)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	20TH OP 3 Bright
	TNT1 A 0 A_JumpIfNoAmmo("TrueLeg10kDone")
	TNT1 A 0 A_Refire("TrueAltFireLoop")
	Goto TrueLeg10kDone
  AltFireX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFireX")
	TNT1 A 0 A_PlaySound("Leg10K/ACharge",1,5)
	TNT1 A 0 Radius_Quake(3,30,0,1,0)
	LG10 BCDEF 8 Bright
  AltFireLoopX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFireLoopX")
	LG10 KL 2 Bright
	TNT1 A 0 A_PlaySound("Leg10K/AFire",1)
	TNT1 A 0 A_FireCustomMissile("PlayerBlueLeg10kBall",0,1)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	LG10 MN 3 Bright
	TNT1 A 0 A_JumpIfNoAmmo("Leg10kDoneX")
	TNT1 A 0 A_Refire("AltFireLoopX")
	Goto Leg10kDoneX
  TrueAltFireX:
	TNT1 A 0 A_PlaySound("Leg10K/ACharge",1,5)
	TNT1 A 0 Radius_Quake(3,30,0,1,0)
	TG10 BCDEF 8 Bright
  TrueAltFireLoopX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto AltFireLoopX
	TG10 GH 3 Bright
	TNT1 A 0 A_PlaySound("Leg10K/AFire",1)
	TNT1 A 0 A_Jump(128,3)
	TNT1 A 0 A_FireCustomMissile("PlayerBlueTrueLeg10kBall1",0,1,0,1)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_FireCustomMissile("PlayerBlueTrueLeg10kBall2",0,1)
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(6,3,0,1,0)
	TG10 IJ 3 Bright
	TNT1 A 0 A_JumpIfNoAmmo("TrueLeg10kDoneX")
	TNT1 A 0 A_Refire("TrueAltFireLoopX")
	Goto TrueLeg10kDoneX
  Flash:
    TNT1 A 2 Bright A_Light1
    TNT1 A 2 Bright A_Light2
	TNT1 A 2 Bright A_Light1
    Goto LightDone
  WeaponSkin:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_StopSound(5)
	TNT1 AAA 0 A_StopSound(7)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueWeaponSkin")
	20LH A 1 Offset(0,35)
	20LH A 1 Offset(0,45)
	20LH A 1 Offset(0,55)
	20LH A 1 Offset(0,65)
	20LH A 1 Offset(0,75)
	20LH A 1 Offset(0,85)
	20LH A 1 Offset(0,95)
	20LH A 1 Offset(0,108)
	20LH A 1 Offset(0,150)
	TNT1 A 3
	TNT1 A 0 A_PlayWeaponSound("Leg10k/Draw")
	Goto Select
  TrueWeaponSkin:
	20TH A 1 Offset(0,35)
	20TH A 1 Offset(0,45)
	20TH A 1 Offset(0,55)
	20TH A 1 Offset(0,65)
	20TH A 1 Offset(0,75)
	20TH A 1 Offset(0,85)
	20TH A 1 Offset(0,95)
	20TH A 1 Offset(0,108)
	20TH A 1 Offset(0,150)
	TNT1 A 3
	TNT1 A 0 A_PlayWeaponSound("Leg10k/Draw")
	Goto Select
  WeaponSkin2:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_StopSound(5)
	TNT1 AAA 0 A_StopSound(7)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueWeaponSkin2")
	LG10 A 1 Offset(0,35)
	LG10 A 1 Offset(0,45)
	LG10 A 1 Offset(0,55)
	LG10 A 1 Offset(0,65)
	LG10 A 1 Offset(0,75)
	LG10 A 1 Offset(0,85)
	LG10 A 1 Offset(0,95)
	LG10 A 1 Offset(0,108)
	LG10 A 1 Offset(0,150)
	TNT1 A 3
	TNT1 A 0 A_PlayWeaponSound("Leg10k/Draw")
	Goto Select
  TrueWeaponSkin2:
	TG10 A 1 Offset(0,35)
	TG10 A 1 Offset(0,45)
	TG10 A 1 Offset(0,55)
	TG10 A 1 Offset(0,65)
	TG10 A 1 Offset(0,75)
	TG10 A 1 Offset(0,85)
	TG10 A 1 Offset(0,95)
	TG10 A 1 Offset(0,108)
	TG10 A 1 Offset(0,150)
	TNT1 A 3
	TNT1 A 0 A_PlayWeaponSound("Leg10k/Draw")
	Goto Select
	}
}

ACTOR "INFLegendaryChainsaw" : "TLCALegendaryChainsaw" Replaces "TLCALegendaryChainsaw"
{
Weapon.AmmoType "LDemonAmmo"
Weapon.AmmoType2 "LDemonAmmo"
Tag "Legendary Chainsaw"
States
    {
  Spawn:
    CLSW A -1 Bright
    Loop
  Ready:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady")
    TNT1 AAA 0 A_TakeInventory("LegendaryChainHold",1)
    TNT1 AAA 0 A_TakeInventory("LegendaryChainAltHold",1)
    TNT1 AAA 0 A_JumpIfInventory("LegendaryCell",1,"Ready1")
    Goto Empty
  TrueReady:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
    TNT1 AAA 0 A_TakeInventory("LegendaryChainHold",1)
    TNT1 AAA 0 A_TakeInventory("LegendaryChainAltHold",1)
    TNT1 AAA 0 A_JumpIfInventory("LegendaryCell",1,"TrueReady1")
    Goto TrueEmpty
  Ready1:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReady1")
    TNT1 A 0 A_PlaySound("weapons/legChainSawIdle",7,1.0,1)
    LSWH ABCDEFG 1
    LSWH H 1 A_WeaponReady
  ReadyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueReadyLoop")
    LSWH ABCDEFGH 1 A_WeaponReady
    Loop
  TrueReady1:
    TNT1 A 0 A_PlaySound("weapons/legChainSawIdle",7,1.0,1)
    TSWH ABCDEFG 1
    TSWH H 1 A_WeaponReady
  TrueReadyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
    TSWH ABCDEFGH 1 A_WeaponReady
    Loop
  Empty:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueEmpty")
    TNT1 AAA 0 A_StopSound(7)
  EmptyLoop:
    LSWH A 1 A_WeaponReady(WRF_NOFIRE)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,"Ready1")
    Loop
  TrueEmpty:
    TNT1 AAA 0 A_StopSound(7)
  TrueEmptyLoop:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto EmptyLoop
    TSWH A 1 A_WeaponReady(WRF_NOFIRE)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,"TrueReady1")
    Loop
  Select:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueSelect")
	LSWH A 0 A_PlayWeaponSound("weapons/weapondown")
    LSWH A 0 A_Raise
	LSWH A 1 A_Raise
	Goto Select+2
  TrueSelect:
	TSWH A 0 A_PlayWeaponSound("weapons/weapondown")
    TSWH A 0 A_Raise
	TSWH A 1 A_Raise
	Goto TrueSelect+1
  Deselect:
    TNT1 A 0
    TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
    TNT1 A 0 A_TakeInventory("MineAction",1)
    TNT1 A 0 A_TakeInventory("RailgunAction",1)
    TNT1 AAA 0 A_TakeInventory("LegendaryChainHold",1)
    TNT1 AAA 0 A_TakeInventory("LegendaryChainAltHold",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueDeselectLoop")
  DeselectLoop:
    TNT1 A 0 A_StopSound(7)
	TNT1 A 0 A_Lower
    LSWH A 1 A_Lower
	Goto DeSelectLoop+1
  TrueDeselectLoop:
    TNT1 A 0 A_StopSound(7)
	TNT1 A 0 A_Lower
    TSWH A 1 A_Lower
	Goto TrueDeSelectLoop+1
  Fire:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueFire")
    TNT1 A 0 A_JumpIfNoAmmo("Ready")
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto Ready
	LSWL AB 1 Bright
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    TNT1 A 0 A_PlaySound("weapons/legChainSawAttack",7,1.0,1)
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    LSWN B 2 Bright A_Saw("weapons","weapons/sawhit",Random(50,70),"PlayerLegSawScreech",SF_NOUSEAMMOMISS)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto HoldEnd
    TNT1 A 0 A_Refire
    Goto HoldEnd
  TrueFire:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
    TNT1 A 0 A_JumpIfNoAmmo("TrueReady")
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto TrueReady
	TSWL AB 1 Bright
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    TNT1 A 0 A_PlaySound("weapons/legChainSawAttack",7,1.0,1)
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    TSWN B 2 Bright A_Saw("weapons","weapons/sawhit",Random(50,70),"PlayerTrueLegSawScreech",SF_NOUSEAMMOMISS)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto TrueHoldEnd
    TNT1 A 0 A_Refire
    Goto TrueHoldEnd
  Hold:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueHold")
    TNT1 A 0 A_JumpIfNoAmmo("Ready")
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto Ready
    TNT1 A 0 A_JumpIfInventory("LegendaryChainHold",1,"Holdloop")
    TNT1 A 0 A_PlaySound("weapons/legChainSawAttack",7,1.0,1)
  Holdloop:
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    LSWN C 2 Bright A_Saw("weapons","weapons/sawhit",Random(30,50),"PlayerLegSawScreech",SF_NOUSEAMMOMISS)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto HoldEnd
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    LSWN D 2 Bright A_Saw("weapons","weapons/sawhit",Random(30,50),"PlayerLegSawScreech",SF_NOUSEAMMOMISS)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto HoldEnd
    TNT1 A 0 A_JumpIfInventory("LegendaryChainHold",1,"HoldRefire")
    TNT1 A 0 A_GiveInventory("LegendaryChainHold",1)
  HoldRefire:
    TNT1 A 0 A_Refire
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    LSWN E 2 Bright A_Saw("weapons","weapons/sawhit",Random(30,50),"PlayerLegSawScreech",SF_NOUSEAMMOMISS)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto HoldEnd
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    LSWN F 2 Bright A_Saw("weapons","weapons/sawhit",Random(30,50),"PlayerLegSawScreech",SF_NOUSEAMMOMISS)
  HoldEnd:
    TNT1 A 0 A_StopSound(7)
    LSWL BA 4
    LSWH A 10
    Goto Ready
  TrueHold:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Fire
    TNT1 A 0 A_JumpIfNoAmmo("TrueReady")
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto TrueReady
    TNT1 A 0 A_JumpIfInventory("LegendaryChainHold",1,"TrueHoldloop")
    TNT1 A 0 A_PlaySound("weapons/legChainSawAttack",7,1.0,1)
  TrueHoldloop:
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    TSWN C 2 Bright A_Saw("weapons","weapons/sawhit",Random(30,50),"PlayerTrueLegSawScreech",SF_NOUSEAMMOMISS)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto TrueHoldEnd
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    TSWN D 2 Bright A_Saw("weapons","weapons/sawhit",Random(30,50),"PlayerTrueLegSawScreech",SF_NOUSEAMMOMISS)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto TrueHoldEnd
    TNT1 A 0 A_JumpIfInventory("LegendaryChainHold",1,"TrueHoldRefire")
    TNT1 A 0 A_GiveInventory("LegendaryChainHold",1)
  TrueHoldRefire:
    TNT1 A 0 A_Refire
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    TSWN E 2 Bright A_Saw("weapons","weapons/sawhit",Random(30,50),"PlayerTrueLegSawScreech",SF_NOUSEAMMOMISS)
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",1,1)
    Goto TrueHoldEnd
    TNT1 A 0 Radius_Quake(1,2,0,1,0)
    TSWN F 2 Bright A_Saw("weapons","weapons/sawhit",Random(30,50),"PlayerTrueLegSawScreech",SF_NOUSEAMMOMISS)
  TrueHoldEnd:
    TNT1 AAA 0 A_StopSound(7)
    TSWL BA 4
    TSWH A 10
    Goto TrueReady
  AltFire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,"TrueAltFire")
    TNT1 A 0 A_JumpIfNoAmmo("Ready")
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",4,1)
    Goto Ready
    TNT1 A 0 A_JumpIfInventory("LegendaryChainAltHold",1,"AltFireLoop")
  AltFireLoop:
    LSWN ABCDE 1 Bright
    LSWN F 1 Bright A_FireCustomMissile("PlayerLegChainRipper",0,0,-15,-20)
    LSWN A 1 Bright A_FireCustomMissile("PlayerLegChainRipper",0,1,15,-20)
    LSWN BCDEF 1 Bright
    TNT1 A 0 A_JumpIfInventory("LegendaryChainAltHold",1,"AltFireRefire")
    TNT1 A 0 A_GiveInventory("LegendaryChainAltHold",1)
  AltFireRefire:
    TNT1 A 0 A_Refire
    TNT1 A 0 A_StopSound(7)
    LSWL BA 4
    LSWH A 10
    Goto Ready
  TrueAltFire:
    TNT1 A 0
    TNT1 A 0 A_JumpIfNoAmmo("TrueReady")
    TNT1 A 0 A_JumpIfInventory("LegendaryCell",9,1)
    Goto TrueReady
    TNT1 A 0 A_JumpIfInventory("LegendaryChainAltHold",1,"TrueAltFireLoop")
  TrueAltFireLoop:
    TSWN ABCDE 1 Bright
    TSWN F 1 Bright A_FireCustomMissile("PlayerTrueLegChainRipper",0,1,-15,-20)
    TSWN A 1 Bright A_FireCustomMissile("PlayerTrueLegChainRipper",0,1,15,-20)
    TSWN BCDEF 1 Bright
    TNT1 A 0 A_JumpIfInventory("LegendaryChainAltHold",1,"TrueAltFireRefire")
    TNT1 A 0 A_GiveInventory("LegendaryChainAltHold",1)
  TrueAltFireRefire:
    TNT1 A 0 A_Refire
    TNT1 A 0 A_StopSound(7)
    TSWL BA 4
    TSWH A 10
    Goto TrueReady
    }
}

ACTOR HDLegendaryBFGToken : Inventory {Inventory.MaxAmount 1}

Actor "INFLegendaryBFG" : "NewLegendaryBFG" Replaces "NewLegendaryBFG"
{
  Tag "Legendary BFG"
  states
  {
  Spawn:
	GRMG "X" -1
	Loop
  Select:
    TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"SelectX")
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"TrueSelect")
    TNT1 A 0 a_playweaponsound("Weapons/GuruUp")
  	RR7U A 0 A_Raise
  	RR7U A 1 A_Raise
  	goto select+3
  TrueSelect:
    TNT1 A 0 a_playweaponsound("truelegbfg/equip")
  	TR7U A 0 A_Raise
  	TR7U A 1 A_Raise
  	goto trueselect+1
  SelectX:
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"TrueSelectX")
    TNT1 A 0 a_playweaponsound("Weapons/GuruUp")
  	GRMU A 0 A_Raise
  	GRMU A 1 A_Raise
  	goto selectX+2
  TrueSelectX:
    TNT1 A 0 a_playweaponsound("truelegbfg/equip")
  	TBFU A 0 A_Raise
  	TBFU A 1 A_Raise
  	Goto TrueSelectX+1
  Deselect:
    TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"DeselectX")
	TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"truedeselect")
  	RR7U A 0 A_StopSound(5)
    RR7U A 0 A_StopSound(6)
	RR7U A 0 A_ZoomFactor(1)
  	RR7U A 0 A_Lower
  	RR7U A 1 A_Lower
  	goto deselect+6
  TrueDeselect:
    TR7U A 0 A_StopSound(5)
    TR7U A 0 A_StopSound(6)
	TR7U A 0 A_ZoomFactor(1)
  	TR7U A 0 A_Lower
  	TR7U A 1 A_Lower
  	loop
  DeselectX:
	TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"TrueDeselectX")
  	GRMU A 0 A_StopSound(5)
    GRMU A 0 A_StopSound(6)
	GRMU A 0 A_ZoomFactor(1)
  	GRMU A 0 A_Lower
  	GRMU A 1 A_Lower
  	goto deselectX+1
  TrueDeselectX:
    TBFU A 0 A_StopSound(5)
    TBFU A 0 A_StopSound(6)
	TBFU A 0 A_ZoomFactor(1)
  	TBFU A 0 A_Lower
  	TBFU A 1 A_Lower
  	loop
  Ready:
    TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"ReadyX")
  ReadyLoop:
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"trueready")
  	RR7G A 0 A_PlaySound("Weapons/GuruIdle",5,1.0,1)
  	RR7G ABCDEFGHI 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"WeaponSkin")
	TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"trueready")
	RR7G JIHGFEDCB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"WeaponSkin")
  	loop
  TrueReady:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
    TR7G A 0 A_PlaySound("truelegbfg/idle",5,1.0,1)
  	TR7G ABCDEFGHI 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"WeaponSkin")
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
	TR7G JIHGFEDCB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"WeaponSkin")
	loop
  ReadyX:
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"TrueReadyX")
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,1)
	Goto WeaponSkin2
  	GRMG A 0 A_PlaySound("Weapons/GuruIdle",5,1.0,1)
  	GRMG ABCDEFGHI 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,1)
	Goto WeaponSkin2
	TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"TrueReadyX")
	GRMG JIHGFEDCB 1 A_WeaponReady
  	loop
  TrueReadyX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto ReadyX
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,1)
	Goto WeaponSkin2
    TBFG A 0 A_PlaySound("truelegbfg/idle",5,1.0,1)
  	TBFG ABCDEFGHI 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,1)
	Goto WeaponSkin2
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto ReadyX
	TBFG JIHGFEDCB 1 A_WeaponReady
	loop
  Fire:
    TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"FireX")
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"truefire")
  	RR7G A 0 A_PlaySound("Weapons/GuruTrigger",1)
  	RR7G ABCDEFGHIJ 1
  	RR7G A 0 A_PlaySound("Weapons/GuruCharge",6)
  	RR7G IHGFED 1
	RR7G A 0 A_GiveInventory("GuruCharge",5)
  Gurucharger:
	RR7G A 0 A_TakeInventory("GuruCharge",1)
	RR7C ABCDEFGHIJKLMNOPQRST 1 Bright A_Quake (4, 2, 0, 2,"none")
    RR7G A 0 A_JumpIfInventory("GuruCharge",1,"Gurucharger")
	RR7C ABC 1 Bright A_Quake (4, 2, 0, 2,"none")
    RR7G A 0 A_StopSound(5)
    RR7G A 0 A_PlaySound("Weapons/GuruFire",5)
  	RR7G A 0 A_PlaySound("Weapons/GuruAddFire",6)
  	RR7G A 0 A_FireCustomMissile("PlayerGuruBall", 0, 1, 12, 0)
  	RR7G A 0 A_Recoil(65)
	RR7G A 0 A_GunFlash
	RR7G A 0 A_SetBlend("Yellow",0.5,60)
	RR7G A 0 A_SetBlend("White",0.25,60)
	RR7F A 0 A_ZoomFactor(0.975)
	RR7F A 4 Bright //Offset(2,34)
	RR7F A 0 A_ZoomFactor(0.95)
	RR7F B 4 Bright //Offset(4,36)
	RR7F C 4 Bright A_ZoomFactor(0.955)
	RR7F D 4 Bright A_ZoomFactor(0.96)
	RR7F E 5 Bright A_ZoomFactor(0.965)
	RR7F F 5 Bright A_ZoomFactor(0.97)
	RR7F G 5 Bright A_ZoomFactor(0.975)
	RR7F H 6 Bright A_ZoomFactor(0.98)
	RR7F I 6 Bright A_ZoomFactor(0.99)
	RR7F J 6 Bright A_ZoomFactor(1)
	Goto ReadyLoop
  truefire:
    TR7G A 0 A_PlaySound("truelegbfg/trigger",1)
  	TR7G ABCDEFGHIJ 1
  	TR7G A 0 A_PlaySound("truelegbfg/charge",6)
  	TR7G IHGFED 1
	TR7G A 0 A_GiveInventory("GuruCharge",5)
  trueGurucharger:
	TR7G A 0 A_TakeInventory("GuruCharge",1)
	TR7C ABCDEFGHIJKLMNOPQRST 1 Bright A_Quake (4, 2, 0, 2,"none")
    TR7G A 0 A_JumpIfInventory("GuruCharge",1,"trueGurucharger")
	TR7C ABC 1 Bright A_Quake (4, 2, 0, 2,"none")
    TR7G A 0 A_StopSound(5)
    TR7G A 0 A_PlaySound("truelegbfg/fire",6)
  	TR7G A 0 A_PlaySound("truelegbfg/fire2",7)
  	TR7G A 0 A_FireCustomMissile("PlayerTrueGuruBall", 0, 1, 12, 0)
  	TR7G A 0 A_Recoil(45)
	TR7G A 0 A_GunFlash
	TR7G A 0 A_SetBlend("blue",0.45,75)
	TR7G A 0 A_SetBlend("White",0.225,75)
	TR7F A 0 A_ZoomFactor(0.95)
	TR7F A 4 Bright //Offset(2,34)
	TR7F A 0 A_ZoomFactor(0.9)
	TR7F B 4 Bright //Offset(4,36)
	TR7F C 4 Bright
	TR7F D 4 Bright A_ZoomFactor(0.915)
	TR7F E 5 Bright A_ZoomFactor(0.93)
	TR7F F 5 Bright A_ZoomFactor(0.945)
	TR7F G 5 Bright A_ZoomFactor(0.96)
	TR7F H 6 Bright A_ZoomFactor(0.975)
	TR7F I 6 Bright A_ZoomFactor(0.99)
	TR7F J 6 Bright A_ZoomFactor(1)
	Goto TrueReady
  FireX:
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"truefireX")
  	GRMG A 0 A_PlaySound("Weapons/GuruTrigger",1)
  	GRMG ABCDEFGHIJ 1
  	GRMG A 0 A_PlaySound("Weapons/GuruCharge",6)
  	GRMG IHGFED 1
	GRMG A 0 A_GiveInventory("GuruCharge",5)
  GuruchargerX:
	GRMG A 0 A_TakeInventory("GuruCharge",1)
	GRMC ABCDEFGHIJKLMNOPQRST 1 Bright A_Quake (4, 2, 0, 2,"none")
    GRMG A 0 A_JumpIfInventory("GuruCharge",1,"GuruchargerX")
	GRMC ABC 1 Bright A_Quake (4, 2, 0, 2,"none")
    GRMG A 0 A_StopSound(5)
    GRMG A 0 A_PlaySound("Weapons/GuruFire",5)
  	GRMG A 0 A_PlaySound("Weapons/GuruAddFire",6)
  	GRMG A 0 A_FireCustomMissile("PlayerGuruBall", 0, 1, 12, 0)
  	GRMG A 0 A_Recoil(65)
	GRMG A 0 A_GunFlash
	GRMG A 0 A_SetBlend("Yellow",0.5,60)
	GRMG A 0 A_SetBlend("White",0.25,60)
	GRMF A 0 A_ZoomFactor(0.975)
	GRMF A 4 Bright //Offset(2,34)
	GRMF A 0 A_ZoomFactor(0.95)
	GRMF B 4 Bright //Offset(4,36)
	GRMF C 4 Bright A_ZoomFactor(0.955)
	GRMF D 4 Bright A_ZoomFactor(0.96)
	GRMF E 5 Bright A_ZoomFactor(0.965)
	GRMF F 5 Bright A_ZoomFactor(0.97)
	GRMF G 5 Bright A_ZoomFactor(0.975)
	GRMF H 6 Bright A_ZoomFactor(0.98)
	GRMF I 6 Bright A_ZoomFactor(0.99)
	GRMF J 6 Bright A_ZoomFactor(1)
	Goto ReadyX
  truefireX:
    TBFG A 0 A_PlaySound("truelegbfg/trigger",1)
  	TBFG ABCDEFGHIJ 1
  	TBFG A 0 A_PlaySound("truelegbfg/charge",6)
  	TBFG IHGFED 1
	TBFG A 0 A_GiveInventory("GuruCharge",5)
  trueGuruchargerX:
	TBFG A 0 A_TakeInventory("GuruCharge",1)
	TBFC ABCDEFGHIJKLMNOPQRST 1 Bright A_Quake (4, 2, 0, 2,"none")
    TBFG A 0 A_JumpIfInventory("GuruCharge",1,"trueGuruchargerX")
	TBFC ABC 1 Bright A_Quake (4, 2, 0, 2,"none")
    TBFG A 0 A_StopSound(5)
    TBFG A 0 A_PlaySound("truelegbfg/fire",6)
  	TBFG A 0 A_PlaySound("truelegbfg/fire2",7)
  	TBFG A 0 A_FireCustomMissile("PlayerTrueGuruBall", 0, 1, 12, 0)
  	TBFG A 0 A_Recoil(45)
	TBFG A 0 A_GunFlash
	TBFG A 0 A_SetBlend("blue",0.45,75)
	TBFG A 0 A_SetBlend("White",0.225,75)
	TBFF A 0 A_ZoomFactor(0.95)
	TBFF A 4 Bright //Offset(2,34)
	TBFF A 0 A_ZoomFactor(0.9)
	TBFF B 4 Bright //Offset(4,36)
	TBFF C 4 Bright
	TBFF D 4 Bright A_ZoomFactor(0.915)
	TBFF E 5 Bright A_ZoomFactor(0.93)
	TBFF F 5 Bright A_ZoomFactor(0.945)
	TBFF G 5 Bright A_ZoomFactor(0.96)
	TBFF H 6 Bright A_ZoomFactor(0.975)
	TBFF I 6 Bright A_ZoomFactor(0.99)
	TBFF J 6 Bright A_ZoomFactor(1)
	Goto trueReadyX
  altfire:
    TNT1 A 0 A_JumpIfInventory("HDLegendaryBFGToken",1,"altfireX")
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"truealtfire")
  	RR7G A 0 A_PlaySound("Weapons/GuruAddFire",6)
  	RR7G A 0 A_FireCustomMissile("PlayerLaserBeam")
  	RR7G A 0 A_Recoil(25)
	RR7G A 0 A_GunFlash
	RR7G A 0 A_SetBlend("Yellow",0.25,35)
	RR7G A 0 A_SetBlend("White",0.125,35)
	RR7F A 0 A_ZoomFactor(0.975)
	RR7F A 4 Bright //Offset(2,34)
	RR7F A 0 A_ZoomFactor(0.95)
	RR7F B 4 Bright //Offset(4,36)
	RR7F C 4 Bright A_ZoomFactor(0.955)
	RR7F D 4 Bright A_ZoomFactor(0.96)
	RR7F E 5 Bright A_ZoomFactor(0.965)
	RR7F F 5 Bright A_ZoomFactor(0.97)
	RR7F G 5 Bright A_ZoomFactor(0.975)
	RR7F H 6 Bright A_ZoomFactor(0.98)
	RR7F I 6 Bright A_ZoomFactor(0.99)
	RR7F J 6 Bright A_ZoomFactor(1)
	Goto ReadyLoop
  truealtfire:
    TR7G A 50 bright a_playsound("truelegbfg/load", 6)
  truealtfirehold:
    TR7G A 0 a_giveinventory("gurucharge", 7)
  truealtfirecharge:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto Ready
  	TR7G A 0 A_FireCustomMissile("PlayerTruelaserbeam", 0, false)
  	TR7G A 0 A_Recoil(0.333)
	TR7G A 0 A_GunFlash
	TR7G A 0 A_SetBlend("blue",0.15,20)
	TR7G A 0 A_SetBlend("White",0.1,20)
	TR7F A 0 A_ZoomFactor(0.95)
	TR7F A 1 Bright //Offset(2,34)
	TR7F A 0 A_ZoomFactor(0.9)
	TR7F B 1 Bright //Offset(4,36)
	TR7F A 0 a_takeinventory("gurucharge", 1)
	TR7F A 0 a_jumpifinventory("GuruCharge", 1,"truealtfirecharge")
	TR7F A 0 a_firecustommissile("nothing") //so ammo is used
	TR7F A 0 a_refire("truealtfirehold")
	TR7F C 4 Bright
	TR7F D 4 Bright A_ZoomFactor(0.915)
	TR7F E 5 Bright A_ZoomFactor(0.93)
	TR7F F 5 Bright A_ZoomFactor(0.945)
	TR7F G 5 Bright A_ZoomFactor(0.96)
	TR7F H 6 Bright A_ZoomFactor(0.975)
	TR7F I 6 Bright A_ZoomFactor(0.99)
	TR7F J 6 Bright A_ZoomFactor(1)
	Goto trueReady
  altfireX:
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"truealtfireX")
  	GRMG A 0 A_PlaySound("Weapons/GuruAddFire",6)
  	GRMG A 0 A_FireCustomMissile("PlayerLaserBeam")
  	GRMG A 0 A_Recoil(25)
	GRMG A 0 A_GunFlash
	GRMG A 0 A_SetBlend("Yellow",0.25,35)
	GRMG A 0 A_SetBlend("White",0.125,35)
	GRMF A 0 A_ZoomFactor(0.975)
	GRMF A 4 Bright //Offset(2,34)
	GRMF A 0 A_ZoomFactor(0.95)
	GRMF B 4 Bright //Offset(4,36)
	GRMF C 4 Bright A_ZoomFactor(0.955)
	GRMF D 4 Bright A_ZoomFactor(0.96)
	GRMF E 5 Bright A_ZoomFactor(0.965)
	GRMF F 5 Bright A_ZoomFactor(0.97)
	GRMF G 5 Bright A_ZoomFactor(0.975)
	GRMF H 6 Bright A_ZoomFactor(0.98)
	GRMF I 6 Bright A_ZoomFactor(0.99)
	GRMF J 6 Bright A_ZoomFactor(1)
	Goto ReadyX
  truealtfireX:
    TBFG A 50 bright a_playsound("truelegbfg/load", 6)
  truealtfireholdX:
    TBFG A 0 a_giveinventory("gurucharge", 7)
  truealtfirechargeX:
	TNT1 A 0 A_JumpIfInventory("TrueLegWeaponSphereToken",1,1)
	Goto ReadyX
  	TBFG A 0 A_FireCustomMissile("PlayerTruelaserbeam", 0, false)
  	TBFG A 0 A_Recoil(0.333)
	TBFG A 0 A_GunFlash
	TBFG A 0 A_SetBlend("blue",0.15,20)
	TBFG A 0 A_SetBlend("White",0.1,20)
	TBFF A 0 A_ZoomFactor(0.95)
	TBFF A 1 Bright //Offset(2,34)
	TBFF A 0 A_ZoomFactor(0.9)
	TBFF B 1 Bright //Offset(4,36)
	TBFF A 0 a_takeinventory("gurucharge", 1)
	TBFF A 0 a_jumpifinventory("GuruCharge", 1,"truealtfirechargeX")
	TBFF A 0 a_firecustommissile("nothing") //so ammo is used
	TBFF A 0 a_refire("truealtfireholdX")
	TBFF C 4 Bright
	TBFF D 4 Bright A_ZoomFactor(0.915)
	TBFF E 5 Bright A_ZoomFactor(0.93)
	TBFF F 5 Bright A_ZoomFactor(0.945)
	TBFF G 5 Bright A_ZoomFactor(0.96)
	TBFF H 6 Bright A_ZoomFactor(0.975)
	TBFF I 6 Bright A_ZoomFactor(0.99)
	TBFF J 6 Bright A_ZoomFactor(1)
	Goto trueReadyX
  Flash:
    TNT1 A 7 bright A_Light2
    TNT1 A 4 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  WeaponSkin:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
    TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"WeaponSkinX")
	RR7G A 1 Offset(0,35)
	RR7G A 1 Offset(0,45)
	RR7G A 1 Offset(0,55)
	RR7G A 1 Offset(0,65)
	RR7G A 1 Offset(0,75)
	RR7G A 1 Offset(0,85)
	RR7G A 1 Offset(0,95)
	RR7G A 1 Offset(0,108)
	RR7G A 1 Offset(0,150)
	RR7G A 3
	Goto Select
  WeaponSkinX:
	TR7G A 1 Offset(0,35)
	TR7G A 1 Offset(0,45)
	TR7G A 1 Offset(0,55)
	TR7G A 1 Offset(0,65)
	TR7G A 1 Offset(0,75)
	TR7G A 1 Offset(0,85)
	TR7G A 1 Offset(0,95)
	TR7G A 1 Offset(0,108)
	TR7G A 1 Offset(0,150)
	TR7G A 3
	Goto Select
  WeaponSkin2:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 a_jumpifinventory("TrueLegWeaponSphereToken",1,"WeaponSkin2X")
	GRMG A 1 Offset(0,35)
	GRMG A 1 Offset(0,45)
	GRMG A 1 Offset(0,55)
	GRMG A 1 Offset(0,65)
	GRMG A 1 Offset(0,75)
	GRMG A 1 Offset(0,85)
	GRMG A 1 Offset(0,95)
	GRMG A 1 Offset(0,108)
	GRMG A 1 Offset(0,150)
	GRMG A 3
	Goto Select
  WeaponSkin2X:
	TBFG A 1 Offset(0,35)
	TBFG A 1 Offset(0,45)
	TBFG A 1 Offset(0,55)
	TBFG A 1 Offset(0,65)
	TBFG A 1 Offset(0,75)
	TBFG A 1 Offset(0,85)
	TBFG A 1 Offset(0,95)
	TBFG A 1 Offset(0,108)
	TBFG A 1 Offset(0,150)
	TBFG A 3
	Goto Select
  }
}

Actor INFAutofuck : AutofuckNEO Replaces AutofuckNEO
{
Tag "Legendary Autogun"
States
{
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready
  GrenadeToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	AUTG AEFGHI 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	AUTG IHGFEA 1
	Goto Ready
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	AUTG AEFGHI 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	AUTG IHGFEA 1
	Goto Ready
	}
}