/*
INFO - Frankensprite - a sprite made of parts of other sprites.
Just like frankenstein is a mashup of other people's limbs. Crazy, eh?

CREDITS:
Original idea by Apogee.

Sprites:
Frankensprite - Neccronixus
Bits from ID (Quake 4), 3DRealms (Duke Nukem 3D, Shadow Warrior)
Recolor, moving part on the right - Icytux
Pickup by me, with bits from 3DRealms and Eriance (Buttstock)
Flames by KeksDose

Sounds:
Fire - Raven (Wolfenstein 3)
Reload - People can Fly, Epic Games (Bulletstorm)
X-blast - ?
Firewall - Raven (Wolfenstein 3)
*/

ACTOR Torchglow : Weapon 24507
{
   //$Category Weapons
   //$Title Torchglow
   //$Sprite FRGGX0
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "You got the ''Torchglow'' fire cannon! ''Extra crispy''? I'm sorry, it's capable of ''Scorched to ashes'' only. (5)"
   Obituary "Like it was said - ''Torchglow'' scorched %o to ashes, all credit for shooting goes to %k."
   Weapon.UpSound "Torchglow/Up"
   Weapon.SelectionOrder 4
   Weapon.AmmoType "100MMAmmo"
   Weapon.AmmoGive 12
   Weapon.AmmoUse 3
   Weapon.AmmoType2 "100MMAmmo"
   Weapon.AmmoUse2 3
   Weapon.Kickback 60
   Weapon.SlotNumber 5
   +NOAUTOFIRE
   Scale 0.7
   States
   {
   Spawn:
      FRGG X -1
      Loop
   Ready:
      FRGG A 1 A_WeaponReady
      Loop
   Deselect:
      FRGG A 0 A_ZoomFactor(1)
      FRGG A 1 A_Lower
      FRGG A 0 A_Lower
      Loop
   Select:
      FRGG A 1 A_Raise
      FRGG A 0 A_Raise
      Loop
   Fire:
      FRGF A 0 A_GunFlash
      FRGF A 0 A_Recoil(9)
      FRGF A 0 A_PlaySound("Torchglow/Fire",1)
      FRGF A 0 A_PlaySound("Torchglow/Add",5)
      FRGF A 0 A_FireCustomMissile("FirewallBomb",0,1,10,0)
      FRGF A 0 A_SetPitch(pitch-4)
      FRGF A 0 A_SetAngle(angle-3)
      FRGF A 1 Bright Offset(4,36) A_ZoomFactor(0.95)
      FRGF A 0 A_SetPitch(pitch-3)
      FRGF A 0 A_SetAngle(angle-2)
      FRGF A 1 Bright Offset(9,41) A_ZoomFactor(0.9)
      FRGF B 1 Bright Offset(12,44) A_ZoomFactor(0.85)
      FRGF B 1 Bright Offset(14,46) A_ZoomFactor(0.9)
      FRGF C 1 Bright Offset(15,47) A_ZoomFactor(0.915)
      FRGF C 1 Bright Offset(14,46) A_ZoomFactor(0.925)
      FRGG A 1 Bright Offset(12,44) A_ZoomFactor(0.95)
      FRGG A 1 Offset(10,42) A_ZoomFactor(0.96)
      FRGG A 1 Offset(7,39) A_ZoomFactor(0.975)
      FRGG A 1 Offset(5,37) A_ZoomFactor(0.995)
      FRGG A 1 Offset(3,35) A_ZoomFactor(1)
      FRGG A 1 Offset(1,33)
      FRGG A 1 Offset(0,32)
      FRGG A 0 A_PlaySound("Torchglow/Load",6,0.5)
      FRGR ABCD 2
      FRGG A 6
      Goto Ready
   AltFire:
      FRGF A 0 A_GunFlash
      FRGF A 0 A_Recoil(9)
      FRGF A 0 A_PlaySound("Torchglow/Fire",1)
      FRGF A 0 A_PlaySound("Torchglow/Add",5)
      FRGF A 0 A_FireCustomMissile("FireblastMissile",0,1,10,0)
      FRGF A 0 A_SetPitch(pitch-4)
      FRGF A 0 A_SetAngle(angle-3)
      FRGF A 1 Bright Offset(4,36) A_ZoomFactor(0.95)
      FRGF A 0 A_SetPitch(pitch-3)
      FRGF A 0 A_SetAngle(angle-2)
      FRGF A 1 Bright Offset(9,41) A_ZoomFactor(0.9)
      FRGF B 1 Bright Offset(12,44) A_ZoomFactor(0.85)
      FRGF B 1 Bright Offset(14,46) A_ZoomFactor(0.9)
      FRGF C 1 Bright Offset(15,47) A_ZoomFactor(0.915)
      FRGF C 1 Bright Offset(14,46) A_ZoomFactor(0.925)
      FRGG A 1 Offset(12,44) A_ZoomFactor(0.95)
      FRGG A 1 Offset(10,42) A_ZoomFactor(0.96)
      FRGG A 1 Offset(7,39) A_ZoomFactor(0.975)
      FRGG A 1 Offset(5,37) A_ZoomFactor(0.995)
      FRGG A 1 Offset(3,35) A_ZoomFactor(1)
      FRGG A 1 Offset(1,33)
      FRGG A 1 Offset(0,32)
      FRGG A 0 A_PlaySound("Torchglow/Load",6,0.5)
      FRGR ABCD 2
      FRGG A 6
      Goto Ready
   Flash:
      TNT1 A 3 Bright A_Light2
      TNT1 A 4 Bright A_Light1
      TNT1 A 0 Bright A_Light0
      Stop
   }
}

