ACTOR "Enraged Legendary Behemoth Cannon" : Weapon 17592
{
//$Category Weapons/BFG20K
//$Sprite EBHCH0
//$Title "Enraged Legendary Behemoth Cannon"
+INVENTORY.UNDROPPABLE
   Weapon.Kickback 300
   Weapon.AmmoUse 4
   Weapon.AmmoGive 100
   Weapon.PreferredSkin "BehemothCannon-Marine"  
   Weapon.SelectionOrder 7955
   Scale 1
   Weapon.AmmoType "ILDemonAmmo"   
   Weapon.AmmoUse2 26
   Weapon.AmmoGive2 156
   Weapon.AmmoType2 "ILDemonAmmo"    
   Inventory.PickupMessage "Enraged Behemoth Cannon"
   Inventory.PickupSound "LegBeheCannon/up"
   Obituary "%o ate %k's Enraged Behemoth Cannon melting hot comets."
   Tag "Enraged Legendary Behemoth Cannon"
   Weapon.Upsound "LegBeheCannon/up"
   States
   {
	Spawn:
		EBHC H -1 
		Stop
	Ready:
		EBHC A 1 A_WeaponReady
		Loop
	Select:
		EBHC 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")
		EBHC A 1 A_Lower
		Loop
	Fire:	
		EBHC D 2 Bright
		EBHC E 2 Bright A_PlaySound("cannon/fire", CHAN_WEAPON, 1.0, 0)
		EBHC F 1 Bright A_FireCustomMissile("EnragedLegendaryComet")
		EBHC F 0 Bright A_FireCustomMissile("EnragedLegendaryComet", -2)
		EBHC F 0 Bright A_FireCustomMissile("EnragedLegendaryComet", 2)
		EBHC G 2 Bright
		EBHC C 4 Bright
		EBHC B 4 Bright
		EBHC A 4 Bright
		Goto Ready
	AltFire:	
		EBHC A 24 A_PlayWeaponSound("legendarycannon/charge")
	    TNT1 A 0 A_PlaySound ("legendarycannon/steam")
	    TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
		EBHC B 1
		EBHC C 1
		EBHC D 1
		EBHC E 1 A_PlayWeaponSound("lrball3/shot")
		EBHC F 2 A_FireCustomMissile("EnragedLegendaryBFGShot")
		EBHC FG 3
		EBHC CCC 5
		EBHC BB 5
		EBHC A 5
		Goto Ready		
	}
}	

ACTOR EnragedLegendaryComet : LegBehComet
{
Damage 85
Scale 1.2
Alpha 1.0
Speed 90
Species "Player"
DamageType "legendary"
+DONTHARMSPECIES
+FRIENDLY
+THRUSPECIES
+SEEKERMISSILE
+SCREENSEEKER
Renderstyle Normal
States
{
Spawn:
ENCM AAAAAABBBBBBCCCCCCDDDDDD 1 Bright A_SpawnItemEx("ELNCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
Fly:
TNT1 A 0 A_SeekerMissile(15,8,SMF_LOOK)
ENCM AAAAABBBBBB 1 Bright A_SpawnItemEx("ELNCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
TNT1 A 0 A_SeekerMissile(15,8,SMF_LOOK)
ENCM CCCCCCDDDDDD 1 Bright A_SpawnItemEx("ELNCometTail", 0, 0, 0, 0, 0, 0, 0, 128)
Loop
Death:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("RedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
TNT1 AAAA 0 A_SpawnItemEx("LegendaryDebris",0,0,Random(20,40),Random(4,-4),Random(4,-4),Random(4,8),0,128)
TNT1 AAA 0 A_CustomMissile("EKaboomLN", 0, 0, random(0,360), 2, random(0,360))	
TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX2", 0, 0, random(0,360), 2, random(0,360))
ENCM EFGHI 3 Bright
Stop
}
}
Actor EnragedLegendaryBFGShot : LegCyberBFG9500Ball 
{
Damage 550
Speed 40
Species "Player"
Decal BFG9500LightningRed
DamageType "legendary"
obituary "%o ate %k's Enraged Behemoth Cannon melting hot comets."
+DONTHARMSPECIES
+FRIENDLY
+THRUSPECIES
+EXTREMEDEATH
+FORCERADIUSDMG
+NOTIMEFREEZE
States
{
Spawn:
    EFS3 AAABBB 1 Bright A_SpawnItemEx("EBFGParticle",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    Loop
Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveRed2", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 AAAAAA 0 A_CustomMissile("Kaboom18", 0, 0, random(0,360), 2, random(0,360))
    EFE1 AB 8 Bright A_SpawnItemEx("RedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
    EFE1 C 8 Bright A_BFGSpray("CustomSprayILBC")
    EFE1 DEF 8 Bright
    Stop    
    }
}



ACTOR CustomSprayILBC : CustomSpray
{
damageType "legendary"
+NOTIMEFREEZE
States
{
Spawn:
   TNT1 A 0
   ERE2 A 6 Bright A_SpawnItemEx("RedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
   ERE2 BCD 6 Bright 
   Stop
   }
}

