Actor PlayerHealth : Inventory { Inventory.MaxAmount 1 }
Actor PlayerArmor : Inventory { Inventory.MaxAmount 1 }
Actor PlayerMorphed : Inventory { Inventory.MaxAmount 1 }
Actor MorphIronFeet : Inventory { Inventory.MaxAmount 1 }

//Info: Legendary scroll? oh yeaa.. OH YEAAA BABY!!!

Actor LegendaryScroll : CustomInventory
{
  Inventory.PickupMessage "Become the lord of the legendaries, the Legendary Cyberdemon."
  Inventory.PickupSound "legendarypowersphere/pickup"
  Inventory.Icon "LGC5A0"
  Inventory.MaxAmount 1
  +INVBAR
  +COUNTITEM
  +INVENTORY.BIGPOWERUP
  +NOTIMEFREEZE
  +FLOAT
  +FLOATBOB
  States
  {
Use:
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("GetClass") == 1,"Failed")
    TNT1 A 0 ACS_NamedExecuteWithResult("GetPlayerInfo",0)
    TNT1 A 0 ACS_NamedExecuteWithResult("LegendaryCyberDemon") 
    TNT1 A 0 A_GiveInventory("ScrollLegendaryGiver")
    TNT1 A 0 A_PlaySound("Legcyber/laugh2", CHAN_AUTO, 1.0, False, ATTN_NONE)
    Stop	
  Spawn:
	LGC5 BCD 5 Bright A_CustomMissile("GhostFireSpawner",-10,0,random(0,-360),2,random(0,360)) 
	Loop	
  Pickup:
    TNT1 A 0
    TNT1 A 1 A_StopSound
	Stop
  Failed:
    TNT1 A 0 
    TNT1 A 1 
	Stop
  }
}


ACTOR ScrollLegendaryGiver : PowerupGiver
{
  Powerup.Duration -322
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  +NOTIMEFREEZE
  Inventory.MaxAmount 1
  Powerup.Type "PowerLegendaryCyberPlayer"
}

ACTOR PowerLegendaryCyberPlayer : PowerMorph
{
  +NOTIMEFREEZE
  PowerMorph.PlayerClass "Player_LegendaryCyberDemon"
  PowerMorph.MorphFlash "Nothing"
  PowerMorph.UnMorphFlash "Nothing"
  PowerMorph.MorphStyle (MRF_FULLHEALTH|MRF_ADDSTAMINA|MRF_NEWTIDBEHAVIOUR|MRF_WHENINVULNERABLE|MRF_LOSEACTUALWEAPON|MRF_UNDOBYDEATH|MRF_UNDOBYDEATHSAVES)
}

ACTOR LegendaryCyberDemonMissileType2 : Inventory{inventory.MaxAmount 1}
ACTOR LegendaryCyberDemonMissileType3 : Inventory{inventory.MaxAmount 1}
ACTOR LegendaryCyberDemonMissileType4 : Inventory{inventory.MaxAmount 1}
ACTOR LegendaryCyberDemonMissileType5 : Inventory{inventory.MaxAmount 1}
ACTOR LegendaryCyberDemonMissileType6 : Inventory{inventory.MaxAmount 1}
ACTOR LegendaryCyberDemonMissileType7 : Inventory{inventory.MaxAmount 1}
ACTOR LegendaryCyberDemonMissileType8 : Inventory{inventory.MaxAmount 1}
ACTOR LegendaryCyberDemonMissileType9 : Inventory{inventory.MaxAmount 1}
ACTOR LegendaryCyberDemonMissileType10 : Inventory{inventory.MaxAmount 1}