//Inheritance Stuff

Actor Torchglow_BaseParticle
{
	+NoInteraction
	+ForceXYBillboard
	+CLIENTSIDEONLY
	RenderStyle Normal
	Alpha 0.99
	States
	{
		Spawn:				// Initialization goes here.
			TNT1 A 0
			Goto FadeIn
		FadeIn:				// Optional fading in.
			TNT1 A 0
			Goto Idle
		Idle:				// Fly around.
			TNT1 A 0
			Goto FadeOut
		FadeOut:			// Dissipate.
			TNT1 A 0
			Stop
	}
}

Actor Torchglow_BaseParticleMultiple : Torchglow_BaseParticle
{
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD")
			Goto Spawn
		SpriteA:
			TNT1 A 0 A_Jump(255, "FadeIn")
			Goto Normal
		SpriteB:
			TNT1 A 0 A_Jump(255, "FadeIn")
			Goto Normal
		SpriteC:
			TNT1 A 0 A_Jump(255, "FadeIn")
			Goto Normal
		SpriteD:
			TNT1 A 0 A_Jump(255, "FadeIn")
			Goto Normal
		FadeIn:				// Optional fading in.
			TNT1 A 0
			Goto Idle
		Idle:				// Fly around.
			TNT1 A 0
			Goto FadeOut
		FadeOut:			// Dissipate.
			TNT1 A 0
			Stop
	}
}

Actor Torchglow_BaseEmitter
{
	Var Int User_SpawnCount;
	+CLIENTSIDEONLY
	+NoInteraction
	
	States
	{
		Spawn:				// Initialize particle counter.
			TNT1 AA 0 A_SetUserVar("User_SpawnCount", 10)
			Goto Emit
		Emit:				// Emit particles.
			TNT1 A 0 A_Jump(0xFF, "Count") // You MUST use A_Jump.
			Goto Count
		Count:				// Emit until SpawnCount <= 0.
			TNT1 A 0 A_SetUserVar("User_SpawnCount", User_SpawnCount - 1)
			TNT1 A 0 A_JumpIf(User_SpawnCount <= 0, "NULL")
			TNT1 A 0 A_Jump(0xFF, "Emit")
			Goto Emit
	}
}

//Main Stuff

