actor Flameman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_6C"
dropitem "FlameBlastWep"
Weapon.AmmoUse 4
Weapon.AmmoUse2 56
Weapon.AmmoGive 56
Obituary "$OB_FLAMEBLAST"
Inventory.Pickupmessage "Cheating Flame Blast."
weapon.ammotype "YogaInfernoAmmo"
weapon.ammotype2 "YogaBurnerAmmo"
States
{
Spawn:
C_06 C 1
loop

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

Ready:
FLAB A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_FLAMEMAN)
goto Ready1
Ready0:
FLAB A 8 A_GiveInventory("Flameman_Ready_P")
goto Ready1
Ready1:
FLAB A 4 A_GiveInventory("Flameman_Ready_P")
FLAB A 0 A_GiveInventory("YogaInfernoAmmo",2)
FLAB A 0 A_GiveInventory("YogaBurnerAmmo",1)
loop

Fire:
FLAB B 0 A_JumpIfInventory("IsBot",1,"BotFire")
FLAB B 3 A_GiveInventory("Flameman_Fire_P")
FLAB C 3
FLAB B 2
FLAB A 12
goto Ready0

AltFire:
FLAB B 0 A_GiveInventory("VivifyDelay8",1)
FLAB B 0 A_Refire(1)
FLAB BC 3
FLAB B 2 A_GiveInventory("Flameman_Alt_P")
FLAB A 6
goto Ready0

BotFire:
FLAB B 0 A_JumpIfInventory("YogaBurnerAmmo",56,1)
goto Fire+1
FLAB B 0 A_JumpIfCloser(500,"AltFire")
FLAB B 0 A_Jump(112,"AltFire")
goto Fire+1
}
}

actor YogaInfernoAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 56
+INVENTORY.IGNORESKILL
}

actor YogaBurnerAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 56
+INVENTORY.IGNORESKILL
}

actor Flameman_Ready_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("YogaInfernoAmmo",4,5)
TNT1 A 0 A_JumpIfInventory("YogaBurnerAmmo",56,2)
TNT1 A 0 A_WeaponReady(WRF_NOFIRE)
stop
TNT1 A 0 A_JumpIfInventory("YogaInfernoAmmo",4,4)
TNT1 A 0 A_WeaponReady(WRF_NOPRIMARY)
stop
TNT1 A 0 A_JumpIfInventory("YogaBurnerAmmo",56,2)
TNT1 A 0 A_WeaponReady(WRF_NOSECONDARY)
stop
TNT1 A 0 A_WeaponReady
stop
}
}

actor Flameman_Fire_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySound("weapon/FlameBall",1)
TNT1 A 0 A_FireCustomMissile("FlameM_Shot",0,1,-8,0)
TNT1 A 0 A_GiveInventory("YogaBurnerAmmo",1)
stop
}
}
actor Flameman_Alt_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySound("weapon/FlameWave",1)
TNT1 A 0 A_FireCustomMissile("FlameM_PillarWave_H",0,1,-8,0)
TNT1 A 0 A_TakeInventory("YogaBurnerAmmo",16)
stop
}
}

actor FlameM_Shot : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_FLAMEBLAST"
damagetype "FlameM_Shot"
+SKYEXPLODE
+EXPLODEONWATER
+BRIGHT
Damage (170)
Radius 10
Height 10
Speed 28//40
Scale 2.5
States
{
Spawn:
FLAB MN 2
loop
Crash:
XDeath:
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
Stop
Death:
TNT1 A 0 A_JumpIf(CeilingZ - FloorZ <=48 , "FireCheckOnly")
TNT1 A 0 A_JumpIf(z-ceilingz==0-10,"FireCheckOnly")
FLMB H 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
FLMB H 0 A_CheckFloor("Floor")
FLMB H 0 A_JumpIf(CeilingZ-Z < 12, "Floor")
Goto Wall
Floor:
TNT1 A 0 A_SpawnItemEx("FlameM_FloorPillar",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameM_PillarWaveW",20,15,0,15,0,0,-10+random(-1,8),1)
TNT1 A 0 A_SpawnItemEx("FlameM_PillarWaveW",20,-15,0,15,0,0,10+random(-8,1),1)
Stop
Wall:
FLAB H 0 A_SpawnItemEx("FlameM_WallPillar",0,0,0,-66,0,0,0,1)
stop
FireCheckOnly:
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,-16)
stop
}
}

actor FlameM_PillarWave_H : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("FlameM_PillarWave",20,30,0,20,0,0,-15,1)
TNT1 A 0 A_SpawnItemEx("FlameM_PillarWave",20,10,0,20,0,0,-5,1)
TNT1 A 0 A_SpawnItemEx("FlameM_PillarWave",20,-10,0,20,0,0,5,1)
TNT1 A 0 A_SpawnItemEx("FlameM_PillarWave",20,-30,0,20,0,0,15,1)
TNT1 A 2
stop
}
}

