ACTOR SFortFlamethrower : Weapon
{
	Weapon.AmmoType "Cell"
	Weapon.AmmoUse 1
	Weapon.AmmoGive 60
	Weapon.SelectionOrder 400
	Inventory.PickupSound "misc/w_pkup"
	Inventory.PickupMessage "You got the flamethrower!"
	Inventory.RestrictedTo "ScorcherPlayer"
	Tag "Flamethrower"
	+WEAPON.NOAUTOAIM
	+WEAPON.NOLMS
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
	States
	{
	Spawn:
	  FLRG D -1
	  Stop
	Ready:
	  FLRG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
	  Loop
	Select:
	  FLRG A 1 A_Raise
	  Loop
	Deselect:
	  FLRG A 0 A_Lower
	  Loop
	Fire:
	  TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	  TNT1 A 0 A_GunFlash
	  TNT1 A 0 A_Playsound("weapons/flamefr",CHAN_WEAPON,1,0,0.75)
	  TNT1 A 0 A_FireCustomMissile("FlameFatShot",frandom(-8,8),1,0,-5)
	  FLRG B 2 Bright A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
	  TNT1 A 0 A_FireCustomMissile("FlameFatShot",frandom(-8,8),1,0,-5)
	  FLRG C 3 Bright A_WeaponReady(WRF_NOPRIMARY|WRF_NOBOB)
	  FLRG CCBBA 2 A_WeaponReady(WRF_NOBOB)
	  Goto Ready
	Quad:
      TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_7)
	  Goto Fire+2
	AltFire:
	  TNT1 A 0 A_JumpIfInventory("Cell",1,"AltSuccess")
	  TNT1 A 0 ACS_NamedExecuteAlways("ScorcherAirblastNoAmmo",0)
	  Goto Ready
	AltSuccess:
	  TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
	  TNT1 A 0 A_TakeInventory("Cell",30)
	  //TNT1 A 0 A_Playsound("weapons/airblast",CHAN_WEAPON,1,0,0.75)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,0,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,18,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,36,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,54,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,72,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,90,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,108,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,126,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,144,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,162,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,180,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,198,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,216,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,234,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,252,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,270,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,288,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,306,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,324,CMF_AIMDIRECTION)
	  TNT1 A 0 A_CustomMissile("AirblastRing",32,0,342,CMF_AIMDIRECTION)
	  TNT1 A 0 A_Blast(0,256,256,40,"AirblastWind","weapons/airblast")
	  FLRG B 2 A_RadiusThrust(10000,256,RTF_NOTMISSILE,192)
	  FLRG C 14
	  FLRG BA 4
	  Goto Ready
	Flash:
	  FLRF A 2 Bright A_Light2
	  FLRF B 3 Bright A_Light2
	  //FLRF C 2 Bright A_Light0
	  Goto LightDone
	Reload:
	  TNT1 A 0 A_Print("$INFO_SCORCHER",0.0625)
	  Goto Ready
	}
}

ACTOR FlameFatShot : FatShot
{
  Speed 48
  Damage (0)
  DamageType Fire
  PoisonDamage 1, 10, 17
  PoisonDamageType "ScorcherFire"
  SeeSound ""
  DeathSound ""
  Obituary "%o was barbecued by %k's flamethrower."
  SelfObituary "%o felt burning love for %p flamethrower."
  ProjectileKickback 0
  Alpha 0.5
  Decal Scorch
  Decal ImpScorch
  //+THRUACTORS
  +RANDOMIZE
  +ADDITIVEPOISONDAMAGE
  +DONTBLAST
  States
  {
  Spawn:
	MANF A 2 Bright A_Explode(5,64,0,0,24)
	TNT1 A 0 A_Jump(8,"Death")
	MANF A 2 Bright A_Explode(5,64,0,0,24)
	TNT1 A 0 A_Jump(16,"Death")
	MANF B 2 Bright A_Explode(5,64,0,0,24)
	TNT1 A 0 A_Jump(32,"Death")
	MANF B 2 Bright A_Explode(5,64,0,0,24)
	TNT1 A 0 A_Jump(64,"Death")
	MANF A 2 Bright A_Explode(5,64,0,0,24)
	TNT1 A 0 A_Jump(128,"Death")
	MANF A 2 Bright A_Explode(5,64,0,0,24)
  Death:
    BAL1 CDE 2 Bright A_Explode(5,64,0,0,24)
    Stop
  }
}