ACTOR Player_LegendaryCyberDemon : PlayerPawn
{
  Speed 1
  Mass 300
  Radius 20
  Height 56
  Player.ViewHeight 110
  Health 7000
  Scale 1.1
  Player.MaxHealth 7000
  Player.ForwardMove 1.3
  Player.SideMove 1.3
  Player.JumpZ 10
  BloodColor "Blue"
  Player.SoundClass "LegendaryCyberDemon"
  Player.DisplayName "HellFire Cyberdemon"
  Player.AttackZOffset 0
  Player.DamageScreenColor Orange, 0.5
  Player.MorphWeapon "LegendaryCyberDemon-Weapons"
  Mass 0x7FFFFFFF
  DamageFactor "PDTBFG", 0.05
  DamageFactor "PDTBFGTracer", 0.05
  DamageFactor "Cyber10K", 0.0
  DamageFactor "Legendary", 0.0
  DamageFactor "LegendaryPlayer", 0.3
  DamageFactor "LegendaryGuru", 0.0
  DamageFactor "LegendaryGuruPlayer", 0.3
  DamageFactor "CadaverRocket", 0.0
  DamageFactor "BFGSplash", 0.25
  DamageFactor "BFGSpray", 0.25
  DamageFactor "PlayerDevBall", 0.025
  DamageFactor "PlayerDevBall2", 0.025
  DamageFactor "PlayerDTBFGRailgunSlug", 0.025
  DamageFactor "PlayerDevTracer", 0.025
  DamageFactor "DemolisherEx", 0.0
  DamageFactor "DarkDemoEx", 0.0
  DamageFactor "CerChainguns", 0.0
  DamageFactor "CerEnergyBall", 0.0
  DamageFactor "DBFG10K2", 0.65
  DamageFactor "PlayerDBFG10K2", 0.65
  DamageFactor "PlayerDTRG", 0.3
  DamageFactor "DBFG2", 0.65
  DamageFactor "PlayerDBFG2", 0.65
  DamageFactor "PyroShot", 0.0
  DamageFactor "PlayerPyro", 0.0
  DamageFactor "PDTPuff", 0.0
  DamageFactor 0.5
  PainChance "PlayerDBFG2", 256
  PainChance "DBFG2", 256
  PainChance "PlayerDBFG10K2", 2560
  SeeSound "cyber/sight1"
  PainSound "Legcyber/pain"
  DeathSound "Legcyber/death"
  ActiveSound "Legcyber/laugh3"
  Species "Player"
  +THRUSPECIES
  +DONTHARMSPECIES
  +NORADIUSDMG
  +NOSKIN
  +DONTRIP
  +NOPAIN
  +BOSS
  -PICKUP
  +BOSSDEATH
  var int user_loop;
  States
  {
   Spawn:
	TNT1 A 0
    CYBR A 10 Bright
    Loop
   See:
    CYBR A 3 Bright A_PlaySoundEx ("cyber/hoof","body") 
    CYBR ABBCC 3 Bright 
    CYBR D 3 Bright A_PlaySoundEx ("cyber/metal","body") 
    CYBR D 3 Bright 
    Goto Spawn
  Missile:
    CYBR E 1 Bright
	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",10,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile10
	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",9,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile9
	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",8,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile8
	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",7,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile7
  	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",6,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile6
	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",5,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile5
	CYBR A 0 A_JumpIfInventory("CYBRbWeapType",4,2)
	CYBR A 0 A_Jump(256,2)
	CYBR A 0
	Goto Missile4
	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",3,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile3
	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",2,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile1
	CYBR E 0 A_JumpIfInventory("CYBRbWeapType",1,2)
	CYBR E 0 A_Jump(256,2)
	CYBR E 0
	Goto Missile2
	CYBR E 1 Bright A_Jump(256,"Missile1")
    Goto Spawn
  Missile1:
    TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR E 4 
    CYBR F 3 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 10, 1)
	Loop
	TNT1 A 0 A_SetUserVar("user_loop",0)
    CYBR E 4 
    Goto Spawn	
  Missile2:
    CYBR E 4 
    CYBR G 3
	HFCS A 5 		
	TNT1 A 0 
	HFCS B 7
    Goto Spawn
  Missile3:	
    CYBR G 10 
	CYBR G 18 Bright
	CYBR G 7 
	HFCS A 5 
	HFCS B 6 
	HFCS B 20
    Goto See	
  Missile4:
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR E 4 
    CYBR F 3 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 10, 1)
	Loop
	TNT1 A 0 A_SetUserVar("user_loop",0)
    CYBR E 4 
    CYBR F 3 Bright 
    Goto Spawn
  Missile5:
	CYBR E 18 Bright 
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR E 4 Bright
    CYBR F 3 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 10, 1)
	Goto Missile5+1
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR E 4 	
    Goto Spawn	
  Missile6:
	CYBR E 18 Bright 
	CYBR E 6 Bright
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR F 3 Bright
    CYBR E 4 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 9, 1)
	Goto Missile6+2
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR F 3 Bright 
	Missile6Loop1:
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR E 3 Bright
    CYBR F 2 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 10, 1)
	Goto Missile6Loop1
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR E 2 Bright 
	Missile6Loop2:
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR F 1 Bright
    CYBR E 2 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 4, 1)
	Goto Missile6Loop2
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR F 1 Bright 
	CYBR E 20 Bright 
    Goto Spawn	
  Missile7:
	CYBR E 18 Bright 
	CYBR E 6 Bright 
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR F 3 Bright
    CYBR E 4 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 9, 1)
	Goto Missile7+2
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR F 3 Bright 
	Missile7Loop1:
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR E 3 Bright
    CYBR F 2 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 4, 1)
	Goto Missile7Loop1
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR E 2 Bright 
	CYBR F 1 Bright 
	CYBR E 2 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 2 Bright 
	CYBR F 1 Bright 
	CYBR E 2 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 2 Bright 
	CYBR F 1 Bright 
	CYBR E 2 Bright 
	CYBR F 2 Bright
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	CYBR E 1 Bright 
	CYBR F 2 Bright 
	Missile7Loop2:
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR E 1 Bright
    CYBR F 1 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 15, 1)
	Goto Missile7Loop2
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR E 20 Bright 
    Goto See
  Missile8:
	CYBR E 28 Bright 
	CYBR F 8 Bright   
	CYBR E 60 Bright 
	Goto see
  Missile9:
    CYBR A 3 Bright
	CYBR A 3 Bright 
	CYBR A 10 Bright 
	CYBR B 5 Bright 
	CYBR A 3 Bright 
	CYBR B 3 Bright
	CYBR A 5 Bright 
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR B 5 Bright
    CYBR A 3 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 15, 1)
	Goto Missile9+7
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR B 5 Bright 
	CYBR A 20 Bright 
	Goto see
  Missile10:
	CYBR C 0 Bright 
    CYBR C 10 
	CYBR C 117 Bright 
	CYBR D 13 Bright 
	TNT1 A 0 A_SetUserVar("user_loop",user_loop + 1)
	CYBR C 3 Bright
    CYBR D 4 Bright 
	TNT1 A 0 A_JumpIf(user_loop >= 13, 1)
	Goto Missile10+4
	TNT1 A 0 A_SetUserVar("user_loop",0)
	CYBR D 20 Bright 
	Goto see
  Death: 
    CYBR G 10 A_Scream
    CYBR H 10 A_NoBlocking
    CYBR II 2 Bright 
    CYBR II 2 Bright
    CYBR JJ 2 Bright 	
	CYBR JJ 2 Bright 
    CYBR KK 2 Bright
    CYBR LL 1 Bright 
    CYBR MM 1 Bright 
    CYBR N 10
    CYBR O 8
    CYBR P -1
    Stop
  }
}

