actor Fireman_W : BaseMM8BDMWep_CBM 
{
tag "$TAGC_1E"
dropitem "FireStormWep"
Weapon.AmmoUse1 0
Weapon.AmmoGive 28
Obituary "$OB_FIRESTORM"
Inventory.Pickupmessage "Power up! Fire Storm!"
weapon.ammotype "BurningJusticeAmmo"
States
{
Spawn:
C_01 E 1
loop

Deselect:
FIRB A 0
goto DeselectSwap
Select:
FIRB A 0
goto SelectSwap

Ready:
FIRB A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_FIREMAN)
goto Ready1
Ready1:
FIRB A 0 A_JumpIfInventory("BurningJusticeAmmo",28,"Ready2")
FIRB A 7 A_WeaponReady(8)
FIRB A 0 A_GiveInventory("BurningJusticeAmmo",1)
loop
Ready2:
FIRB A 7 A_WeaponReady
FIRB A 0 A_GiveInventory("BurningJusticeAmmo",1)
loop

Fire:
FIRB A 0 A_PlaySoundEx("weapon/firemanshot","Weapon")
FIRB A 0 A_FireCustomMissile("FiremanStormShot",0,1,8,0)
FIRB A 0 A_JumpIfInventory("IsBot",1,"BotFire")
FIRB B 1 OffSet(-3,29)
FIRB B 2 OffSet(-7,23)A_GunFlash("Flash",1)
FIRB B 2 OffSet(-14,17)
FIRB A 2 OffSet(-17,15)
FIRB A 2 OffSet(-15,17)A_GiveInventory("BurningJusticeAmmo",1)
FIRB A 2 OffSet(-12,20)
FIRB A 2 OffSet(-9,23)
FIRB A 2 OffSet(-6,26)
FIRB A 1 OffSet(-3,29)//16
Goto Ready1
Altfire:
FIRB C 2 offset(2,32)A_GiveInventory("Fireman_Alt_P")
FIRB C 2 offset(-12,38)
FIRB D 2 offset(2,16)
FIRB E 2 offset(2,40)
FIRB E 8 offset(20,24)
FIRB E 2 offset(22,36)
FIRB E 2 offset(16,56)
FIRB E 2 offset(8,76)
FIRB A 2 offset(8,22)
FIRB A 2 A_WeaponReady(14)
Goto Ready1

Flash:
TNT1 A 0 A_SpawnItemEx("FiremanStormShield",0,0,32)
TNT1 A 0 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,0,1+8)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,315,1+8)
TNT1 A 0 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,270,1+8)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,225,1+8)
TNT1 A 0 A_SpawnItemEx("FiremanStormShield",0,0,32)
TNT1 A 0 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,180,1+8)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,135,1+8)
TNT1 A 0 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,90,1+8)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,45,1+8)
TNT1 A 0 A_SpawnItemEx("FiremanStormShield",0,0,32)
TNT1 A 0 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,0,1+8)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,315,1+8)
TNT1 A 0 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,270,1+8)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,225,1+8)
TNT1 A 0 A_SpawnItemEx("FiremanStormShield",0,0,32)
TNT1 A 0 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,180,1+8)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,135,1+8)
TNT1 A 0 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,90,1+8)
TNT1 A 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 1 A_SpawnItemEx("FiremanStormShieldFX",64,0,34,momx,momy,momz,45,1+8)
stop

BotFire:
FIRB A 0 A_JumpIfInventory("BurningJusticeAmmo",28,"Altfire")
FIRB A 0 A_GiveInventory("BotHugFlag",1)
FIRB B 1 OffSet(-3,29)A_GiveInventory("BurningJusticeAmmo",random(1,3))
FIRB B 2 OffSet(-7,23)A_GunFlash("Flash",1)
FIRB B 2 OffSet(-14,17)
FIRB A 2 OffSet(-17,15)
FIRB A 2 OffSet(-15,17)
FIRB A 2 OffSet(-12,20)
FIRB A 2 OffSet(-9,23)
FIRB A 2 OffSet(-6,26)
FIRB A 1 OffSet(-3,29)
FIRB A 0 A_TakeInventory("BotHugFlag",999)
Goto Ready1
}
}

