/*

==FIREBRAND SHOTGUN==
This twin barreled shotgun takes full advantage of
the heat system of the Blastmaster Mk.2, the barrels are designed
to contain all of the collected heat and vent it outwards, turning 
common shotgun pellets into flaming slag. As the heat builds, the 
pellets melt and merge into larger, rebounding slag lumps. Finally 
at max heat all that is fired is an explosive wave of heat and flames,
roasting not only targets in front of the user, but burning and blasting
any other nearby enemies.
*/

actor BmSSG : weapon
{
	weapon.slotnumber 3
	Weapon.AmmoUse 2
	weapon.bobstyle alpha
	weapon.bobrangex 0.2
	weapon.bobrangey 0.2
	weapon.bobspeed 2
	Weapon.AmmoType "Shell"
	Inventory.RestrictedTo "Blastmaster"
	Inventory.PickupMessage "You got the Firebrand shotgun!"
	+NOAUTOAIM
	Tag "Firebrand Shotgun"
	states
	{
	Select:
		TNT1 A 0
        TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_Raise
        TNT1 A 1 A_Raise
		goto ready
	Ready:
		BMST A 2
		TNT1 A 0 a_playsound ("BMssg/raise",0)
		SSGI ABCDEFG 1
		TNT1 A 0 a_playsound ("BMssg/raiseend",0)
		SSGI GHIJKLMNOPQRST 1 a_weaponready (WRF_NOBOB)
		goto realready
	Deselect:
		TNT1 A 0
		TNT1 A 0 a_jumpifhealthlower (1, "deadlower")
		TNT1 A 0 a_takeinventory ("secretaction", 99)
		TNT1 A 0
		TNT1 A 0 a_playsound ("BMssg/lower",0)
		SSGI RPNMJHEDCBA 1
		BMST A 5
	holster:
        TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_lower
        TNT1 A 1 A_lower
		loop
	deadlower:
		TNT1 A 0
		TNT1 A 0
		TNT1 AAAAAAAAAAAAA 0 a_lower
		TNT1 A 1 a_lower
		wait	
	Realready:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("BMoverheat",1,"lockdown")
		BSSG A 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("BMoverheat",1,"lockdown")
		loop
	lockdown:
		TNT1 A 0
		BSSG A 3 a_weaponready (WRF_NOPRIMARY)
		TNT1 A 0 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG A 3 a_weaponready (WRF_NOPRIMARY)
		TNT1 A 0 a_jumpifinventory ("BMoverheat",1,"lockdown")
		goto realready
	Fire:
		TNT1 A 0 
		TNT1 A 0 a_jumpifinventory ("BMoverheat",1,"lockdown")
		TNT1 A 0 a_jumpifinventory ("BMheat",156,"ExplosionShot")
		TNT1 A 0 a_jumpifinventory ("BMheat",91,"BigPellets")
		BSSG A 3
		TNT1 A 0 A_giveinventory ("BlastMasterFired",1)
		TNT1 A 0 A_FireCustomMissile("FirePellet", Frandom(-5,5),1,0,0,0,Frandom(-5,5))
		TNT1 AA 0 A_FireCustomMissile("FirePellet", Frandom(-5,5),0,0,0,0,Frandom(-5,5))
		TNT1 AAA 0 A_FireCustomMissile("FirePellet", Frandom(-5,5),0,0,0,0,Frandom(-5,5))
		TNT1 AAA 0 A_FireCustomMissile("FirePellet", Frandom(-6,7),0,0,0,0,Frandom(-4,4))
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("FirePellet", Frandom(-8,8),0,0,0,0,Frandom(-3,3))
		TNT1 A 0 A_Quake(3, 5, 0, 32)
		TNT1 A 0 a_giveinventory ("BMheat",1)
		TNT1 A 0 a_playsound ("BMssg/fire",CHAN_WEAPON)
		TNT1 A 0 a_gunflash
		BSSG BCD 1 bright a_giveinventory ("BMheat",8)
		BSSG E 1
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_weaponready (WRF_NOPRIMARY)
		BSSG FG 2
		TNT1 A 0 a_jumpifinventory ("shell",2,"loadshells")
		BSSG A 1
		goto realready
	BigPellets:
		TNT1 A 0
		BSSG A 3
		TNT1 A 0 A_giveinventory ("BlastMasterFired",1)
		TNT1 A 0 A_FireCustomMissile("SuperFirePellet", Frandom(-5,5),1,0,0,0,Frandom(-5,5))
		TNT1 AAA 0 A_FireCustomMissile("SuperFirePellet", Frandom(-6,7),0,0,0,0,Frandom(-4,4))
		TNT1 AAAAAA 0 A_FireCustomMissile("SuperFirePellet", Frandom(-8,8),0,0,0,0,Frandom(-3,3))
		TNT1 A 0 A_Quake(3, 5, 0, 32)
		TNT1 A 0 a_giveinventory ("BMheat",1)
		TNT1 A 0 a_playsound ("Blastmaster/highheat",0)
		TNT1 A 0 a_playsound ("BMssg/Lv2Fire",CHAN_WEAPON)
		TNT1 A 0 a_gunflash
		TNT1 AAAA 0 a_firecustommissile ("missilefire",random(-4,4),0,0,0,0,random(-5,5))
		TNT1 A 0 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSS2 BCD 1 bright a_giveinventory ("BMheat",8)
		BSSG E 1
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_weaponready (WRF_NOPRIMARY)
		BSSG FG 2
		TNT1 A 0 a_jumpifinventory ("shell",2,"loadshells")
		BSSG A 1
		goto realready
	ExplosionShot:
		TNT1 A 0
		BSSG A 3
		TNT1 A 0 A_giveinventory ("BlastMasterFired",1)
		TNT1 A 0 ThrustThingZ (0, 15, 0, 0)	
		TNT1 A 0 A_ChangeVelocity(Cos(Pitch)*-30,0,Sin(Pitch)*20,1)
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("FirebrandSuperFX", random(-15,15),0,0,random(-8,8),0,random(-3,3))
		TNT1 A 0 A_FireCustomMissile("FirebrandSuperFX", random(-15,15),1,0,random(-8,8),0,random(-3,3))		
		TNT1 A 0 a_firecustommissile ("FirebrandAOE",0,0)
		TNT1 A 0 A_Quake(3, 5, 0, 32)
		TNT1 A 0 a_giveinventory ("BMheat",1)
		TNT1 A 0 a_playsound ("Blastmaster/highheat",0)
		TNT1 A 0 a_playsound ("BMssg/Lv3Fire",CHAN_WEAPON)
		TNT1 A 0 a_gunflash
		TNT1 A 0 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSS3 BCD 1 bright a_giveinventory ("BMheat",5)
		BSSG E 1
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_firecustommissile ("smashersmokespawner",0,0,0,0,0,0)
		BSSG E 2 a_weaponready (WRF_NOPRIMARY)
		BSSG FG 2
		TNT1 A 0 a_jumpifinventory ("shell",2,"loadshells")
		BSSG A 1
		goto realready


	loadshells:
		BSGR AB 2
		BSGR CDE 1
		TNT1 A 0 a_playsound ("BMssg/open",0)
		BSGR FGH 1
		D3PS CC 0 A_FireCustomMissile("Shellcasingspawner",-20,0,-8,6)
		BSGR IJKLMN 1
		TNT1 A 0 a_playsound ("BMssg/load",0)
		BSGR OPPQ 1
		BSGR RSTUVW 2
		TNT1 A 0 a_playsound ("BMssg/close",0)		
		BSGR DC 2 a_weaponready (WRF_NOPRIMARY)
		BSGR BA 2 a_weaponready (WRF_NOPRIMARY)
		BSSG A 1 a_weaponready (WRF_NOPRIMARY)
		goto realready


	//VENT ATTACKS------------------------------------------------------------------
	Altfire:
		TNT1 A 0
		BSSG A 2 A_weaponready (WRF_NOFIRE)
		TNT1 A 0 A_jumpifinventory ("BMoverheat",1,"OverHeatFire")
		TNT1 A 0 A_jumpifinventory ("BMheat",156,"RedGrenade")
		TNT1 A 0 A_jumpifinventory ("BMheat",91,"YellowMachineGun")
		TNT1 A 0 A_jumpifinventory ("BMheat",1,"BlueFire")
		goto realready

	//Blue Fire (Tier one)----------------------------------------------------------
	BlueFire:
		TNT1 A 0 A_playsound ("BlastMaster/BlueFireStart",0)
		TNT1 A 0 A_playsound ("BlastMaster/BlueFireLoop",6,1,1)
	BlueFireLoop:
		TNT1 A 0 A_gunflash
		TNT1 A 0 A_takeinventory ("BMheat",2)
		TNT1 A 0 A_giveinventory ("BlastMasterFired",1)
		TNT1 A 0 A_giveinventory ("BlastMasterVented",1)
		TNT1 A 0 A_recoil (0.10)
		TNT1 A 0 Bright A_FireCustomMissile ("BlueVentFire",Frandom(-5, 5), 0, random(-1,1), random(-2,-1), 0, Frandom(-2, 2))
		BSSG A 0 A_jumpifinventory ("SuperVenter",1,"SuperBlueFire")
		BMV4 AB 1 bright
		TNT1 A 0 A_jumpifinventory ("BMHeat",1,"BlueFireLoop")
		TNT1 A 0 A_playsound ("BlastMaster/BlueFireEnd",6)
		goto VentFinish
	SuperBlueFire:
		TNT1 A 0
		TNT1 A 0 A_FireCustomMissile ("BlueVentEmber1",Frandom(-5, 5), 0, random(-4,4), random(1,4), 0, Frandom(-5, 5))
		TNT1 A 0 A_FireCustomMissile ("BlueVentEmber2",Frandom(-5, 5), 0, random(-4,4), random(1,4), 0, Frandom(-5, 5))
		TNT1 A 0 Bright A_FireCustomMissile ("BlueVentFire",Frandom(-9, 9), 0, random(-3,3), random(-2,-1), 0, Frandom(-4, 4))
		TNT1 A 0 A_playsound ("BlastMaster/PowerFire",0)
		BMV4 AB 1 bright
		TNT1 A 0 A_jumpifinventory ("BMHeat",1,"BlueFireLoop")
		TNT1 A 0 A_playsound ("BlastMaster/BlueFireEnd",6)
		goto VentFinish

	//Yellow Machine Gun (Tier two)--------------------------------------------------
	YellowMachineGun:
		TNT1 A 0 A_gunflash
		TNT1 A 0 A_takeinventory ("BMheat",4)
		TNT1 A 0 A_giveinventory ("BlastMasterFired",1)
		TNT1 A 0 A_giveinventory ("BlastMasterVented",1)
		TNT1 A 0 A_playsound ("BlastMaster/YellowShot",6)
		TNT1 A 0 A_Quake(1, 2, 0, 32)
		BSSG A 0 A_jumpifinventory ("SuperVenter",1,"YellowHitScan")
		ESHG B 0 Bright A_FireCustomMissile("YellowVentBullet",Frandom(-2, 2), 0, 0, random(-1,1), 0, Frandom(-2, 2))
		BMV4 CD 1 bright
		BSSG A 1
		TNT1 A 0 A_jumpifinventory ("BMHeat",1,"YellowMachineGun")
		goto VentFinish
	YellowHitScan:
		ESHG B 0 Bright A_FireBullets (3.5, 2.0, -1, 9, "YellowCAPuff",FBF_NORANDOM) 
		BMV4 C 1 bright
		TNT1 A 0 A_playsound ("BlastMaster/PowerGun",6)
		BMV4 D 1 bright
		BSSG A 1
		TNT1 A 0 A_jumpifinventory ("BMHeat",1,"YellowMachineGun")
		goto VentFinish

	//Red Grenade (Tier three)--------------------------------------------------------
	RedGrenade:
		TNT1 A 0 A_gunflash
		TNT1 A 0 A_playsound ("BlastMaster/RedGrenade",6)		
		TNT1 A 0 A_takeinventory ("BMheat",999)
		TNT1 A 0 A_giveinventory ("BlastMasterVented",1)
		TNT1 A 0 A_giveinventory ("BlastMasterFired",1)
		TNT1 A 0 A_Quake(2, 6, 0, 32)
		BSSG A 0 A_jumpifinventory ("SuperVenter",1,"SuperGrenade")
		ESHG B 0 Bright A_FireCustomMissile("RedGrenade")
		BMV4 EFGHHIIJJKKLL 1 bright
		BSSG A 3
		goto VentFinish
	SuperGrenade:
		ESHG B 0 Bright A_FireCustomMissile("SuperRedGrenade")
		BMV4 EFGHH 1
		TNT1 A 0 a_playsound ("BlastMaster/PowerGrenade",0)		
		BMV4 IIJJKKLL 1 bright
		BSSG A 3
		goto VentFinish

		
	
	VentFinish:
		BSSG A 3
		BMP4 ABCC 2
		TNT1 A 0 A_takeinventory ("BlastMasterFired",99)
		TNT1 A 0 A_takeinventory ("BlastMasterVented",99)
		TNT1 A 0 A_playsound ("BlastMaster/PumpDown",0)
		BMP4 DEFFG 2 A_FireCustomMissile ("BlastMasterSmoker",0,0,6,6)
		TNT1 A 0 A_playsound ("BlastMaster/PumpUp",0)
		BMP4 CBA 2
		BSSG A 1
		goto realready

	//Super Flamer (Overheat)--------------------------------------------------------
	OverHeatFire:
		TNT1 A 0 A_takeinventory ("BlastMasterFired",99)
		TNT1 A 0 A_takeinventory ("BlastMasterVented",99)
		TNT1 A 0 A_playsound ("BlastMaster/BlueFireStart",0)
		TNT1 A 0 A_playsound ("BlastMaster/RedFireStart",0)
		TNT1 A 0 A_playsound ("BlastMaster/RedFireLoop",6,1,1)
	OverHeatFireLoop:
		TNT1 A 0 A_gunflash
		TNT1 A 0 Bright A_FireCustomMissile ("RedVentFire",Frandom(-5, 5), 0, random(-1,1), random(-2,-1), 0, Frandom(-2, 2))
		TNT1 A 0 A_takeinventory ("BMOverHeat",1)
		TNT1 A 0 A_recoil (0.15)
		BSSG A 0 A_jumpifinventory ("SuperVenter",1,"SuperRedFire")
		BMV4 MN 1 bright
		TNT1 A 0 A_refire ("OverHeatCheck")
		TNT1 A 0 A_playsound ("BlastMaster/RedFireEnd",6)	
		BSSG A 0 A_jumpifinventory ("SuperVenter",1,"RedFinisherCheck")
		BSSG A 6 
		BSSG A 6 A_weaponready (WRF_NOPRIMARY)
		goto LockDown	
	OverHeatCheck:
		TNT1 A 0 A_jumpifinventory ("BMOverHeat",1,"OverHeatFireLoop")
		TNT1 A 0 A_playsound ("BlastMaster/RedFireEnd",6)	
		goto VentFinish

	SuperRedFire:
		TNT1 A 0
		TNT1 A 0 A_FireCustomMissile ("RedVentEmber1",Frandom(-5, 5), 0, random(-4,4), random(1,4), 0, Frandom(-5, 5))
		TNT1 A 0 A_FireCustomMissile ("RedVentEmber2",Frandom(-5, 5), 0, random(-4,4), random(1,4), 0, Frandom(-5, 5))
		TNT1 A 0 Bright A_FireCustomMissile ("RedVentFire",Frandom(-9, 9), 0, random(-3,3), random(-2,-1), 0, Frandom(-4, 4))
		TNT1 A 0 A_playsound ("BlastMaster/PowerFire",0)
		BMV4 MN 1 bright
		TNT1 A 0 A_refire ("OverHeatCheck")
		TNT1 A 0 A_playsound ("BlastMaster/RedFireEnd",6)
		goto RedFinisherCheck
	RedFinisherCheck:
		TNT1 A 0 A_jumpifinventory ("BMOverHeat",60,"SuperFinisher")
		goto LockDown
	SuperFinisher:
		TNT1 A 0 A_gunflash
		TNT1 A 0 A_playsound ("BlastMaster/RedGrenade",6)		
		TNT1 A 0 A_takeinventory ("BMOverHeat",60)
		BSSG A 0 A_jumpifinventory ("SuperVenter",1,"SuperGrenade")
		ESHG B 0 Bright A_FireCustomMissile("RedGrenade")
		BMV4 EFGHHIIJJKKLL 1 bright
		BSSG A 6
		goto LockDown

	Flash:
		TNT1 A 2 Bright A_Light(3)
		TNT1 A 2 Bright A_Light2
		TNT1 A 2 Bright A_Light1
		Goto LightDone
	}
}