Actor CYBRbWeapType : Inventory{Inventory.MaxAmount 10}
Actor Loop : Inventory{Inventory.MaxAmount 50}
Actor LegendaryCyberDemon-Weapons : MorphedWeapon
{
+WEAPON.NOAUTOFIRE
States
{
  Ready:
    LGC0 A 17 A_WeaponReady
    Loop	
  Fire:
  	LGC0 A 1 Bright
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",10,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire10
  	LGC0 A 1 Bright
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",9,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire9
    LGC0 A 1 Bright
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",8,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire8
	LGC0 A 1 Bright
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",7,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire7
  	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",6,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire6
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",5,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire5
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",4,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire4
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",3,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire3
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",2,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire2
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",1,2)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0
	Goto Fire1
	LGC0 A 1 Bright A_Jump(256,"Fire0")
	Goto Ready
  Fire0:
	LVRD B 0 A_GunFlash	
    TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 2 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerLegendaryRocket",random(-6,6),0,-26,56)
	TNT1 A 0 A_JumpIfInventory("Loop",10,1)
	Goto Fire0+1
	TNT1 A 0 A_TakeInventory("Loop",99)
    LGC0 ABC 2 	
    Goto Ready		
  Fire1:
    LGC0 E 4 
	LVRD D 0 A_GiveInventory("LegendaryCyberDemonMissileType2")
	LVRD D 0 A_GunFlash	
    LGC0 E 3 
	TNT1 A 0 A_Recoil(-50)
	LGC0 E 5 	
	TNT1 A 0 Radius_Quake(10,8,0,24,0)	
	TNT1 A 0 A_PlaySound("monsters/darkcyberstomp")
	TNT1 A 0 A_FireCustomMissile("PlayerLegendaryStomp",0,0,0,10)
	LGC0 E 7 
    Goto Ready
  Fire2:
	LVRD B 0 A_GunFlash	
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 2 
    LGC0 D 3 Bright A_FireCustomMissile ("PlayerLegendaryCyberRail",random(-6,6),0,-26,56)
	TNT1 A 0 A_JumpIfInventory("Loop",10,1)
	Goto Fire2+1
	TNT1 A 0 A_TakeInventory("Loop",99)
    Goto Ready
  Fire3:
    LPNC A 0 A_GiveInventory("LegendaryCyberDemonMissileType3")
	LPNC A 0 A_GunFlash
    LGC0 E 10 
	LGC0 E 3 Bright A_PlaySoundEx("Legcyber/laugh2","Voice")
	LGC0 E 15 Bright 
	LGC0 E 12
	TNT1 A 0 Radius_Quake(10,8,0,24,0)	
	LGC0 E 6 A_PlaySound("monsters/darkcyberstomp")
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",16,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",5,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-5,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",10,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-10,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",15,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-15,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",20,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-20,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",25,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-25,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",30,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-30,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",35,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-35,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",40,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-40,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",45,0,0,16)
	LGC0 J 0 A_FireCustomMissile("PlayerLegendaryCyberRail",-45,0,0,16)
	LGC0 E 20
    Goto Ready
  Fire4:
    LVRD D 0 A_GiveInventory("LegendaryCyberDemonMissileType4")
	LVRD D 0 A_GunFlash	
	LGC0 ABC 9 Bright 
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 2 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerLegCybDevastatorBall",random(-4,4),0,-26,58)	
	TNT1 A 0 A_JumpIfInventory("Loop",10,1)
	Goto Fire4+5
	TNT1 A 0 A_TakeInventory("Loop",99)
	LGC0 CBA 2 	
    Goto Ready	
  Fire5:
    LVRD D 0 A_GiveInventory("LegendaryCyberDemonMissileType5")
	LVRD D 0 A_GunFlash	
    TNT1 A 0 A_PlaySound("weapons/charge15k")
	LGC0 ABC 4 Bright 
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 3
    LGC0 D 3 Bright A_FireCustomMissile("PlayerLegendary10KProjectile",random(-4,4),0,-26,58)
	TNT1 A 0 A_JumpIfInventory("Loop",10,1)
	Goto Fire5+6
	TNT1 A 0 A_TakeInventory("Loop",99)
    Fire5Loop1:
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 2
    LGC0 D 2 Bright A_FireCustomMissile("PlayerLegendary10KProjectile",random(-4,4),0,-26,58)
	TNT1 A 0 A_JumpIfInventory("Loop",10,1)
	Goto Fire5Loop1
	TNT1 A 0 A_TakeInventory("Loop",99)
	LGC0 ABC 2 Bright 
	LGC0 D 1 Bright A_FireCustomMissile("PlayerLegendary10KProjectile",random(-4,4),0,-26,58)
	LGC0 ABC 2 Bright 
	LGC0 D 1 Bright A_FireCustomMissile("PlayerLegendary10KProjectile",random(-4,4),0,-26,58)
	LGC0 ABC 2 Bright 
	LGC0 D 1 Bright A_FireCustomMissile("PlayerLegendary10KProjectile",random(-4,4),0,-26,58)
	LGC0 ABC 2 Bright 
	LGC0 D 1 Bright A_FireCustomMissile("PlayerLegendary10KProjectile",random(-4,4),0,-26,58)
	LGC0 ABC 2 Bright 
	LGC0 D 1 Bright A_FireCustomMissile("PlayerLegendary10KProjectile",random(-4,4),0,-26,58)
	LGC0 CBA 10 Bright A_PlaySound("weapons/bfg15kcooldown",CHAN_AUTO)
    Goto Ready	
  Fire6:
    LVRD D 0 A_GiveInventory("LegendaryCyberDemonMissileType7")
	LVRD D 0 A_GunFlash	
    TNT1 A 0 A_Changeflag(reflective,1)
    TNT1 A 0 A_PlaySound("weapons/charge15k")
	LGC0 ABC 9 Bright 
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 3 Bright 
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	LGC0 D 3 Bright A_FireCustomMissile("	",random(-4,4),0,-26,58)	
	TNT1 A 0 A_JumpIfInventory("Loop",10,1)
	Goto Fire6+7
	TNT1 A 0 A_TakeInventory("Loop",99)
	Fire6Loop1:
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 2 Bright 
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	LGC0 D 2 Bright A_FireCustomMissile("PlayerLegCybDTBFGBall",random(-4,4),0,-26,58)	
	TNT1 A 0 A_JumpIfInventory("Loop",6,1)
	Goto Fire6Loop1
	TNT1 A 0 A_TakeInventory("Loop",99)
	Fire6Loop2:
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 1 Bright 
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	LGC0 D 1 Bright A_FireCustomMissile("PlayerLegCybDTBFGBall",random(-4,4),0,-26,58)	
	TNT1 A 0 A_JumpIfInventory("Loop",31,1)
	Goto Fire6Loop2
	TNT1 A 0 A_TakeInventory("Loop",99)	
	LGC0 CBA 10 Bright A_PlaySound("weapons/bfg15kcooldown",CHAN_AUTO)
	TNT1 A 0 A_Changeflag(reflective,0)
    Goto Ready
  Fire7:
    LVRD D 0 A_GiveInventory("LegendaryCyberDemonMissileType7")
	LVRD D 0 A_GunFlash	
	TNT1 A 0 A_PlaySound("weapons/rgcharge")
	TNT1 A 0 A_Changeflag(reflective,1)
    LGC0 ABC 8 
	LGC0 ABC 5 Bright 
    LGC0 D 10 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 5 Bright 
    LGC0 D 10 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 8 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 6 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 4 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 4 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 4 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 4 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 2 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 2 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 2 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 2 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	Fire7Loop:
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 1 Bright 
    LGC0 D 1 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	TNT1 A 0 A_JumpIfInventory("Loop",12,1)
	Goto Fire7Loop
	LGC0 CBA 15 Bright
	TNT1 A 0 A_Changeflag(reflective,0)
    Goto Ready	
   Fire8:
    LVRD D 0 A_GiveInventory("LegendaryCyberDemonMissileType7")
	LVRD D 0 A_GunFlash	
	TNT1 A 0 A_PlaySound("weapons/rgcharge")
	TNT1 A 0 A_Changeflag(reflective,1)
    LGC0 ABC 8 
	LGC0 ABC 5 Bright 
    LGC0 D 10 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 5 Bright 
    LGC0 D 10 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 8 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 6 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 4 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 4 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 4 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 4 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 3 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 2 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 2 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 2 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	LGC0 ABC 2 Bright 
    LGC0 D 2 Bright A_FireCustomMissile("PlayerCyberLegendaryProjectile",random(-2,3),0,-26,58)
	Fire7Loop:
	TNT1 A 0 A_GiveInventory("Loop",1)
	LGC0 ABC 1 Bright 
    LGC0 D 1 Bright A_FireCustomMissile("PlayerLegendaryCyberBFG15KBall",random(-2,3),0,-26,58)
	TNT1 A 0 A_JumpIfInventory("Loop",12,1)
	Goto Fire7Loop
	LGC0 CBA 15 Bright
	TNT1 A 0 A_Changeflag(reflective,0)
   Fire9:
    TNT1 A 0 A_PlaySound("monster/laugh")
    LVRD D 0 A_GiveInventory("HFMissileType9")
	LGC0 A 28 Bright 
	LGC0 BC 4 Bright   
	TNT1 A 0 A_PlaySound("weapons/PCNNF")
    LGC0 D 4 Bright A_FireCustomMissile("PlayerCyberGuruBall",0,0,-26,58)
	LGC0 AAA 20 Bright 
   Goto Ready
   Fire10:
    TNT1 A 0 A_PlaySound("monster/laugh2")
    LVRD D 0 A_GiveInventory("HFMissileType10")
	LGC0 A 48 Bright 
	LGC0 BC 4 Bright   
	TNT1 A 0 A_PlaySound("weapons/PCNNF")
    LGC0 D 4 Bright A_FireCustomMissile("PlayerLegendaryBomb",0,0,-26,58)
	LGC0 AAA 20 Bright 
   Goto Ready
  AltFire:
    LGC0 A 0
  	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",10,3)
	LGC0 A 0 A_GiveInventory("CYBRbWeapType",1)
	LGC0 A 0 A_Jump(256,2)
	LGC0 A 0 A_TakeInventory("CYBRbWeapType",10)
	LGC0 A 0
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",10,"Select10")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",9,"Select9")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",8,"Select8")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",7,"Select7")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",6,"Select6")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",5,"Select5")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",4,"Select4")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",3,"Select3")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",2,"Select2")
	LGC0 A 0 A_JumpIfInventory("CYBRbWeapType",1,"Select1")
	LGC0 A 1 Bright
	LGC0 A 1 Bright A_Jump(256,"Select0")
	Goto Ready
  Select0:
    LGC0 A 1 Bright A_Print("\c[z3]Rocket\c-")
    Goto AltDone	
  Select1:
    LGC0 A 1 Bright A_Print("\c[z3]Stomp\c-")
    Goto AltDone
  Select2:
    LGC0 A 1 Bright A_Print("\c[z3]Railgun\c-")
    Goto AltDone
  Select3:
    LGC0 A 1 Bright A_Print("\c[z3]Devastator\c-")
    Goto AltDone
  Select4:
    LGC0 A 1 Bright A_Print("\c[z3]BFG10K\c-")
    Goto AltDone
  Select5:
    LGC0 A 1 Bright A_Print("\c[z3]DTBFG\c-")
    Goto AltDone
  Select6:
    LGC0 A 1 Bright A_Print("\c[z3]BFG15K\c-")
    Goto AltDone
  Select7:
    LGC0 A 1 Bright A_Print("\c[z3]Legendary Tech\c-")
    Goto AltDone	
  Select8:
    LGC0 A 1 Bright A_Print("\c[z3]Leg Rev Ball\c-")
    Goto AltDone
  Select9:
    LGC0 A 1 Bright A_Print("\c[z3]BFG\c-")
    Goto AltDone
  Select10:
    LGC0 A 1 Bright A_Print("\c[z3]Legendary Plasmatic Bomb\c-") //I'm sure people will use this attack lol
    Goto AltDone	
  AltDone:
	LGC0 A 12 Bright
    Goto Ready
  }
}



