Actor "FootballNuke" : Weapon
{
Tag "Football Nuke"
Weapon.SelectionOrder 7985
Weapon.KickBack 100
Weapon.AmmoType "LDemonAmmo"
Weapon.AmmoGive 100
Weapon.AmmoUse 50
Weapon.AmmoType2 "LDemonAmmo"
Weapon.AmmoUse2 50
Weapon.Upsound "legendarycannon/up"
Weapon.PreferredSkin "LegendaryCannon-Marine"
Inventory.PickupMessage "FootballNuke found, no one can challenge you now!"
Inventory.PickupSound "legendarycannon/up"
Obituary "%o got turned into a pile of gold and blue meat slime by %k's FootballNuke."
Decal DoomImpScorch
//+INVENTORY.UNDROPPABLE
States
{
  Spawn:
    SZAR A -1
    Loop
  Ready:
    SZAR 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_PlayWeaponSound("weapons/weapondown")
	SZAR A 0 A_Lower
    SZAR A 1 A_Lower
    Goto Deselect+4
  Select:
    SZAR A 0 A_Raise
    SZAR A 1 A_Raise
    Loop
  Fire:
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_PlaySound("Footballnuke/Fire")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	//TNT1 A 0 A_PlayWeaponSound("star/fire")
    SZAR B 2 Bright A_FireCustomMissile("FootBallNukeProjectile",0,1,0,0)
    SZAR ABA 2 Bright
	SZAR B 3
	SZAR A 3 A_Refire
    Goto Ready
  AltFire:
    TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	SZAR B 0 A_PlayWeaponSound("Footballnuke/Fire")
    SZAR A 1 Bright A_FireCustomMissile("FootBallNukeProjectile",0,1,0,0)
	SZAR A 2 Bright A_FaceTarget
	SZAR B 0 A_PlayWeaponSound("Footballnuke/Fire")
	SZAR A 2 Bright A_FaceTarget
    SZAR A 1 Bright A_FireCustomMissile("FootBallNukeProjectile",0,1,0,0)
	SZAR A 2 Bright A_FaceTarget
	SZAR B 0 A_PlayWeaponSound("Footballnuke/Fire")
	SZAR A 2 Bright A_FaceTarget
    SZAR A 1 Bright A_FireCustomMissile("FootBallNukeProjectile",0,1,0,0)
	SZAR A 2 Bright A_FaceTarget
	SZAR B 0 A_PlayWeaponSound("Footballnuke/Fire")
	SZAR A 2 Bright A_FaceTarget
    SZAR A 1 Bright A_FireCustomMissile("FootBallNukeProjectile",0,1,0,0)
    SZAR BAB 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam")
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
	SZAR ABABABABABABABABABABA 2 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
	SZAR A 1 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 FootBallNukeProjectile
{
Radius 8
Height 10
Speed 70
Damage 70
Scale 0.17
Projectile 
+SEEKERMISSILE 
+RANDOMIZE
+EXTREMEDEATH
+THRUSPECIES
+FORCERADIUSDMG
+NOTIMEFREEZE
DeathSound "UBALll3/exp"
Species "Player"
DamageType "Legendary"
RenderStyle Add
States
{
  Spawn:
    UBAL A 0
    UBAL A 0 A_SeekerMissile(15,8,SMF_LOOK)
	UBAL BD 1 bright A_SpawnItemEx("Footballnuketrail",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	UBAL DB 1 bright A_SpawnItemEx("LHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	UBAL A 0 A_SeekerMissile(1,8,SMF_LOOK)
	UBAL BD 1 bright A_SpawnItemEx("Footballnuketrail",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	UBAL DB 1 bright A_SpawnItemEx("BHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	UBAL A 0 A_SeekerMissile(15,8,SMF_LOOK)
	UBAL BD 1 bright A_SpawnItemEx("Footballnuketrail",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	UBAL DB 1 bright A_SpawnItemEx("LHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	UBAL A 0 A_SeekerMissile(15,8,SMF_LOOK)
	UBAL BD 1 bright A_SpawnItemEx("Footballnuketrail",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	UBAL DB 1 bright A_SpawnItemEx("BHellionSmokeSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
    loop
  Death:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
	TNT1 AAA 0 A_CustomMissile("Kaboom6", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("DeathBall2", 0, 0, random(0,360), 2, random(0,360))
    TNT1 I 8 bright A_Explode(64,80,0)
    TNT1 J 6 bright
    TNT1 K 4 bright
    Stop
  }
}

Actor Footballnuketrail
{
 +NOINTERACTION
 +CLIENTSIDEONLY
 +NOTIMEFREEZE
 RenderStyle Add
 Scale 0.15
 States
 {
  Spawn:
   TNT1 A 0
   TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
   TNT1 A 0 A_Jump(256,"Flash1","Flash2","Flash3","Flash4")
  Flash1:
   UBAL A 1 Bright A_FadeOut(0.125)
   Wait
  Flash2:
   UBAL B 1 Bright A_FadeOut(0.125)
   Wait
  Flash3:
   UBAL A 1 Bright A_FadeOut(0.125)
   Wait
  Flash4:
   UBAL B 1 Bright A_FadeOut(0.125)
   Wait
  Toaster:
    TNT1 A 0
	Stop   
 }
}