actor BurningJusticeAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}


actor Fireman_Alt_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("BurningJusticeAmmo",6)
TNT1 A 0 A_TakeInventory("BurningJusticeAmmo",22,1)
TNT1 A 0 A_FireCustomMissile("FireManWaveStart",0,1,0,0)
stop
}
}

actor FiremanStormShot : ProjSpawnFuncActor
{
var int user_P;
PROJECTILE
damagetype "FireM_Storm"
Obituary "$OB_FIRESTORM"
+SKYEXPLODE
+EXPLODEONWATER
+BRIGHT
Alpha 0.4
damage (100+user_P)
Radius 12
Height 20
speed 40
Scale 2.0
States
{
Spawn:
TNT1 A 1
FWVE M 2 A_FadeIn(0.1)
FWVE M 0 A_SetUserVar("user_P",30)
FWVE NOMNO 2 A_FadeIn(0.1)
Spawn2:
FWVE MNO 2
loop
Death:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("FiremanStormShotBit")
TNT1 A 2 A_SpawnItemEx("OilPitIgnite",0,0,8)
stop
}
}

actor FiremanStormShotBit : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_FIRESTORM"
damagetype "FireM_StormBit"
+DONTBLAST
+DONTREFLECT
+FLOORHUGGER
+THRUACTORS
+BRIGHT
reactiontime 5
Damage (0)
Radius 12
Height 6
Speed 0
Scale 2.5
States
{
Spawn:
//FWVE BX 3 //Bass BX, bad memories
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
TNT1 A 0 A_SpawnItemEx("FiremanStormShotBitD")
FWVE PQP 3
FWVE Q 0 A_SpawnItemEx("FiremanStormShotBitD")
FWVE QPQ 3
FWVE P 0 A_SpawnItemEx("FiremanStormShotBitD")
FWVE PQP 3
FWVE Q 0 A_SpawnItemEx("FiremanStormShotBitD")
FWVE QPQ 3
FWVE P 0 A_SpawnItemEx("FiremanStormShotBitD")
FWVE PQ 3
stop
}
}

actor FiremanStormShotBitD : FiremanStormShotBit
{
-USESPAWNEVENTSCRIPT
-THRUACTORS
+RIPPER
Damage (30)
States
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
}
}


actor FireManWaveStart : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_SpawnItemEx("FireManWaveTime",20,0,24,5,0,0,0,1)
stop
}
}

actor FireManWaveTime
{
PROJECTILE
+DONTBLAST
+DONTREFLECT
+THRUACTORS
+FLOORHUGGER
+RIPPER
Damage (0)
Radius 20
Height 26
Speed 5
States
{
Spawn:
TNT1 A 0
TNT1 A 8 A_SpawnItemEx("FireManWaveD",0,0,0,0,0,0,0,1)
Loop
}
}

actor FireManWaveD : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_FIRESTORMW"
damagetype "FireM_Wave"
+DONTBLAST
+DONTREFLECT
+RIPPER
+FLOORHUGGER
+BRIGHT
Radius 20
Height 26
Damage (30)
Speed 0
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
FWVE UVW 2
FWVE X 0 A_PlaySoundEx("weapon/FireManWave","Weapon")
FWVE XYXYXYXYXYXYXYXYXYXYXY 2
FWVE W 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
FWVE WVU 2
stop
Death:
TNT1 A 1
stop
}
}

actor FiremanStormShieldFX : BasicGraphicEffect//BasicExplosion
{
+FORCEXYBILLBOARD
+BRIGHT
renderstyle translucent
alpha 0.6
scale 2.5
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2,3)
FWVE R 2
stop
FWVE S 2
stop
FWVE T 2
stop
}
}

actor FiremanStormShield : BasicImplosion
{
Obituary "$OB_FIRESTORM"
damagetype "FireM_Spin"
States
{
Spawn:
TNT1 A 0
TNT1 A 4 A_Explode(40+CallACS("core_checkrune",RUNE_SPREAD,2)*80,80,0,0,80)
stop
}
}

actor Fireman_W_NormalBar : NormalBar {Args 229,227}