ACTOR PlayerLegendaryRocket : LegendaryRocket
{
	Speed 38
	FastSpeed 58
	Scale 0.9
	DECAL LegRocketScorch
	DamageType "Legendary"
	Species "Player"
	SeeSound "true/fire"
	-THRUSPECIES
    +NOTIMEFREEZE
	-SEEKERMISSILE
	States
	{
	Spawn:
        TNT1 A 0 Bright A_CustomMissile("MissileTrail",Random(4,6),Random(-2,2))
		LROC A 2 Bright A_CustomMissile("ProjectileTrailParticleOrange",Random(4,6),Random(-2,2))
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",Random(4,6),Random(-2,2))	
		LROC B 2 Bright A_CustomMissile("ProjectileTrailParticleOrange",Random(4,6),Random(-2,2))
		Loop
	Death:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
		TNT1 AAA 0 A_CustomMissile("BlueKaboom3", 0, 0, random(0,360), 2, random(0,360))
		TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX2", 0, 0, random(0,360), 2, random(0,360))
		TNT1 AAAA 0 A_SpawnItemEx("LegendaryDebris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
		LROC B 6 Bright A_Explode
		LROC CD 5 Bright A_SetTranslucent(0.75,1)
		Stop
	}
}

ACTOR PlayerLegendaryCyberRail : LegendaryCyberRail
{
Radius 6
Height 6
Speed 300
DamageType "Legendary"
Damage (Random(65,85))
Scale 1.26
SeeSound "monsters/darkcyberrail"
MissileType "LegendaryCyberRailTrail"
Species "Player"
DeathSound "cyberrail/impact"
+RIPPER
+THRUSPECIES
+EXTREMEDEATH
+BLOODLESSIMPACT
+NOTIMEFREEZE
States
{
Spawn:
    DCRP A 1 Bright
    Loop
Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveGold", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 AAAA 0 A_CustomMissile("KaboomGold2", 0, 0, random(0,360), 2, random(0,360))	
	TNT1 A 1 A_SpawnItem("RailGunImpactEffectGold")
	Stop
	}
}

ACTOR PlayerLegendaryStomp
{
    Species "Cybers"
	DamageType "Legendary"
	Species "Player"
	Obituary "uh oh f*ck"
	Speed 0
	Height 20
	Radius 20
	Damage (0)
	Projectile
	+DONTHARMSPECIES
	+THRUSPECIES
	+DONTBLAST
	+NOBLOCKMAP
	+NOGRAVITY
	+FORCERADIUSDMG
	-TELESTOMP
	States
	{
	Spawn:
	TNT1 A 0
	TNT1 A 1 A_Explode(random(300,400), 300, 0,0,random(300,400))
	Stop
  }
}

ACTOR PlayerLegCybDevastatorBall : LegCybDevastatorBall
{
Radius 16
Height 16
Damage 1050
Speed 19
Alpha 0.95
Scale 0.7
RENDERSTYLE Translucent
Species "Player"
DamageType "Legendary"
Alpha 0.85
PROJECTILE
+FORCERADIUSDMG
+FORCEXYBILLBOARD
+EXTREMEDEATH
+SKYEXPLODE
+MTHRUSPECIES
+NOTIMEFREEZE
States
{
Spawn:
    TNT1 A 0
	TNT1 A 0 A_Jump(128,"DTBFGSFX")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("devastator/fly","Voice",1)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
    LGS2 A 1 Bright A_SpawnItemEx("ProjectileTrailParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	LGS2 AAA 0 Bright A_CustomMissile("LegCybLiteShot",0,0,Random(0,360))
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	LGS2 B 1 Bright A_SpawnItemEx("ProjectileTrailParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	LGS2 C 1 Bright A_SpawnItemEx("ProjectileTrailParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	LGS2 CCC 0 Bright A_CustomMissile("LegCybLiteShot",0,0,Random(0,360))
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_CustomMissile("LegDevastatorTrail",0,0,0,CMF_AIMDIRECTION|CMF_TRACKOWNER,0)
	LGS2 D 1 Bright A_SpawnItemEx("ProjectileTrailParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    Loop
DTBFGSFX:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("devastator/fly","Voice",1)
	TNT1 A 0 A_Explode(32,450,0)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGold",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    LGS2 A 1 Bright A_SpawnItemEx("ProjectileTrailParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	LGS2 A 1 Bright A_CustomMissile("LegCybDTBFGProjectileAttack",Random(-10,10),0,0,CMF_TRACKOWNER)
	TNT1 A 0 A_Explode(32,450,0)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGold2",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    LGS2 B 1 Bright A_SpawnItemEx("ProjectileTrailParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	LGS2 A 1 Bright A_CustomMissile("LegCybDTBFGProjectileAttack",Random(-10,10),0,0,CMF_TRACKOWNER)
	TNT1 A 0 A_Explode(32,450,0)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGold",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    LGS2 C 1 Bright A_SpawnItemEx("ProjectileTrailParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	LGS2 A 1 Bright A_CustomMissile("LegCybDTBFGProjectileAttack",Random(-10,10),0,0,CMF_TRACKOWNER)
	TNT1 A 0 A_Explode(32,450,0)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGold2",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
	TNT1 A 0 A_CustomMissile("LegDevastatorTrail",0,0,0,CMF_AIMDIRECTION|CMF_TRACKOWNER,0)
    LGS2 D 1 Bright A_SpawnItemEx("ProjectileTrailParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	LGS2 A 1 Bright A_CustomMissile("LegCybDTBFGProjectileAttack",Random(-10,10),0,0,CMF_TRACKOWNER)
    Goto Spawn
Death:
    TNT1 A 0
	TNT1 A 0 A_SetTranslucent(0.75,1)
	TNT1 A 0 Radius_Quake(3,35,0,10,0)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,0,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,10,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,20,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,30,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,40,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,50,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,60,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,70,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,80,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,90,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,100,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,110,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,120,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,130,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,140,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,150,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,160,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,170,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,180,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,190,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,200,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,210,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,220,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,230,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,240,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,250,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,260,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,270,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,280,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,290,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,300,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,310,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,320,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,330,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,340,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("LegAnniDTBFGTracer",0,0,350,CMF_TRACKOWNER)	
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGoldSpawner",0,0,0,0,0,0,0,128)	
	TNT1 A 0 A_Explode(80,256)
	LGS2 A 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 B 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 C 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 D 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 A 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 B 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 C 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 D 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 A 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 B 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 C 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	LGS2 D 6 Bright A_SpawnItemEx("LegDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(128,1024,0)
	TNT1 A 0 A_Explode(460,640,0)
	TNT1 A 0 A_Explode(618,256)
	TNT1 A 0 A_StopSoundEx("Voice")
	TNT1 A 0 Radius_Quake(20,12,0,12,0)
	TNT1 A 0 A_PlaySound("weapons/dtech10kexplode")
	TNT1 A 0 A_SpawnItemEx("LegDevastatorShockWave2",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_SpawnItem("LegAnniDTBFGEx",0,-10)
	LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,18,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,36,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,54,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,72,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,90,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,108,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,126,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,144,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,144,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,162,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,180,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,196,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,216,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,234,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,252,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,270,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,288,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,306,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,324,2)
    LGE1 D 0 Bright A_CustomMissile("LegCybDevastatorBall2",0,0,342,2)
	LGE1 AAAAAABBBBBBCCCCCCDDDDDD 1 A_CustomMissile("LegKaboomDevastator22",0,0,random(0,360),2,random(0,360))
    LGE1 EF 6 Bright
    Stop    
    }
}

ACTOR PlayerLegendary10KProjectile : Legendary10KProjectile
{
   Height 1
   Radius 1
   Speed 200
   Scale 0.15
   RenderStyle Add
   Alpha 0.85
   DECAL BFG9500LightningGold
   PROJECTILE
   -THRUSPECIES
   +NOEXTREMEDEATH
   -MTHRUSPECIES
   +NOTIMEFREEZE
   DeathSound "weapons/bfg95explode"
   Species "Player"
   DamageType "Legendary"
   States
   {
   Spawn:
      LRAC A 1 Bright
      Loop
   Death:
   XDeath:  
      TNT1 A 0
      TNT1 A 1 A_SpawnItem("PlayerLegCyber10KEx")
      Stop
	  }
}

ACTOR PlayerLegCyber10KEx : LegCyber10KEx
{
  Radius 11
  Height 8
  DamageType "Legendary"
  Species "Player"
  Damage 150
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT 
  +FORCERADIUSDMG
  -MTHRUSPECIES
  -THRUSPECIES
  +NOTIMEFREEZE
  Renderstyle Add
  Alpha 0.75
  Scale 0.85
  States
  {
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveGold", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AA 0 A_SpawnItemEx("LegendaryGoldParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 AAAA 0 A_CustomMissile("KaboomGold2", 0, 0, random(0,360), 2, random(0,360))
    LFE1 A 4 Bright A_Detonate
    LFE1 BCDEF 4 Bright
    Stop
  }
}

ACTOR PlayerLegCybDTBFGBall : LegCybDTBFGBall
{
Obituary "%o wasn't ready for the wrath of the Legendary Cyberdemon!"
DamageType "Legendary"
Species "Player"
States
{
Spawn:
    TNT1 A 0
	TNT1 A 0 A_Jump(128,"DTBFGSFX")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("weapons/dtech10kball","Voice",1)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    LGS1 A 1 Bright A_SpawnItemEx("LegCybDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    LGS1 B 1 Bright A_SpawnItemEx("LegCybDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    LGS1 C 1 Bright A_SpawnItemEx("LegCybDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    LGS1 D 1 Bright A_SpawnItemEx("LegCybDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    Loop
DTBFGSFX:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("weapons/dtech10kball","Voice",1)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGold",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    LGS1 A 1 Bright A_SpawnItemEx("LegCybDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGold2",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    LGS1 B 1 Bright A_SpawnItemEx("LegCybDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGold",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    LGS1 C 1 Bright A_SpawnItemEx("LegCybDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGold2",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    LGS1 D 1 Bright A_SpawnItemEx("LegCybDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    Goto Spawn   
Death:
    TNT1 A 0
	TNT1 A 0 A_SetTranslucent(0.75,1)
	TNT1 A 0 Radius_Quake(5,60,0,10,0)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,0,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,10,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,20,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,30,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,40,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,50,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,60,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,70,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,80,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,90,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,100,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,110,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,120,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,130,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,140,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,150,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,160,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,170,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,180,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,190,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,200,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,210,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,220,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,230,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,240,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,250,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,260,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,270,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,280,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,290,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,300,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,310,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,320,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,330,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,340,CMF_TRACKOWNER)
	TNT1 A 0 Bright A_CustomMissile("LegAnniDTBFGTracer",0,0,350,CMF_TRACKOWNER)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGoldSpawner", 0, 0, 15, 0, 0, 0, 0, 128)	
	LGS1 ABCD 6 Bright A_SpawnItemEx("DTech10KShockwaveGold", 0, 0, 15, 0, 0, 0, 0, 128)
	TNT1 A 0 A_Explode(480,240)
	TNT1 A 0 A_StopSoundEx("Voice")
	TNT1 A 0 Radius_Quake(15,20,0,20,0)
	TNT1 A 0 A_PlaySound("weapons/dtech10kexplode")
	TNT1 A 0 A_SpawnItemEx("DTech10KShockwaveGold1", 0, 0, 15, 0, 0, 0, 0, 128)
    TNT1 A 20 Bright A_SpawnItem("LegAnniDTBFGEx",0,-10)
    Stop    
	}
}

ACTOR PlayerLegendaryCyberBFG15KBall : LegendaryCyberBFG15KBall
{
Height 15
Radius 15
Decal LegBFG15K
Speed 45
Damage 25
DamageType "Legendary"
Species "Player"
Scale 0.5
-MTHRUSPECIES
-THRUSPECIES
+FORCERADIUSDMG
+NOTIMEFREEZE
ExplosionDamage 110
ExplosionRadius 165
SeeSound "weapons/bfg15kfire"
DeathSound "weapons/bfg95explode"
States
{
Spawn:
    LFS1 AB 2 Bright A_SpawnItemEx("BFGTrailParticleGold",Random(-8,8),Random(-8,8),Random(-8,8),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
    Loop
Death:
	TNT1 A 0
    TNT1 A 0 A_SpawnItemEx("BFGShockwaveGold", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 A 0 A_SpawnItemEx("LegendaryGoldParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
	TNT1 AAA 0 A_CustomMissile("KaboomGold2", 0, 0, random(0,360), 2, random(0,360))      
    LFE1 A 4 Bright A_Explode	
    LFE1 BCDEF 4 Bright
    Stop
    }
}

ACTOR PlayerCyberLegendaryProjectile : CyberLegendaryProjectile { }

Actor PlayerLegRevBall : LegRevBall
{
    Radius 8
    Height 8
    Speed 42
    Damage 5
    Scale 1.5
    PROJECTILE
    RENDERSTYLE ADD
    +SPAWNSOUNDSOURCE
	+SEEKERMISSILE
    +NOTIMEFREEZE
    ALPHA 0.8
    SeeSound "lrball1/shot"
    DeathSound "lrball1/exp"
    Damagetype "Legendary"
	Species "Player"
    Decal CacoScorch
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128,"Homing")	
    Normal:
        LRB1 ABCD 2 A_CustomMissile("LegRevBallFX",0,0,0,0)
        Loop
    Homing:
	    TNT1 A 0 A_SeekerMissile(15,0)
        LRB1 A 2 A_CustomMissile("LegRevBallFX",0,0,0,0)
	    TNT1 A 0 A_SeekerMissile(15,0)
        LRB1 B 2 A_CustomMissile("LegRevBallFX",0,0,0,0)
	    TNT1 A 0 A_SeekerMissile(15,0)
        LRB1 C 2 A_CustomMissile("LegRevBallFX",0,0,0,0)
	    TNT1 A 0 A_SeekerMissile(15,0)
        LRB1 D 2 A_CustomMissile("LegRevBallFX",0,0,0,0)		
        Loop	
    Death:
	    LRB1 ABCD 4 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 AAA 0 A_CustomMissile("LegendaryKaboom6", 0, 0, random(0,360), 2, random(0,360))
	    TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX4", 0, 0, random(0,360), 2, random(0,360))	
        LRB1 EFGHIJKLMNO 3
        Stop
    }
}

ACTOR PlayerCyberGuruBall : CyberGuruBall
{
  Radius 11
  Height 6
  Speed 15
  DamageType "Legendary"
  Species "Player"
  Damage 500 //125 lol
  Projectile
  Renderstyle Add
  +FORCERADIUSDMG
  +FOILINVUL
  +RIPPER
  +BLOODLESSIMPACT
  +DONTBLAST
  +THRUSPECIES
  +SKYEXPLODE
  Scale 0.25
  MissileType "GuruLesserProjectileTrail"
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_Jump(128,"LEGBFGSFX")
	TNT1 A 0 A_PlaySound("Weapons/GuruFly",5,1.0,1)
	TNT1 A 0 A_Explode(600,64,0,1)
	YBAL AAA 0 Bright A_CustomMissile("LegCybLiteShot",0,0,Random(0,360))
	TNT1 A 0 A_SpawnItemEx("GuruTrailSpark",random(28,-28),random(28,-28),random(28,-28),0,0,0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("GuruTrail",-3,0,0,0,0,0,0,0,0)
	YBAL A 1 bright
	loop
  LEGBFGSFX:
    TNT1 A 0 A_SpawnItemEx("GuruTrailSpark",random(28,-28),random(28,-28),random(28,-28),0,0,0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("GuruTrail",-3,0,0,0,0,0,0,0,0)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	YBAL A 1 Bright A_SpawnItemEx("CyberPlayerDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("GuruTrailSpark",random(28,-28),random(28,-28),random(28,-28),0,0,0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("GuruTrail",-3,0,0,0,0,0,0,0,0)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	YBAL A 1 Bright A_SpawnItemEx("CyberPlayerDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("GuruTrailSpark",random(28,-28),random(28,-28),random(28,-28),0,0,0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("GuruTrail",-3,0,0,0,0,0,0,0,0)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	YBAL A 1 Bright A_SpawnItemEx("CyberPlayerDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("GuruTrailSpark",random(28,-28),random(28,-28),random(28,-28),0,0,0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("GuruTrail",-3,0,0,0,0,0,0,0,0)
	TNT1 A 0 A_CustomMissile("LegCybDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	YBAL A 1 Bright A_SpawnItemEx("CyberPlayerDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    Goto Spawn
  Death:
	TNT1 A 0 A_PlaySound("Weapons/GuruBlast3",5)
	//COLLATERAL DAMAGE EFFECTS
	TNT1 A 0 A_Explode(6000,486,0,1)
	TNT1 A 0 A_BFGSpray("GuruSpray",15,20)

	//IMPACT STUFF
	TNT1 A 0 A_SpawnItemEx("GuruStruckGlowX",0,0,10,0,0,0,0,128,0)
	TNT1 A 0 A_SpawnItemEx("GuruStruckGlowY",0,0,10,0,0,0,0,128,0)
	TNT1 AAAAAAAAAAA 0 A_SpawnItemEx("CyberGuruSphereSmoke",random(126,-126),random(126,-126),random(66,-66),0.00001*random(100000,-100000),0.00001*random(100000,-100000),0.00001*random(100000,-100000),random(0,359),0,0)
	TNT1 AAAAAAAAAAA 0 A_SpawnItemEx("GuruChunkSpark",random(126,-126),random(126,-126),random(66,-66),0,0,0,0,0,0)
	TNT1 AAAAAAAAAAAAAAAAAAA 2 A_SpawnItemEx("GuruChunkSpark",random(126,-126),random(126,-126),random(66,-66),0,0,0,0,0,0)
	Stop
  }
}

ACTOR PlayerCyberDTBFGProjectileAttack : CyberPlayerDTBFGProjectileAttack //umm huh?
{
PROJECTILE
+LOOKALLAROUND
+ISMONSTER
+QUICKTORETALIATE
+NOTARGET
+NOCLIP
+NOTIMEFREEZE
Obituary "%o couldn't handle the wrath of the Legendary Cyberdemon!"
Species "Player"
DamageType "Legendary"
MissileType "SentientDTBFGRailgunSlug"
States
{
Spawn:
    TNT1 A 0
	TNT1 AAAAA 1 A_Look
	Stop
See:
    TNT1 A 0
	TNT1 A 1 A_JumpIfCloser(1250,"Attack")
	Stop
Attack:
    TNT1 A 0
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_MissileAttack
	TNT1 A 1 A_CustomRailgun(-1,0,NONE,"Yellow",1,1,1)
	Goto Death	
Death:
	TNT1 A 1
	Stop
	}
}

ACTOR PlayerLegendaryBomb : LegendaryBomb
{
  Radius 11
  Height 6
  Speed 15 // 10
  DamageType "Legendary"
  Species "Player"
  Damage 300 // 150
  Projectile
  RenderStyle Add
  +FORCERADIUSDMG
  +FOILINVUL
  +RIPPER
  +BLOODLESSIMPACT
  //+DONTBLAST
  -RANDOMIZE
  +NOTIMEFREEZE
  Scale 1.0
  Alpha 1.0
  MissileType "ArcLesserProjectileTrail"
  SeeSound "Arcradimus/BFGFire"
  States
  {
  Spawn:
    // Gold
	TNT1 A 0
	TNT1 A 0 A_Explode(600,192,0,1)
	TNT1 A 0 A_SpawnItemEx("LegBombTrail",5,0,0,0,0,0,0,0,0)
    TNT1 A 0 A_Jump(224, 2)
	TNT1 A 0 A_SpawnItemEx("LegendaryBombFluxShockwave",0,0,0,10,0,0,0,0,0)
    TNT1 A 0 A_Jump(16, 2)
    TNT1 A 0 A_SpawnItemEx("ArcBallLightningBolt4",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
    // Blue
	//TNT1 A 0 A_PlaySound("Weapons/GuruFly",5,1.0,1)
	TNT1 A 0 A_Explode(600,192,0,1)
	TNT1 A 0 A_SpawnItemEx("LegBombTrail",5,0,0,0,0,0,0,0,0)
    TNT1 A 0 A_Jump(224, 2)
	TNT1 A 0 A_SpawnItemEx("LegendaryBombFluxShockwave",0,0,0,10,0,0,0,0,0)
    TNT1 A 0 A_Jump(16, 2)
    TNT1 A 0 A_SpawnItemEx("ArcBallLightningBolt4",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
    // Gold
	//TNT1 A 0 A_PlaySound("Weapons/GuruFly",5,1.0,1)
	TNT1 A 0 A_Explode(600,192,0,1)
	TNT1 A 0 A_SpawnItemEx("LegBombTrail",5,0,0,0,0,0,0,0,0)
    TNT1 A 0 A_Jump(224, 2)
	TNT1 A 0 A_SpawnItemEx("LegendaryBombFluxShockwave",0,0,0,10,0,0,0,0,0)
    TNT1 A 0 A_Jump(16, 2)
    TNT1 A 0 A_SpawnItemEx("ArcBallLightningBolt4",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
     // Blue
	//TNT1 A 0 A_PlaySound("Weapons/GuruFly",5,1.0,1)
	TNT1 A 0 A_Explode(600,192,0,1)
	TNT1 A 0 A_SpawnItemEx("LegBombTrail",5,0,0,0,0,0,0,0,0)
    TNT1 A 0 A_Jump(224, 2)
	TNT1 A 0 A_SpawnItemEx("LegendaryBombFluxShockwave",0,0,0,10,0,0,0,0,0)
    TNT1 A 0 A_Jump(16, 2)
    TNT1 A 0 A_SpawnItemEx("ArcBallLightningBolt4",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
    // Gold
	//TNT1 A 0 A_PlaySound("Weapons/GuruFly",5,1.0,1)
	TNT1 A 0 A_Explode(600,192,0,1)
	TNT1 A 0 A_SpawnItemEx("LegBombTrail",5,0,0,0,0,0,0,0,0)
    TNT1 A 0 A_Jump(224, 2)
	TNT1 A 0 A_SpawnItemEx("LegendaryBombFluxShockwave",0,0,0,10,0,0,0,0,0)
    TNT1 A 0 A_Jump(16, 2)
    TNT1 A 0 A_SpawnItemEx("ArcBallLightningBolt4",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
    TNT1 A 0 A_SpawnItemEx("LCABFGTrailParticleGold",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
	Loop
  Death:
	//COLLATERAL DAMAGE EFFECTS
	TNT1 A 0
	TNT1 A 0 A_StopSound(5)
	TNT1 A 0 A_SpawnItem("LegendaryNuke2")
	TNT1 A 0 A_Explode(6000,512,0,1)
	TNT1 A 0 A_BFGSpray("ArcSpray",15,20)
	//IMPACT STUFF
	TNT1 A 0 A_SpawnItemEx("ArcStruckGlowX",0,0,10,0,0,0,0,128,0)
	TNT1 A 0 A_SpawnItemEx("ArcStruckGlowY",0,0,10,0,0,0,0,128,0)
	//TNT1 AAAAAAAAAAA 0 A_SpawnItemEx("ArcSphereSmoke",random(126,-126),random(126,-126),random(66,-66),0.00001*random(100000,-100000),0.00001*random(100000,-100000),0.00001*random(100000,-100000),random(0,359),0,0)
	//TNT1 AAAAAAAAAAA 0 A_SpawnItemEx("ArcChunkSpark",random(126,-126),random(126,-126),random(66,-66),0,0,0,0,0,0)
	//TNT1 AAAAAAAAAAAAAAAAAAA 2 A_SpawnItemEx("ArcChunkSpark",random(126,-126),random(126,-126),random(66,-66),0,0,0,0,0,0)
	Stop
  }
}

ACTOR PlayerLegBombTrail : LegBombTrail
{
    DamageType "Legendary"
    Species "Player"
	Alpha 0.50
	Renderstyle Add
	+CLIENTSIDEONLY
    +NOTIMEFREEZE
	Scale 0.90
	States
	{
	Spawn:
	 TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
	TNT1 A 0 A_SetScale(ScaleX -0.01, ScaleY -0.01)
	UBAL BDBDB 1 Bright A_FadeOut(0.05)
	Loop
  Toaster:
    TNT1 A 0
	Stop		
	}
}

ACTOR PlayerLegendaryBombShockwave : LegendaryBombShockwave
{
  DamageType "Legendary"
  Species "Player"
  +NOTIMEFREEZE
  +CLIENTSIDEONLY
  States
  {
    Spawn:
		 TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
      HBRY A 1 Bright A_FadeOut(0.04)
      HBRB B 1 Bright A_FadeOut(0.04)
      HBRY C 1 Bright A_FadeOut(0.04)
      HBRB D 1 Bright A_FadeOut(0.04)
      HBRY E 1 Bright A_FadeOut(0.04)
      HBRB F 1 Bright A_FadeOut(0.04)
      HBRY G 1 Bright A_FadeOut(0.04)
      HBRB H 1 Bright A_FadeOut(0.04)
      HBRY I 1 Bright A_FadeOut(0.04)
      HBRB J 1 Bright A_FadeOut(0.04)
      HBRY K 1 Bright A_FadeOut(0.04)
      HBRB L 1 Bright A_FadeOut(0.04)
      HBRY M 1 Bright A_FadeOut(0.04)
      HBRB N 1 Bright A_FadeOut(0.04)
      HBRY O 1 Bright A_FadeOut(0.04)
      HBRB P 1 Bright A_FadeOut(0.04)
      HBRY Q 1 Bright A_FadeOut(0.04)
      HBRB R 1 Bright A_FadeOut(0.04)
      Stop
  Toaster:
    TNT1 A 0
	Stop	  
  }
}

ACTOR PlayerLegendaryBombFluxShockwave : LegendaryBombFluxShockwave
{
  DamageType "Legendary"
  Species "Player"
  Scale 0.75
  Alpha 1.0
  Projectile
}

ACTOR PlayerLegendaryBombCharging : LegendaryBombCharging
{
  DamageType "Legendary"
  Species "Player"
  Speed 0
  -MISSILE
  -SOLID
  +THRUACTORS
  +NOINTERACTION
  +NOGRAVITY
  +NOBLOCKMAP
  +NOTELEPORT
  +NOCLIP
  +NONETID
  States
  {
  Spawn:
    // Gold
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",CHAN_BODY,1.0,False)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright A_FadeOut(0.01)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
    // Blue
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",CHAN_BODY,1.0,False)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright A_FadeOut(0.01)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
    // Gold
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",CHAN_BODY,1.0,False)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright A_FadeOut(0.01)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
    // Blue
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",CHAN_BODY,1.0,False)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright A_FadeOut(0.01)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
    // Gold
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",CHAN_BODY,1.0,False)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright A_FadeOut(0.01)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGOld",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
	Loop
  Death:
    TNT1 A 1
	Stop
  }
}

ACTOR PlayerLegendaryBombCharging1 : PlayerLegendaryBombCharging
{
  DamageType "Legendary"
  Species "Player"
  Scale 0.6
}

ACTOR PlayerLegendaryBombCharging2 : PlayerLegendaryBombCharging
{
  DamageType "Legendary"
  Species "Player"
  Scale 0.7
}

ACTOR PlayerLegendaryBombCharging3 : PlayerLegendaryBombCharging
{
  DamageType "Legendary"
  Species "Player"
  Scale 0.8
}

ACTOR PlayerLegendaryBombCharging4 : PlayerLegendaryBombCharging
{
  DamageType "Legendary"
  Species "Player"
  Scale 0.9
}

ACTOR PlayerLegendaryBombCharging5 : PlayerLegendaryBombCharging
{
  DamageType "Legendary"
  Species "Player"
  Scale 1.0
  States
  {
  Spawn:
    // Blue
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",CHAN_BODY,1.0,False)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright A_FadeOut(0.02)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
    // Gold
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",5,1.0,1)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright A_FadeOut(0.01)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
     // Blue
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",CHAN_BODY,1.0,False)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright A_FadeOut(0.02)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
    // Gold
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",5,1.0,1)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright A_FadeOut(0.01)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleGold",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL D 1 Bright
     // Blue
	TNT1 A 0 A_PlaySound("Arcradimus/BFGBall",CHAN_BODY,1.0,False)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright A_FadeOut(0.02)
    TNT1 A 0 A_SpawnItemEx("LCABFGChargeParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	UBAL B 1 Bright
	Loop

  }
}

ACTOR PlayerLegendaryCyberBFG15KBall : LegendaryCyberBFG15KBall
{
Height 15
Radius 15
Decal LegBFG15K
Speed 45
Damage 25
DamageType "Legendary"
Species "Player"
Scale 0.5
-MTHRUSPECIES
-THRUSPECIES
+FORCERADIUSDMG
+NOTIMEFREEZE
ExplosionDamage 110
ExplosionRadius 165
SeeSound "weapons/bfg15kfire"
DeathSound "weapons/bfg95explode"
States
{
Spawn:
    LFS1 AB 2 Bright A_SpawnItemEx("BFGTrailParticleGold",Random(-8,8),Random(-8,8),Random(-8,8),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
    Loop
Death:
	TNT1 A 0
    TNT1 A 0 A_SpawnItemEx("BFGShockwaveGold", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 A 0 A_SpawnItemEx("LegendaryGoldParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
	TNT1 AAA 0 A_CustomMissile("KaboomGold2", 0, 0, random(0,360), 2, random(0,360))      
    LFE1 A 4 Bright A_Explode	
    LFE1 BCDEF 4 Bright
    Stop
    }
}