ACTOR AirblastRing
{
	Speed 25
	Renderstyle Add
	Alpha 0.125
	+NOBLOCKMAP
	+NOCLIP
	+NOGRAVITY
	States
	{
	Spawn:
	  AIRB ABC 3
	  Stop
	}
}

ACTOR AirblastWind
{
	Renderstyle Add
	Alpha 0.75
	+NOBLOCKMAP
	+NOCLIP
	+NOGRAVITY
	States
	{
	Spawn:
	  AIRB DEF 4
	  Stop
	}
}

ACTOR SFortFlareGun : Weapon
{
	Weapon.AmmoType "Shell"
	Weapon.AmmoUse 1
	Weapon.AmmoGive 4
	Inventory.PickupSound "misc/w_pkup"
	Inventory.PickupMessage "You got the flare gun!"
	Inventory.RestrictedTo "ScorcherPlayer"
	Obituary "%o was set ablaze by %k's flare gun."
	Tag "Flare Gun"
	+WEAPON.NOAUTOAIM
	+WEAPON.NOLMS
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
	States
	{
	Spawn:
	  FLAR A -1
	  Stop
	Ready:
	  TNT1 A 0 A_JumpIfInventory("FlareGunReload",1,"FireReload")
	  FREG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
	  Loop
	Select:
	  TNT1 A 0
	  FREG A 1 A_Raise
	  Loop
	Deselect:
	  FREG A 0 A_Lower
	  Loop
	Fire:
//	  TNT1 A 0 A_JumpIfInventory("FlareGunReload",1,"FireReload")
//	  TNT1 A 0 A_GiveInventory("FlareGunReload")
	  TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
	  //FREG A 3
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	  TNT1 A 0 A_GunFlash
	  TNT1 A 0 A_Playsound("weapons/flaregf",CHAN_5)
	  FREG A 6 Bright A_FireCustomMissile("Flare",0,1,0,0,0,3)
	  TNT1 A 0 A_CheckReload
	FireReload:
	  FREG BC 6
	  FREG D 6 A_OpenShotgun2
	  FREG E 6
	  FREG F 6 A_LoadShotgun2
	  FREG G 6
	  FREG H 6 A_CloseShotgun2
	  FREG A 3 A_Refire("Hold")
	  Goto Ready
	Hold:
	  FREG A 3
	  Goto Fire
	Quad:
      TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO)
	  Goto Fire+4
	Flash:
	  FREF A 3 Bright A_Light2
	  FREF B 3 Bright A_Light1
	  Goto LightDone
	Reload:
	  TNT1 A 0 A_Print("$INFO_SCORCHER",0.0625)
	  Goto Ready
	}
}

ACTOR Flare 
{
	Projectile
	ProjectileKickback 300
	Radius 6
	Height 8
	Damage (0)
	DamageType Fire
	PoisonDamage 3, 10, 17
	PoisonDamageType "ScorcherFire"
	Speed 35
	Gravity 0.15
	Renderstyle Add
	Decal ImpScorch
	SeeSound "weapons/flaregf"
	DeathSound "weapons/flaregx"
	Obituary "%o was set ablaze by %k's flare gun."
	SelfObituary "%o was not aiming up with %p flare gun."
	Decal BigScorch
	-NOGRAVITY
	+ADDITIVEPOISONDAMAGE
	States
	{
	Spawn:
		BAL2 ABABABABABA 3 Bright
		BAL2 B 1 Bright A_SpawnItemEx("FlarePuff",0,0,0,random(0,-1),frandom(-0.5,0.5),frandom(-0.5,0.5))
		TNT1 A 0 A_Die
		BAL2 B 1 Bright
	Death:
		TNT1 A 0 A_Playsound("weapons/flaregx",CHAN_BODY)
		TNT1 A 0 A_ChangeFlag(NOGRAVITY,1)
		TNT1 A 0 A_ChangeVelocity(0,0,0,CVF_REPLACE)
		TNT1 A 0 A_Explode(100,64)
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("FlareBall",0,0,4,random(6,12),0,random(3,15),random(0,360),SXF_TRANSFERPOINTERS)
		BAL2 CDE 6 Bright
		Stop
	}
}

ACTOR FlarePuff : BulletPuff
{
	States
	{
	Spawn:
	  TNT1 A 2
      PUFF AB 4 Bright
      PUFF CD 4
      Stop
	}
}

