////MasterOFMorag's UTNT Flamethrower from RealM667//
Actor Flamethrower1 : weapon //replaces PlasmaRifle
{
  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 "Cell"
  Weapon.AmmoGive 48
  Weapon.AmmoUse 1
  +Weapon.Explosive
  States
  {
  Spawn:
    WFLM A -1
    Loop
  Ready:
    FLMG BCD 3 A_WeaponReady
    Loop
  Deselect:
    FLMG A 1 A_Lower
    Loop
  Select:
    FLMG A 1 A_Raise
    Loop
  Fire:
    FLMG E 0 bright A_GunFlash
    FLMG E 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLMG F 1 bright A_FireCustomMissile("FTFire", 0, 0, Random(-4, 4), 0)
    FLMG G 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLMG E 0 bright A_GunFlash
    FLMG E 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLMG F 1 bright A_FireCustomMissile("FTFire", 0, 0, Random(-4, 4), 0)
    FLMG G 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLMG E 0 bright A_GunFlash
    FLMG E 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLMG F 1 bright A_FireCustomMissile("FTFire", 0, 0, Random(-4, 4), 0)
    FLMG G 1 bright A_FireCustomMissile("FTFire", 0, 1, Random(-4, 4), 0)
    FLMG H 2 bright A_ReFire
    Goto Ready
  Flash:
    TNT1 A 2 A_Light1
    TNT1 A 2 A_Light2
    TNT1 A 1 A_Light1
    TNT1 A 1 A_Light0
    Stop
  }
}

Actor FTFire
{
  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("DropFire", 0, 0, 0, 4)
    FRFX KLM 2 bright A_Explode(5, 64, 0)
    FRFX NO 2 bright
    Stop
  }
}

Actor DropFire
{
  Radius 8
  Height 40
  Projectile
  RenderStyle Add
  DamageType Fire
  Scale 0.50
  Alpha 0.90
  -NoGravity
  -NoBlockMap
  +NoExplodeFloor
  +NoDamageThrust
  States
  {
  Spawn:
    TNT1 A 0 A_PlaySound("Flamethrower/Flame")
    FLME A 2 bright A_Explode(1, 32, 0)
    FLME BCDEFGHIJKLMN 2 bright A_Explode(1, 16, 0)
    TNT1 A 0 A_PlaySound("Flamethrower/Flame")
    FLME A 2 bright A_Explode(1, 32, 0)
    FLME BCDEFGHIJKLMN 2 bright A_Explode(1, 16, 0)
    TNT1 A 0 A_PlaySound("Flamethrower/Flame")
    FLME A 2 bright A_Explode(1, 32, 0)
    FLME BCDEFGHIJKLMN 2 bright A_Explode(1, 16, 0)
    TNT1 A 0 A_Jump(192, "Death")
    Loop
  Death:
    TNT1 A 1
    Stop
  }
}

Actor Gas : Ammo
{
  Inventory.PickupSound "misc/pickup"
  Inventory.Amount 24
  Inventory.MaxAmount 240
  Ammo.BackpackAmount 24
  Ammo.BackpackMaxAmount 480
  Inventory.PickupMessage "You picked up a gasoline cannister"
  Inventory.Icon AGASA0
  States
  {
  Spawn:
    AGAS A -1
    Loop
  }
}

Actor BigGas : Gas
{
  Inventory.Amount 120
  Inventory.PickupMessage "You picked up a gasoline pack"
  Inventory.Icon AGASB0
  States
  {
  Spawn:
    AGAS B -1
    Loop
  }
}
///////////////////////////////////////////////////////////////////////////////
actor "FlamethrowerBJ" : InstantSwitchWeapon
{
    Weapon.SelectionOrder 1900
    Weapon.SlotNumber 0
    Inventory.PickUpSound "wolfen/flameget"
    Weapon.AmmoUse 1
    Weapon.AmmoGive 40
    Weapon.AmmoType "Cell"
    //+AMMO_OPTIONAL
    +DONTBOB
    +INVENTORY.UNDROPPABLE
    Inventory.PickupMessage "You got the Flamethrower!"
    Weapon.YAdjust 16
    States
    {
      Spawn:
        WFLP A -1
        Stop

      Ready:
        WFLM A 1 A_WeaponReady
        loop

      Fire:
        WFLM B 5

      Hold:
        WFLM A 0 A_FireCustomMissile("WolfenFire")
        WFLM C 2 BRIGHT
        WFLM B 3 BRIGHT
        WFLM A 0 A_FireCustomMissile("WolfenFire")
        WFLM D 2 BRIGHT
        WFLM B 3 BRIGHT
        TNT1 A 0 A_Refire
        WFLM B 3 A_ClearRefire
        Goto Ready

      CoopFire:
        WFLM A 0 A_FireCustomMissile("WolfenFire2")
        WFLM C 2 BRIGHT
        WFLM B 3 BRIGHT
        WFLM A 0 A_FireCustomMissile("WolfenFire2")
        WFLM D 2 BRIGHT
        WFLM B 3 BRIGHT
        TNT1 A 0 A_Refire
        WFLM B 3 A_ClearRefire
        Goto Ready
    }
}

