Actor SurvivalistFlamethrower : Weapon
{
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "You got the flamethrower! Time for a BBQ!"
  Obituary "%o was BBQed by %k's flamethrower."
  Weapon.AmmoType "SurvFlamethrowerFuel"
  Tag "FlameThrower"
   Inventory.RestrictedTo "SurvivalistClass"
  Weapon.AmmoUse 1
  Weapon.SlotNumber 8
  +Weapon.Explosive
  States
  {
  Spawn:
    FLMR A -1
    Loop
  Ready:
    FLRG AB 2 A_WeaponReady
    Loop
  Deselect:
    FLRG A 1 A_Lower
    Loop
  Select:
    FLRG A 1 A_Raise
    Loop
  Fire:
    FLRG C 0 bright A_GunFlash
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 0, Random(-4, 4), 0)
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLRG C 0 bright A_GunFlash
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 0, Random(-4, 4), 0)
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLRG C 0 bright A_GunFlash
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 0, Random(-4, 4), 0)
    FLRG C 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLRG C 2 bright A_ReFire
    Goto Ready
  Flash:
    FLRF A 2 A_Light1
    FLRF B 2 A_Light2
    FLRF C 1 A_Light1
    Stop
  }
}

Actor FTFire
{
  +FORCERADIUSDMG
  Radius 2
  Height 4
  Speed 16
  Damage 1
  Projectile
  RenderStyle Add
  DamageType Fire
  Alpha 0.67
  Scale 0.67
  SeeSound "Flamethrower/Fire"
  DeathSound "Flamethrower/Hit"
  States
  {
  Spawn:
    TNT1 A 2
    FRFX ABCD 2 bright A_Explode(5, 8, 0)
    TNT1 A 0 A_LowGravity
    FRFX EFG 2 bright A_Explode(5, 16, 0)
    FRFX HIJ 2 bright A_Explode(5, 32, 0)
    FRFX KLM 2 bright A_Explode(5, 64, 0)
    FRFX NO 2 bright
    Stop
  Death:
    FRFX HIJ 2 bright A_Explode(5, 32, 0)
    TNT1 A 0 A_CustomMissile("DropFireLA", 0, 0, 0, 4)
    FRFX KLM 2 bright A_Explode(5, 64, 0)
    FRFX NO 2 bright
    Stop
  }
}

Actor DropFireLA //limited audio
{
+FORCERADIUSDMG
Projectile
Radius 8
Height 40
RenderStyle Add
DamageType Fire
Alpha 0.90
-NOGRAVITY
Gravity 0.125
+NODAMAGETHRUST
-MISSILE
States
	{
	Spawn:
		FLME A 1 Bright NoDelay A_Playsound("Flamethrower/Flame/Limited",7,0.4,true)
		FLME A 1 Bright A_Explode(5,16,0)
		FLME BCDEFGHIJKLMN 2 Bright A_Explode(5,16,0)
		FLME A 1 Bright A_Playsound("Flamethrower/Flame/Limited",7,0.4,true)
		FLME A 1 Bright A_Explode(5,16,0)
		FLME BCDEFGHIJKLMN 2 Bright A_Explode(5,16,0)
		FLME A 1 Bright A_Playsound("Flamethrower/Flame/Limited",7,0.4,true)
		FLME A 1 Bright A_Explode(5,16,0)
		FLME BCDEFGHIJKLMN 2 Bright A_Explode(5,16,0)
		FLME A 1 Bright A_Playsound("Flamethrower/Flame/Limited",7,0.4,true)
		FLME A 1 Bright A_Explode(5,16,0)
		FLME BCDEFGHIJKLMN 2 Bright A_Explode(5,16,0)
		FLME A 1 Bright A_Playsound("Flamethrower/Flame/Limited",7,0.4,true)
		FLME A 1 Bright A_Explode(5,16,0)
		FLME BCDEFGHIJKLMN 2 Bright A_Explode(5,16,0)
		TNT1 A 0 A_Jump(192,"Death")
		Loop
	Death:
		FLME A 2 Bright A_SetScale(0.8)
		FLME B 2 Bright A_SetScale(0.6)
		FLME C 2 Bright A_SetScale(0.4)
		FLME D 2 Bright A_SetScale(0.2)
		TNT1 A 1 A_StopSound(7)
		Stop
	}
}

Actor SurvFlamethrowerFuel : Ammo
{
  Inventory.Amount 25
  Inventory.MaxAmount 300
  Ammo.BackpackAmount 50
  Ammo.BackpackMaxAmount 600
}