actor FlameM_PillarWave : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_FLAMEBLAST"
damagetype "FlameM_Pillar"
+DONTBLAST
+RIPPER
+THRUACTORS
+FLOORHUGGER
+DONTREFLECT
+THRUGHOST
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
+BRIGHT
Bouncefactor 1.0
WallBouncefactor 1.0
BounceCount 7
ReactionTime 10
Damage (0)
Radius 10
Height 48
Speed 20
Scale 2.5
States
{
Spawn:
FLAB D 0
FLAB D 1 A_CountDown
FLAB D 0 A_SpawnItemEx("FlameM_FloorPillar2")
FLAB ED 1
FLAB D 0 A_SetAngle(angle+random(-15,15))
FLAB D 0 A_ChangeVelocity(20,0,0,3)
FLAB D 0 A_Jump(128,3)
FLAB D 0 A_Jump(96,3)
FLAB EDED 1
loop
}
}

actor FlameM_PillarWaveW : FlameM_PillarWave
{
BounceCount 4
States
{
Spawn:
FLAB D 0
FLAB D 1 A_Jump(32,4)
FLAB E 1 A_Jump(128,2)
FLAB D 1 A_Jump(96,4)
FLAB EDED 1
FLAB D 0 A_SpawnItemEx("FlameM_FloorPillar2")
stop
}
}

actor FlameM_FloorPillar : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_FLAMEBLAST"
damagetype "FlameM_Pillar"
+DONTBLAST
+FLOORHUGGER
+BRIGHT
Mass 12
Damage (140)
Radius 10
Height 48
Speed 0
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,0)
TNT1 A 0 A_PlaySoundEx("weapon/FlameWave","Weapon")
FLAB DEFGHI 1
Spawn2:
FLAB HIHIHIHIHI 1
FLAB H 0 A_SetArg(3,Args[3]+1)
FLAB H 0 A_JumpIf(Args[3]>=Mass,"SpawnEnd")
goto Spawn+3
SpawnEnd:
FLAB HIHGFED 1
stop
Death:
TNT1 A 0
Stop
}
}

actor FlameM_FloorPillar2 : FlameM_FloorPillar
{
Mass 6
}

actor FlameM_PillarProtect : PowerProtection
{
Powerup.Duration 5
DamageFactor "FlameM_Pillar", 0.25
}

actor FlameM_WallPillar
{
PROJECTILE
damagetype "FlameM_Pillar"
Obituary "$OB_FLAMEBLAST"
+DONTBLAST
+DONTREFLECT
+SERVERSIDEONLY
reactiontime 12
Damage(170)
Radius 6
Height 5
Speed 0
Scale 2.5
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("weapon/FlameWave","Weapon")
goto Spawn2
Spawn2:
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,0)
TNT1 A 0 A_SpawnItemEx("FlameM_WallPillar_H1",0,0,0,0,0,0,0,1)
TNT1 AAAAAAAAA 1 A_ScaleVelocity(-1.0)
TNT1 A 0 A_SpawnItemEx("FlameM_WallPillar_H2",-66,0,0,0,0,0,0,1)
TNT1 AAAAAAAA 1 A_ScaleVelocity(-1.0)
TNT1 A 0 A_CountDown
TNT1 A 0 A_SpawnItemEx("FlameM_WallPillar_H1",-66,0,0,0,0,0,0,1)
TNT1 AAAAAAAAA 1 A_ScaleVelocity(-1.0)
TNT1 A 0 A_SpawnItemEx("FlameM_WallPillar_H2",0,0,0,0,0,0,0,1)
TNT1 AAAAAAAA 1 A_ScaleVelocity(-1.0)
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 1
stop
}
}

actor FlameM_WallPillar_H1 : BasicExplosion
{
RenderStyle None
states
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("FlameM_WallPillar_FX1",0,0,0,0,0,0,0,1)
stop
}
}
actor FlameM_WallPillar_H2 : FlameM_WallPillar_H1
{
states
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("FlameM_WallPillar_FX2",0,0,0,0,0,0,0,1)
stop
}
}

actor FlameM_WallPillar_FX1 : BasicGraphicEffect
{
ReactionTime 1
states
{
SpawnFrame:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX1",66,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX2",66,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX3",66,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX2",44,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX2",66,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX3",44,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX3",66,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX2",22,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX2",44,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX2",66,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX3",22,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX3",44,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX3",66,0,0,0,0,0,0,1)
Spawn2:
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX2",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX2",22,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX2",44,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX2",66,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX3",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX3",22,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("FlameWallPillarFX3",44,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("FlameWallPillarFX3",66,0,0,0,0,0,0,1)
TNT1 A 0 A_CountDown
loop
}
}

actor FlameM_WallPillar_FX2 : FlameM_WallPillar_FX1
{
ReactionTime 4
states
{
SpawnFrame:
goto Spawn2
}
}

actor FlameWallPillarFX1 : BasicGraphicEffect
{
+BRIGHT
states
{
SpawnFrame:
FLAB J 1
stop
}
}
actor FlameWallPillarFX2 : FlameWallPillarFX1
{
states
{
SpawnFrame:
FLAB K 1
stop
}
}
actor FlameWallPillarFX3 : FlameWallPillarFX1
{
states
{
SpawnFrame:
FLAB L 1
stop
}
}

actor Flameman_W_NormalBar : NormalBar {Args 52,225}
actor Flameman_W_SecondBar : SecondBar {Args 216,227}