actor WolfenFire
{
    Radius 12
    Height 8
    Speed 25
    Damage (random(10,50)) // Typical Plasma Rifle damage is 5-40
    Projectile
    +RANDOMIZE
    +BRIGHT
    DamageType "WolfenFlamethrower"
    SeeSound "wolfen/flamethrower"
    Obituary "%k \cjscorched\c- %o \cjwith the Flamethrower.\c-"
    States
    {
      Spawn:
        WFLB AB 6 bright
        loop

      Death:
        WFLB CDE 6 bright
        stop
    }
}

actor WolfenFire2: WolfenFire { +THRUSPECIES Species "Player" }
//////////////////////////////////////////////////////////////////////////////
Actor Flammenwerfer : weapon
{
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "You got the flammenwerfer! Time to roast some jews!"
  Obituary "%o was BBQed by %k's flammenwerfer."
  Weapon.AmmoType "Cell"
  Weapon.AmmoGive 48
  Weapon.AmmoUse 1
  +Weapon.Explosive
  States
  {
  Spawn:
    WFLM A -1
    Loop
  Ready:
    FLWR ABCDCB 3 A_WeaponReady
    Loop
  Deselect:
    FLWR A 1 A_Lower
    Loop
  Select:
    FLWR A 1 A_Raise
    Loop
  Fire:
    FLWR D 0 bright A_GunFlash
    FLWR C 1 bright Offset(0, 34) A_FireCustomMissile("HitlerFire", 0, 1, 0, 0)
    FLWR D 1 bright Offset(0, 33) A_FireCustomMissile("HitlerFire", 0, 0, 0, 0)
    FLWR C 1 bright Offset(0, 32) A_FireCustomMissile("HitlerFire", 0, 1, 0, 0)
    FLWR D 0 bright A_GunFlash
    FLWR C 1 bright Offset(0, 34) A_FireCustomMissile("HitlerFire", 0, 1, 0, 0)
    FLWR D 1 bright Offset(0, 33) A_FireCustomMissile("HitlerFire", 0, 0, 0, 0)
    FLWR C 1 bright Offset(0, 32) A_FireCustomMissile("HitlerFire", 0, 1, 0, 0)
    FLWR D 0 bright A_GunFlash
    FLWR C 1 bright Offset(0, 34) A_FireCustomMissile("HitlerFire", 0, 1, 0, 0)
    FLWR D 1 bright Offset(0, 33) A_FireCustomMissile("HitlerFire", 0, 0, 0, 0)
    FLWR C 1 bright Offset(0, 32) A_FireCustomMissile("HitlerFire", 0, 1, 0, 0)
    FLWR D 2 bright A_ReFire
    Goto Ready
  Flash:
    TNT1 A 2 A_Light1
    TNT1 A 2 A_Light2
    TNT1 A 1 A_Light1
    TNT1 A 1 A_Light0
    Stop
  }
}

Actor HitlerFire : FTFire
{
  Speed 32
  Scale 0.56
  Damage 2
  States
  {
  Spawn:
    TNT1 A 2
    FRFX ABCD 2 bright A_Explode(10, 4, 0)
    TNT1 A 0 A_LowGravity
    FRFX EFG 2 bright A_Explode(10, 8, 0)
    FRFX HIJ 2 bright A_Explode(10, 16, 0)
    FRFX KLM 2 bright A_Explode(10, 16, 0)
    FRFX NO 2 bright 
    Stop
	
  Death:
    FRFX HIJ 2 bright A_Explode(10, 16, 0)
    FRFX KLM 2 bright A_Explode(10, 16, 0)
    FRFX NO 2 bright 
    Stop
  }
}