//============================================================================
//============================================================================
//PROJECTILES


ACTOR FirePellet
{
	Speed 55
	Radius 13
	Height 10
	PROJECTILE
	damage (10)
	gravity 0.20
	Scale 0.35
	renderstyle add
	alpha 0.99
	decal CADecal
	translation "0:255=%[0.05,0.17,0.45]:[0.57,0.88,1]" 
	States
	{
	Spawn:
		VBX3 A 3 Bright a_spawnitemex ("RedVentEmber3",Frandom(-5,5),Frandom(-5,5),Frandom(-5,5),Frandom(-50,50)/20.0,Frandom(-50,50)/20.0,Frandom(-50,50)/20.0,0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_scalevelocity (0.80)
		VBX3 B 3 Bright A_SpawnItemEx("RedVentEmber4",frandom(-2,2),frandom(-2,2),frandom(-2,2),0,0,0,0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_scalevelocity (0.70)
		VBX3 A 3 Bright a_spawnitemex ("RedVentEmber3",Frandom(-5,5),Frandom(-5,5),Frandom(-5,5),Frandom(-50,50)/20.0,Frandom(-50,50)/20.0,Frandom(-50,50)/20.0,0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_scalevelocity (0.40)
		VBX3 B 3 Bright  A_SpawnItemEx("RedVentEmber4",frandom(-2,2),frandom(-2,2),frandom(-2,2),0,0,0,0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_changeflag ("NOGRAVITY",0)
	drift:
		VBX3 A 3 Bright a_spawnitemex ("RedVentEmber3",Frandom(-5,5),Frandom(-5,5),Frandom(-5,5),Frandom(-50,50)/20.0,Frandom(-50,50)/20.0,Frandom(-50,50)/20.0,0,SXF_TRANSFERTRANSLATION)
		VBX3 B 3 Bright A_SpawnItemEx("RedVentEmber4",frandom(-2,2),frandom(-2,2),frandom(-2,2),0,0,0,0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_scalevelocity (0.95)
		loop
	Death:
		TNT1 A 0
		TNT1 A 0 a_changeflag ("NOGRAVITY",1)
		TNT1 A 0 a_changeflag ("NOINTERACTION",1)
		TNT1 A 0 a_scalevelocity (0.90)
		TNT1 A 0 a_fadeout (0.10)
		TNT1 AA 0 A_SpawnItemEx("RedVentEmber4",frandom(-2,2),frandom(-2,2),frandom(-8,-4),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_TRANSFERTRANSLATION)
		VBX4 BC 1 A_SpawnItemEx("RedVentEmber3",frandom(-2,2),frandom(-2,2),frandom(-8,-4),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_scalevelocity (0.10)
	FadingOut:	
		VBX4 C 1 A_SetScale (scalex * frandom(1.10,1.20),scaley * frandom(1.10,1.20))
		TNT1 A 0 a_fadeout (0.20)
		Loop
	Crash:
	Xdeath:
		TNT1 A 0 A_SpawnItemEx("RedVentEmber4",frandom(-2,2),frandom(-2,2),frandom(-8,-4),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_changeflag ("NOGRAVITY",1)
		TNT1 AAAAAAAAAAAAA 0 A_SpawnItemEx("RedVentEmber3",frandom(-2,2),frandom(-2,2),frandom(-8,-4),frandom(-3,3),frandom(-3,3),frandom(-4,-4),0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_playsound ("BlastMaster/FirePelletHit",0,1,0,0.80)
		VBX4 DEFGHIJ 1 A_SetScale (scalex * frandom(1.10,1.20),scaley * frandom(1.10,1.20))
		VBX4 J 1 a_fadeout (0.20)
		wait
	}
}

actor SuperFirePellet : FirePellet
{
	damage (25)
	+hexenbounce
	gravity 0.90
	bouncefactor 1.10
	Scale 1.20
	alpha 0.60
	bouncecount 9
	-NOGRAVITY
	translation "0:255=%[0.80,0.80,0.015]:[1,1,1]" 
	//translation "0:255=%[0.70,0.44,0]:[0.80,0.80,0.015]" 
	states
	{
	spawn:
		VBX3 A 3 Bright a_spawnitemex ("RedVentEmber1",Frandom(-5,5),Frandom(-5,5),Frandom(-5,5),Frandom(-50,50)/20.0,Frandom(-50,50)/20.0,Frandom(-50,50)/20.0,0,SXF_TRANSFERTRANSLATION)
		VBX3 B 3 Bright A_SpawnItemEx("RedVentEmber2",frandom(-2,2),frandom(-2,2),frandom(-2,2),0,0,0,0,SXF_TRANSFERTRANSLATION)
		loop
	Death:
		TNT1 A 0
		TNT1 A 0 a_changeflag ("NOGRAVITY",1)
		TNT1 A 0 a_changeflag ("NOINTERACTION",1)
		TNT1 A 0 a_scalevelocity (0.90)
		TNT1 A 0 a_fadeout (0.10)
		TNT1 AA 0 A_SpawnItemEx("RedVentEmber2",frandom(-2,2),frandom(-2,2),frandom(-8,-4),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_TRANSFERTRANSLATION)
		VBX4 BC 1 A_SpawnItemEx("RedVentEmber1",frandom(-2,2),frandom(-2,2),frandom(-8,-4),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_scalevelocity (0.10)
	FadingOut:	
		VBX4 C 1 A_SetScale (scalex * frandom(1.10,1.20),scaley * frandom(1.10,1.20))
		TNT1 A 0 a_fadeout (0.20)
		Loop
	Crash:
	Xdeath:
		TNT1 A 0 A_SpawnItemEx("RedVentEmber2",frandom(-2,2),frandom(-2,2),frandom(-8,-4),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_changeflag ("NOGRAVITY",1)
		TNT1 AAAAAAAAAAAAA 0 A_SpawnItemEx("RedVentEmber1",frandom(-2,2),frandom(-2,2),frandom(-8,-4),frandom(-3,3),frandom(-3,3),frandom(-4,-4),0,SXF_TRANSFERTRANSLATION)
		TNT1 A 0 a_playsound ("BlastMaster/FirePelletHit",0,1,0,0.80)
		VBX4 DEFGHIJ 1 A_SetScale (scalex * frandom(1.10,1.20),scaley * frandom(1.10,1.20))
		VBX4 J 1 a_fadeout (0.20)
		wait
	}
}


ACTOR FirebrandSuperFX
{
	Speed 55
	Radius 13
	Height 10
	PROJECTILE
	damage (1)
	+Ripper
	+bloodlessimpact
	gravity 0.20
	Scale 0.60
	renderstyle add
	alpha 0.99
	translation "0:255=%[0.47,0.015,0]:[0.86,0.32,0.30]" 
	states
	{
	Spawn:
		TNT1 A random (1,2)
		TNT1 A 0 a_scalevelocity (0.10)
		VBX4 DEFGHIJ random (2,4) A_SetScale (scalex * frandom(1.10,1.20),scaley * frandom(1.10,1.20))
		goto death
	death:
		VBX4 J 3
		VBX4 J 1 A_SetScale (scalex * frandom(1.20,1.40),scaley * frandom(1.20,1.40))
		TNT1 A 0 a_fadeout (0.50)
		loop
	}
}


ACTOR FirebrandAOE
{
	Radius 4
	Height 4
	Speed 0
	Damage 0
	Projectile
	+NOCLIP
	+MTHRUSPECIES
	+Noextremedeath
	Species "Player"
	States
	{
	Spawn:
		TNT1 A 1
		Goto Death
	Death:
		TNT1 A 0
		TNT1 A 0 a_radiusgive ("HammerBlastBack",350,RGF_MONSTERS,1)
		TNT1 A 10 a_explode (350,300,0,0,100)
		Stop
	}
}

ACTOR HammerBlastBack : CustomInventory
{
	+AUTOACTIVATE
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
		Stop
	Use:
		TNT1 A 0 a_facetarget
		TNT1 A 0 ThrustThing(angle * 256 / 360 + 128, 35, 0, 0)
		TNT1 A 0 thrustthingz (0,25,0,0)
		TNT1 A 1 
		Stop
	}
}