ACTOR FlareBall : DoomImpBall
{
	Damage (0)
	DamageType Fire
	PoisonDamage 1, 10, 17
	PoisonDamageType "ScorcherFire"
	SeeSound ""
	DeathSound "weapons/flaregx"
	Obituary "%o was set ablaze by %k's flare."
	SelfObituary "%o caught cinder from %p own flare."
	ProjectileKickback 0
	Decal Scorch
	-NOGRAVITY
	+ADDITIVEPOISONDAMAGE
	States
	{
	Spawn:
		BAL3 AB 3 Bright
		Loop
	Death:
		//TNT1 A 0 A_Jump(128,"XDeath")
		BAL3 C 6 Bright A_Explode(1,64,1,0,64)
		BAL3 D 6 Bright
		BAL3 E 6 Bright A_Jump(192,"DeathFlame")
		Stop
	DeathFlame:
		BAL3 E 6 Bright A_SpawnItemEx("FlareFire",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		Stop
	XDeath:
		BAL3 C 6 Bright A_Explode(1,64,1,0,64)
		BAL3 DE 6 Bright
		Stop
	}
}

ACTOR FlareFire : ArchvileFire
{
	RenderStyle Add
	Alpha 1
	Obituary "%o was set ablaze by %k's flare."
	SelfObituary "%o caught fire from %p own flare."
	DamageType Fire
	PoisonDamage 1, 10, 17
	PoisonDamageType "ScorcherFire"
	+NOBLOCKMAP
	+NOGRAVITY
	+ADDITIVEPOISONDAMAGE
	States
	{
	Spawn:
		TNT1 A 0 A_StartFire
		FIRE A 2 Bright A_Explode(5,48,0,0,48)
		FIRE B 2 Bright
		FIRE A 2 Bright A_Explode(5,48,0,0,48)
		FIRE B 2 Bright
		TNT1 A 0 A_FireCrackle
		FIRE C 2 Bright A_Explode(5,48,0,0,48)
		FIRE B 2 Bright
		FIRE C 2 Bright A_Explode(5,48,0,0,48)
		FIRE B 2 Bright
		FIRE C 2 Bright A_Explode(5,48,0,0,48)
		FIRE D 2 Bright
		FIRE C 2 Bright A_Explode(5,48,0,0,48)
		FIRE D 2 Bright
		FIRE C 2 Bright A_Explode(5,48,0,0,48)
		FIRE D 2 Bright
		FIRE E 2 Bright A_Explode(5,48,0,0,48)
		FIRE D 2 Bright
		FIRE E 2 Bright A_Explode(5,48,0,0,48)
		FIRE D 2 Bright
		TNT1 A 0 A_FireCrackle
		FIRE E 2 Bright A_Explode(5,48,0,0,48)
		FIRE F 2 Bright
		FIRE E 2 Bright A_Explode(5,48,0,0,48)
		FIRE F 2 Bright
		FIRE E 2 Bright A_Explode(5,48,0,0,48)
		FIRE F 2 Bright
		FIRE G 2 Bright A_Explode(5,48,0,0,48)
		FIRE H 2 Bright
		FIRE G 2 Bright A_Explode(5,48,0,0,48)
		FIRE H 2 Bright
		FIRE G 2 Bright A_Explode(5,48,0,0,48)
		FIRE H 2 Bright
		Stop
	}
}

ACTOR FlareGunReload : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR SFortPlayerFire
{
	Renderstyle Translucent
	Alpha 0.325
	+NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	//+CLIENTSIDEONLY
	States
	{
	Spawn:
	  TNT1 A 0
	  TNT1 A 0 A_FireCrackle
	  FIRE AABBCCDDEEFFGGHH 1 Bright A_Warp(AAPTR_TARGET,12)
	  Stop
	}
}

ACTOR ScorcherFist : SFortFist
{
	Inventory.RestrictedTo "ScorcherPlayer"
	States
	{
	Select:
      PUNG A 1 A_Raise
      Loop
	Reload:
	  TNT1 A 0 A_Print("$INFO_SCORCHER",0.0625)
	  Goto Ready
	}
}

ACTOR ScorcherPistol : SFortPistol
{
	Inventory.RestrictedTo "ScorcherPlayer"
	States
	{
	Reload:
	  TNT1 A 0 A_Print("$INFO_SCORCHER",0.0625)//TNT1 A 0 ACS_NamedExecuteAlways("ClassInfo_Enter",0)
	  Goto Ready
	}
}

ACTOR ScorcherNailgun : SFortNailgun
{
	Inventory.RestrictedTo "ScorcherPlayer"
	States
	{
	Select:
      NLMG A 1 A_Raise
      Loop
	Reload:
	  TNT1 A 0 A_Print("$INFO_SCORCHER",0.0625)
	  Goto Ready
	}
}