///////////////////////////////////////////////////////////////////////////////
ACTOR PlasmaGun : PlasmaRifle
{
	Inventory.PickupMessage "Picked up the Plasma Gun."
	Tag "Plasma Gun"
	Weapon.Ammouse2 1
	Weapon.Ammotype2 "Cell"
	States
	{
	Ready:
	PLZM ABCDEFGH 3 A_WeaponReady
	Loop
	Deselect:
	PLZM A 1 A_Lower
	Loop
	Select:
	PLZM A 1 A_Raise
	Loop
	Fire:
	PLZM A 0 A_GunFlash
	PLZM A 0 A_PlayWeaponSound("PLAZ1")
	PLZF A 1 Bright A_FireCustomMissile("FuzzyPlasma", frandom(-1,1), 1, 0, 0, 0, frandom(-1,1))
	PLZM A 1 Offset(0,38) A_SetPitch(pitch-0.5)
	PLZM A 1 Offset(0,36)
	PLZM A 1 Offset(0,34) A_SetPitch(pitch+0.5)
	PLZM A 0 Offset(0,32)
	PLZM A 0 A_Refire
	Goto Ready
	AltFire:
	PLZM A 0 A_GunFlash
	PLZF A 1 Bright Offset(0,36) A_FireCustomMissile("PlasmaFire", 0, 1)
	PLZF A 1 Bright Offset(0,34) A_FireCustomMissile("PlasmaFire", 0, 0)
	PLZF A 1 Bright Offset(0,32) A_FireCustomMissile("PlasmaFire", 0, 1)
	PLZM A 2 A_Refire
	Goto Ready
	Flash:
	TNT1 A 2 A_Light2
	TNT1 A 1 A_Light1
	Goto LightDone
	Spawn:
	PLZG A -1
	Stop
	}
}

Actor PlasmaDropFire : DropFire
{
  Radius 4
  Height 20
  Projectile
  RenderStyle Add
  DamageType Fire
  Scale 0.25
  Alpha 0.90
  -NoGravity
  -NoBlockMap
  +NoExplodeFloor
  +NoDamageThrust
  States
  {
  Spawn:
    TNT1 A 0 A_PlaySound("Flamethrower/Flame")
    FLME A 2 bright A_Explode(1, 12, 0)
    FLME BCDEFGHIJKLMN 2 bright A_Explode(1, 16, 0)
    TNT1 A 0 A_PlaySound("Flamethrower/Flame")
    FLME A 2 bright A_Explode(1, 12, 0)
    FLME BCDEFGHIJKLMN 2 bright A_Explode(1, 16, 0)
    TNT1 A 0 A_PlaySound("Flamethrower/Flame")
    FLME A 2 bright A_Explode(1, 12, 0)
    FLME BCDEFGHIJKLMN 2 bright A_Explode(1, 16, 0)
    TNT1 A 0 A_Jump(128, "Death")
    Loop
  Death:
    TNT1 A 1
    Stop
  }
}

Actor PlasmaFire : FTFire
{
  Scale 0.4
  DeathSound "Flamethrower/Hit"
  +CORPSE
  States
  {
  Spawn:
    TNT1 A 3
    PRFX BCD 2 bright A_Explode(5, 4, 0)
    TNT1 A 0 A_LowGravity
    PRFX EFG 2 bright A_Explode(5, 8, 0)
    PRFX HIJ 2 bright A_Explode(5, 16, 0)
    PRFX KLM 2 bright A_Explode(5, 32, 0)
    PRFX NO 2 bright 
    Stop
	
  Death:
    PRFX HIJ 2 bright A_Explode(5, 16, 0)
    PRFX KLM 2 bright A_Explode(5, 32, 0)
    PRFX NO 2 bright
    Stop
   Crash:
    TNT1 A 1 A_SpawnItemEx("PlasmaDropFire")
    Stop
  }
}

actor FuzzyPlasma
{
  Radius 7
  Height 7
  Speed 30
  Damage 4
  Scale 0.3
  Decal DoomImpScorch
  Damagetype Fire
  Projectile
  +RANDOMIZE
  +CORPSE
  RenderStyle Add
  Alpha 1
  DeathSound "PLAZ2"
  Obituary "%o was left decayed by %k's Plasmatic Rifle"
  States
  {
  Spawn:
    PRFX BC 1 Bright
    loop
  Death:
	PLZB H 0
    PRFX DEFGHIJKL 1 Bright
    PRFX MNO 1 Bright A_SpawnItemEx("BulletSmoke", 0, 0, 0, 0, 0, 1)
    stop
    Crash:
    PRFX DEFGHIJKL 1 Bright
    TNT1 A 0 A_SpawnItemEx("PlasmaDropFire")
    Stop
  }
}

ACTOR FuzzyPlasmaTrail
{
  RenderStyle Add
  Alpha 0.4
  Scale 0.01
  +NOBLOCKMAP
  +LOWGRAVITY
  +FLOATBOB
  +NOCLIP
  +DONTSPLASH
  +NOTELEPORT
  States
  {
  Spawn:
	PRFX EFILIFE 2 Bright
	PRFX EFILIFE 2 Bright
	PRFX EFILIFE 2 Bright
      Stop
  }
}

//////////////////////////////////////////////////////////////////////////////
ACTOR "PlasmaRifleA" : PlasmaRifle
{
	Weapon.SlotNumber 0
// Inventory.ForbiddenTo ""
// Inventory.RestrictedTo ZyklonB
}