actor FirewallBomb
{
  Radius 11
  Height 8
  Speed 20
  Damage 20
  PROJECTILE
  DamageType Fire
  Obituary "%o was cremated by %k's firewall, courtesy of %k's ''Torchglow''."
  -NOGRAVITY
  +FORCERADIUSDMG
  States
  {
  Spawn:
    BAMB AA 0 A_PlaySound("Weapons/PushkaLoop",5,0.6,1)
	BAMB A 0 ThrustThingZ(0,10,0,1)
  Looplet:
    BAMB A 1 A_SpawnItemEx("BarrageTrail",0.1*random(8,12),0.1*random(8,12),0.1*random(8,12),0.1*random(1,3),0.1*random(1,3),0.1*random(1,3),random(0,359),0)
    Loop
  Death:
	TNT1 A 0 A_SpawnItemEx("FirewallSpanner",0,0,0,20,20,0,0,SXF_TRANSFERPOINTERS)
	TNT1 A 0 A_SpawnItemEx("FirewallSpanner",0,0,0,20,-20,0,0,SXF_TRANSFERPOINTERS)
  //XDeath:
	TNT1 A 0 A_PlaySound("Torchglow/Burn",5)
	TNT1 A 0 A_Explode(100,128,0,1)
	TNT1 A 1 A_SpawnItemEx("FirewallPart2",0,0,0,0,0,0,0)
	stop
  }
}

ACTOR FirewallSpanner
{
  Damage 0
  Speed 20
  +MISSILE
  +STEPMISSILE
  +DROPOFF
  +NOEXPLODEFLOOR
  +RIPPER
  MaxStepHeight 32
  ReactionTime 24
  States
  {
  Spawn:
	TNT1 AA 0 A_Countdown
	TNT1 A 2 A_SpawnItemEx("FirewallPart",0,0,0,20,0,0,0,SXF_TRANSFERPOINTERS)
	Loop
  Death:  
	stop
  }
}

