Actor TrueLegendaryPlasmaticCannonGiver : CustomInventory
{
  Scale 0.85
  Inventory.Amount 1
  Inventory.MaxAmount 0
  Inventory.InterHubAmount 0
  Inventory.PickupMessage "\c[z3]True Legendary Plasmatic Cannon\c-... From the depths of the U.A.C, you've finally recovered it..."
  Inventory.PickupSound "upgrade/pickup"
  Tag "True Legendary Plasmatic Cannon"
  States
  {
  Spawn:
    15LW A 0 NoDelay ACS_NamedExecuteWithResult("WeaponListCheck",9,1)
  SpawnLoop:
	15LW A -1
    Stop
  Pickup:
	TNT1 A 0 A_JumpIfInventory("True Legendary Plasmatic Cannon",1,"JustAmmo")
  All:
	TNT1 A 0 A_GiveInventory("True Legendary Plasmatic Cannon",1)
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryPlasmaticCannonGiverCheck",1,"HoldAndDestroy")
	TNT1 A 0 A_GiveInventory("TrueLegendaryPlasmaticCannonGiverCheck",1)
	TNT1 A 0 A_GiveInventory("EnragedLegendaryShotgunDrum",Random(8,16))
	TNT1 A 0 A_GiveInventory("EnragedLegendaryShell",8)
	Stop
  JustAmmo:
    TNT1 A 0 A_JumpIfInventory("TrueLegendaryPlasmaticCannonGiverCheck",1,"Null")
	TNT1 A 0 A_GiveInventory("TrueLegendaryPlasmaticCannonGiverCheck",1)
	TNT1 A 0 A_GiveInventory("EnragedLegendaryShotgunDrum",Random(8,16))
	TNT1 A 0 A_GiveInventory("EnragedLegendaryShell",8)
	TNT1 A 0 A_SpawnItemEx("True Legendary Plasmatic Cannon")
	Stop
  }
}

Actor TrueLegendaryPlasmaticCannonSpawnerGiver : TrueLegendaryPlasmaticCannonGiver
{
  Scale 0.85
  Inventory.Amount 1
  Inventory.MaxAmount 0
  Inventory.InterHubAmount 0
  Inventory.PickupMessage "\c[z3]True Legendary Plasmatic Cannon\c-... From the depths of the U.A.C, you've finally recovered it..."
  Inventory.PickupSound "upgrade/pickup"
  Tag "True Legendary Plasmatic Cannon"
  States
  {
  JustAmmo:
    TNT1 A 0 A_JumpIfInventory("TrueLegendaryPlasmaticCannonGiverCheck",1,"Null")
	TNT1 A 0 A_GiveInventory("TrueLegendaryPlasmaticCannonGiverCheck",1)
	TNT1 A 0 A_GiveInventory("EnragedLegendaryShotgunDrum",Random(8,16))
	TNT1 A 0 A_GiveInventory("EnragedLegendaryShell",8)
	Stop
  }
}

Actor TrueLegendaryPlasmaticCannonGiverCheck : Inventory { Inventory.Amount 1 Inventory.MaxAmount 1 Inventory.InterHubAmount 0 }



ACTOR "True Legendary Plasmatic Cannon" : Weapon 17860
{
//$Category Weapons/BFG20K
//$Sprite 15LWA0
//$Title "True Legendary Plasmatic Cannon"
+INVENTORY.UNDROPPABLE
  Scale 0.85
  Height 20
  Weapon.PreferredSkin "BFG10K-Marine"
  Weapon.AmmoType "TrueLegendaryCell"
  Weapon.AmmoUse 7
  Weapon.AmmoGive 225
  Inventory.PickupMessage "\c[z3]True Legendary Plasmatic Cannon\c-... From the depths of the U.A.C, you've finally recovered it..."
  Inventory.PickupSound "upgrade/pickup"
  Tag "True Legendary Plasmatic Cannon"
  Obituary "%k made a hole through %o's stomach with his... \c[z3]True Legendary Plasmatic Cannon\c-."
  Weapon.KickBack 67
Weapon.SlotNumber 0
  Weapon.SlotPriority 3.0
  +WEAPON.NOAUTOFIRE
  States
  {
  Spawn:
    15LW A 0 NoDelay ACS_NamedExecuteWithResult("WeaponListCheck",9,1)
  SpawnLoop:
    15LW A -1
    Stop
  Ready:
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryCell",7,1)
	Goto Ready2
	TNT1 A 0 A_PlayWeaponSound("weapons/bfg15kidle")
	15LC BCDEFGHIJJIHGFEDCB 2 A_Weaponready
	Loop
  Ready2:
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryCell",7,"Ready")
	15LD A 1 A_WeaponReady
	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_JumpIfNoAmmo("Deselect2")
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_Lower
	15LD A 1 A_Lower
	Goto Deselect+5	
  Deselect2:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_Lower
	15LD A 1 A_Lower
	Goto Deselect2+1		
   Select:
	TNT1 A 0 A_Playsound("weapons/pickup15k")
  SelectLoop:
	TNT1 A 0 A_Raise
	15LD A 1 A_Raise
	Loop	
  Fire:
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryCell",7,1)
	Goto Ready2
	15LF H 2 
	Goto Hold
  Hold:
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryCell",7,1)
	Goto Ready2
	15LF A 2 Bright A_GunFlash
	15LF B 1
	TNT1 A 0 A_PlaySound("weapons/Hbfg10kfire")
	15LF C 0 Radius_Quake(6,3,0,1,0)
	TNT1 A 0 A_TakeInventory("TrueLegendaryCell",7)
	15LF D 1 Bright A_FireCustomMissile("PlayerTrueLegendaryBFG15KBall",frandom(-1.0,1-0),0,0,0,0,frandom(-1.0,1-0))
	15LF E 1 A_Recoil(6)
	15LF FGH 1
	TNT1 A 0 A_ReFire
	15LC J 1 A_PlaySound("weapons/bfg15kcooldown") 
	15LC IHGFEDCB 3 
	Goto Ready
  Flash:
	TNT1 A 2 Bright A_Light1
	TNT1 A 2 Bright A_Light2
	TNT1 A 2 Bright A_Light1
	Goto LightDone
 }
}

ACTOR PlayerTrueLegendaryBFG15KBall
{
 Radius 6
 Height 8
 Speed 55
 FastSpeed 70
 Damage 100
 Projectile
 +FORCERADIUSDMG
 +RANDOMIZE
 +DONTREFLECT
 +FOILINVUL
 +NOTIMEFREEZE
 +EXTREMEDEATH
 +THRUSPECIES
 ExplosionDamage 180
 ExplosionRadius 165
 Species "Player"
 DamageType "TrueLegendaryDamage"
 RenderStyle Translucent
 Alpha 1
 Scale 0.2
 SeeSound "imp/attack"
 DeathSound "comet/explosion"
 Decal "Scorch"
 States
 {
  Spawn:
	TNT1 A 1
	TNT1 A 0 A_PlaySoundEx("true/fire2", 1, 0, 2)
	Goto Fly
  Fly:
	UBAL BF 1 BRIGHT A_SpawnItem("TrueLegendaryPlasmaballTrail")
	TNT1 A 0 A_SeekerMissile(0,2)
	TNT1 A 0 A_CustomMissile ("BHellionSmoke", 0, 0, random (0, 360), 2, random (10, 40))
	Loop
  Death:
	TNT1 A 0 A_Explode(180, 192)
	TNT1 A 0 A_SpawnItemEx("LCABaseScorch", 0, 0, 0, 0, 0, 0, Random(0,359))
	TNT1 AAAAAA 0 A_CustomMissile ("LegendaryBlueParticleSpawner", 0, 0, random (0, 360), 2, random (0, 180))
	TNT1 A 0 A_SpawnItemEx("LNCometDeath",0,0,0,0,0,0,0,128,0)
	EXPL A 0 Radius_Quake(15,20,0,20,0)
	BEXP B 0 BRIGHT A_Scream
	TNT1 A 0 A_AlertMonsters
	Stop
 }
}