Actor FirewallPart
{
	Radius 12
	Height 18
	Damage 50
	Speed 20
 	+MISSILE
 	+STEPMISSILE
 	+DROPOFF
 	+NOEXPLODEFLOOR
  	+RIPPER
	+BLOODLESSIMPACT
	+FORCERADIUSDMG
	DamageType Fire
  	MaxStepHeight 32
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_PlaySound("Torchglow/Wall",5,0.8,1)
			//TNT1 A 0 A_ChangeVelocity(20, 0, 0, CVF_RELATIVE)
		BulletHoseUpYourNose:
			TNT1 A 0 A_SpawnItemEx("Firewall_Flame", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-1.5, -2.8), FRandom(-1.0, 1.0),
									FRandom(-1.0, 2.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 A 0 A_SpawnItemEx("Firewall_Smoke", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(1.5, -2.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 A 0 A_SpawnItemEx("Firewall_Glow", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-1.5, -3.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 A 0 A_SpawnItemEx("Firewall_Flare", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									0, 0, 0, 0, SXF_CLIENTSIDE)
			TNT1 A 1
			TNT1 A 0 A_SpawnItemEx("Firewall_Glow", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-1.5, -3.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 A 0 A_SpawnItemEx("Firewall_Flare", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									0, 0, 0, 0, SXF_CLIENTSIDE)
			TNT1 A 1
			Loop
		Death:
			TNT1 A 0 A_PlaySound("Torchglow/Burn",5,0.7)
			TNT1 A 0 A_Explode(100,128)
			TNT1 A 1 A_SpawnItemEx("FirewallPart2",0,0,0,0,0,0,0)
			stop
	}
}

Actor FirewallPart2 : FirewallPart
{
	+NOINTERACTION
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_PlaySound("Torchglow/Burn",5)
		BulletHoseUpYourNose:
			TNT1 AAAAAAA 0 A_SpawnItemEx("Firewall_Flame", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-1.5, -2.8), FRandom(-1.0, 1.0),
									FRandom(-1.0, 2.0), random(0,359), SXF_CLIENTSIDE, 10)
			TNT1 AAAAAAA 0 A_SpawnItemEx("Firewall_Smoke", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(1.5, -2.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), random(0,359), SXF_CLIENTSIDE, 10)
			TNT1 AAAAA 0 A_SpawnItemEx("Firewall_Glow", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-1.5, -3.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), random(0,359), SXF_CLIENTSIDE, 10)
			TNT1 AA 0 A_SpawnItemEx("Firewall_Flare", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									0, 0, 0, 0, SXF_CLIENTSIDE)
			TNT1 A 1
			TNT1 AAAAA 0 A_SpawnItemEx("Firewall_Glow", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-1.5, -3.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 AA 0 A_SpawnItemEx("Firewall_Flare", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									0, 0, 0, 0, SXF_CLIENTSIDE)
			TNT1 A 1
		Death:
			TNT1 AAAA 0 A_SpawnItemEx("Firewall_Ember", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-2.0, -13.0), FRandom(-6.0, 6.0),
									FRandom(1.0, 8.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 A 30
			Stop
	}
}

Actor Firewall_Glow : Torchglow_BaseParticleMultiple
{
	Alpha 0.6
	Scale 1.1
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB")
		SpriteA:
			FWAL M 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			FWAL R 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		FadeIn:
			"####" "#" 0 Bright //A_SetScale(FRandom(0.5, 0.6))
			Goto Idle
		Idle:
			"####" "#" 2 Bright A_Jump(200, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 Bright A_FadeOut(0.02)
			"####" "#" 0 A_ScaleVelocity(FRandom(0.97, 0.99))
			"####" "#" 0 //A_SetScale(ScaleX + FRandom(0.02, 0.04))
			Loop
	}
}

Actor Firewall_Flame : Torchglow_BaseParticleMultiple
{
	Alpha 0.6
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD",
								 "SpriteE", "SpriteF", "SpriteG", "SpriteH")
		SpriteA:
			FWAL A 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			FWAL B 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			FWAL C 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		SpriteD:
			FWAL D 0 A_Jump(255, "FadeIn")
			Goto SpriteD
		SpriteE:
			FWAL E 0 A_Jump(255, "FadeIn")
			Goto SpriteE
		SpriteF:
			FWAL F 0 A_Jump(255, "FadeIn")
			Goto SpriteF
		SpriteG:
			FWAL G 0 A_Jump(255, "FadeIn")
			Goto SpriteG
		SpriteH:
			FWAL H 0 A_Jump(255, "FadeIn")
			Goto SpriteH
		FadeIn:
			"####" "#" 0 Bright //A_SetScale(FRandom(0.5, 0.55))
			Goto Idle
		Idle:
			"####" "#" 2 Bright A_Jump(190, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 Bright A_FadeOut(0.035)
			"####" "#" 0 A_ScaleVelocity(FRandom(1.01, 1.03))
			"####" "#" 0 //A_SetScale(ScaleX - FRandom(0.01, 0.03))
			Loop
	}
}

Actor Firewall_Ember : Torchglow_BaseParticleMultiple
{
	Alpha 0.99
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC")
		SpriteA:
			FALC J 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			FALC K 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			FALC L 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		FadeIn:
			"####" "#" 0 Bright //A_SetScale(FRandom(0.07, 0.15))
			Goto Idle
		Idle:
			"####" "#" 2 Bright A_Jump(200, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 Bright A_Weave(FRandom(0.9, 1.0), FRandom(0.9, 1.0),
										FRandom(70, 90), FRandom(70, 90))
			"####" "#" 0 //A_JumpIf(ScaleX <= 0.0, "NULL")
			"####" "#" 0 A_ChangeVelocity(VelX * FRandom(0.93, 0.99),
										  VelY * FRandom(0.93, 0.99),
										  VelZ - FRandom(0.1, 0.2),
										  CVF_REPLACE)
			"####" "#" 0 A_FadeOut(FRandom(0.003, 0.0015))
			Loop
	}
}

Actor Firewall_Smoke : Torchglow_BaseParticleMultiple
{
	Alpha 0.0
	RenderStyle Translucent
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD")
		SpriteA:
			FWAL N 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			FWAL O 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			FWAL P 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		SpriteD:
			FWAL Q 0 A_Jump(255, "FadeIn")
			Goto SpriteD
		FadeIn:
			"####" "#" 0 //A_SetScale(FRandom(0.8, 0.9))
			Goto RealFadeIn
		RealFadeIn:
			"####" "#" 1 A_FadeIn(FRandom(0.02, 0.05))
			"####" "#" 0 A_JumpIf(Alpha >= 0.4, "Idle")
			Loop
		Idle:
			"####" "#" 4 A_Jump(35, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 A_FadeOut(0.02)
			/* "####" "#" 0 A_ChangeVelocity(VelX * FRandom(0.97, 0.99),
										  VelY * FRandom(0.97, 0.99),
										  VelZ + FRandom(0.02, 0.06),
										  CVF_REPLACE) */
			"####" "#" 0 A_ScaleVelocity(0.96)
			"####" "#" 0 //A_SetScale(ScaleX + FRandom(0.015, 0.025))
			Loop
	}
}

Actor Firewall_Flare : Torchglow_BaseParticle
{
	RenderStyle Add
	Scale 0.9
	States
	{
		Spawn:
			FWAL I 1 Bright A_FadeOut(0.19)
			Loop
	}
}

//Alt-Fire

actor FireblastMissile// : FastProjectile
{
  Radius 11
  Height 8
  Speed 40
  Damage 40
  PROJECTILE
  Obituary "%o was scorched by %k's fireblast, courtesy of %k's ''Torchglow''."
  DamageType Fire
  +NOGRAVITY
  //MissileType "TorchglowTrailer"
  Scale 0.6
  States
  {
  Spawn:
    RMIS AA 0 A_PlaySound("Torchglow/Fly",5,1.0,1)
  Looplet:
    TNT1 A 0 A_SpawnItemEx("BarrageTrail",-23+frandom(1.0,0.1),frandom(1.0,0.1),0,frandom(-1.0,-1.5),0,0,0,128,0)
    TNT1 A 0 A_SpawnItemEx("TorchglowTrail",-23+frandom(1.0,0.1),frandom(1.0,0.1),0,frandom(-1.0,-1.5),0,0,0,128,0)
    RMIS A 1 Bright
    Loop
  Death:
    TNT1 A 0 A_StopSound(5)
	TNT1 A 1 A_SpawnItemEx("FireblastExplode",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
	stop
  }
}


ACTOR TorchglowTrailer
{ 
    +NOGRAVITY
    +NOINTERACTION
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 A 1 A_SpawnItemEx("BarrageTrail",-23+frandom(1.0,0.1),frandom(1.0,0.1),9,0,0,0,0,128,0)
      TNT1 A 1 A_SpawnItemEx("TorchglowTrail",-23+frandom(1.0,0.1),frandom(1.0,0.1),9,0,0,0,0,128,0)
      Stop
    }
}

ACTOR TorchglowTrail
{ 
    Scale 0.5
    Alpha 1
    Renderstyle Add
    +NOGRAVITY
    +NOINTERACTION
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      10BA A 0
      10BA A 0 //A_SetScale(ScaleX-0.05,ScaleY-0.05)
      10BA A 1 Bright A_FadeOut(0.1)
      Loop
    }
}

Actor FireblastExplode
{
	+NOINTERACTION
	+NOGRAVITY
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_SpawnItemEx("FireblastExplosion",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS) //Center
			TNT1 A 0 A_SpawnItemEx("FireblastExploder",0,0,0,20,0,0,45,SXF_TRANSFERPOINTERS)
			TNT1 A 0 A_SpawnItemEx("FireblastExploder",0,0,0,20,0,0,135,SXF_TRANSFERPOINTERS)
			TNT1 A 0 A_SpawnItemEx("FireblastExploder",0,0,0,20,0,0,225,SXF_TRANSFERPOINTERS)
			TNT1 A 0 A_SpawnItemEx("FireblastExploder",0,0,0,20,0,0,315,SXF_TRANSFERPOINTERS)
			Stop
	}
}

Actor FireblastExploder
{
	Radius 2
	Height 2
	Projectile
	+NOGRAVITY
	+THRUACTORS
	ReactionTime 4
	States
	{
		Spawn:
			TNT1 AA 0 A_SpawnItemEx("FireblastExplosion",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
			TNT1 A 7 A_Countdown
			Loop
		Death:
			Stop
	}
}

Actor FireblastExplosion
{
	+NOINTERACTION
	+NOGRAVITY
	+FORCERADIUSDMG
	ReactionTime 5
	DamageType Fire
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_Quake(4, 15, 0, 384, none)
			TNT1 A 0 A_Explode(700,128)
			TNT1 A 0 A_PlaySound("Torchglow/Exp",5,0.8)
			TNT1 A 0 A_PlaySound("Torchglow/Burn",6,0.8)
			//Why so half-assed? Because bunnies, that's why
			TNT1 A 0 A_SpawnItemEx("Fireblast_Flare", 0, 0 ,0, 0, 0, 0, 0, SXF_CLIENTSIDE)
			TNT1 A 5
			TNT1 AAAAA 0 A_SpawnItemEx("Firewall_Ember", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-2.0, -13.0), FRandom(-6.0, 6.0),
									FRandom(1.0, 8.0), 0, SXF_CLIENTSIDE, 10)
			//Shockwave
			TNT1 AAAAAA 0 A_SpawnItemEx("Firewall_Flame", FRandom(-30, 30),
									FRandom(-30, 30), FRandom(-30, 30),
									FRandom(3.5, 4.5), FRandom(3.5, 4.5),
									FRandom(-0.05, 0.05), random(0,359), SXF_CLIENTSIDE, 10)
			TNT1 AAA 0 A_SpawnItemEx("Firewall_Smoke", FRandom(-30, 30),
									FRandom(-30, 30), FRandom(-30, 30),
									FRandom(0.5, 1.0), FRandom(0.5, 1.0),
									FRandom(-0.05, 0.05), random(0,359), SXF_CLIENTSIDE, 10)
			TNT1 AAAAA 0 A_SpawnItemEx("Firewall_Glow", FRandom(-30, 30),
									FRandom(-30, 30), FRandom(-30, 30),
									FRandom(3.5, 3.0), FRandom(3.5, 3.0),
									FRandom(-0.05, 0.05), random(0,359), SXF_CLIENTSIDE, 10)
		GloriousSausageAbominationOfDoom:
			TNT1 A 0 A_Countdown
			TNT1 AAAA 0 A_SpawnItemEx("Firewall_Flame", FRandom(-30, 30),
									FRandom(-30, 30), FRandom(-30, 30),
									FRandom(2.5, 4.5), FRandom(2.5, 4.5),
									FRandom(-2.0, 3.0), random(0,359), SXF_CLIENTSIDE, 10)
			TNT1 AAA 0 A_SpawnItemEx("Firewall_Smoke", FRandom(-30, 30),
									FRandom(-30, 30), FRandom(-30, 30),
									FRandom(0.05, -0.05), FRandom(-0.05, 0.05),
									FRandom(-0.05, 0.075), random(0,359), SXF_CLIENTSIDE, 10)
			TNT1 AAAAA 0 A_SpawnItemEx("Firewall_Glow", FRandom(-30, 30),
									FRandom(-30, 30), FRandom(-30, 30),
									FRandom(-1.5, -3.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), random(0,359), SXF_CLIENTSIDE, 10)
			TNT1 A 1
			Loop
		Death:
			TNT1 A 26
			Stop
	}
}

Actor Fireblast_Flare : Torchglow_BaseParticle
{
	RenderStyle Add
	Scale 2.9
	States
	{
		Spawn:
			FALC I 1 Bright A_FadeOut(0.05)
			Loop
	}
}
