actor Burnerman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_BE"
dropitem "WaveBurnerWep"
Weapon.AmmoUse 4
Weapon.AmmoUse2 1
Weapon.AmmoGive 224
Obituary "$OB_WAVEBURNER"
//Obituary "%o was burned alive by %k's Wave Burner."
weapon.ammotype "ThirdDegreeBearAmmo"
weapon.ammotype2 "BurnBabyBurnAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_0B E 1
loop

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

Ready:
BRHD A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_BURNERMAN)
goto Ready2
Ready2:
BRHD A 0 A_JumpIfInventory("ThirdDegreeBearAmmo",4,"Ready2a")
BRHD A 0 A_JumpIfInventory("BurnBabyBurnAmmo",28,"Ready2b")
BRHD A 2 A_WeaponReady(12)
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",4)
BRHD A 0 A_GiveInventory("BurnBabyBurnAmmo",2)
loop
Ready2a:
BRHD A 0 A_JumpIfInventory("ThirdDegreeBearAmmo",56,"Ready3a")
BRHD A 0 A_JumpIfInventory("BurnBabyBurnAmmo",28,"Ready3b")
BRHD A 2 A_WeaponReady(8)
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",4)
BRHD A 0 A_GiveInventory("BurnBabyBurnAmmo",2)
loop
Ready2b:
BRHD A 0 A_JumpIfInventory("ThirdDegreeBearAmmo",4,"Ready3b")
BRHD A 2 A_WeaponReady(4)
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",4)
BRHD A 0 A_GiveInventory("BurnBabyBurnAmmo",2)
loop
Ready3a:
BRHD A 0 A_JumpIfInventory("BurnBabyBurnAmmo",28,"Ready4")
BRHD A 2 A_WeaponReady(8)
BRHD A 0 A_JumpIfInventory("BurnerUseTrap_F",1,"ThrowTraps")
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",4)
BRHD A 0 A_GiveInventory("BurnBabyBurnAmmo",2)
loop
Ready3b:
BRHD A 0 A_JumpIfInventory("ThirdDegreeBearAmmo",28,"Ready4")
BRHD A 2 A_WeaponReady
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",4)
BRHD A 0 A_GiveInventory("BurnBabyBurnAmmo",2)
loop

Ready4:
BRHD A 2 A_WeaponReady
BRHD A 0 A_JumpIfInventory("BurnerUseTrap_F",1,"ThrowTraps")
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",4)
BRHD A 0 A_GiveInventory("BurnBabyBurnAmmo",2)
loop

Fire:
BRHD A 0 A_JumpIfNoAmmo("NoAmmo")
BRHD A 2
goto FireH

FireH:
BRHD B 0 A_JumpIfNoAmmo("NoAmmo")
BRHD B 1 A_GiveInventory("Burnerman_Fire_P")
BRHD C 0 A_Refire(1)
goto FireEnd
BRHD B 0 A_JumpIfNoAmmo("NoAmmo")
BRHD C 1 A_GiveInventory("Burnerman_Fire_P")
BRHD C 0 A_Refire("FireH")
goto FireEnd

FireEnd:
BRHD C 4 A_TakeInventory("WaveBurnerFlag")
BRHD B 2 A_TakeInventory("VivifyCycle2")
BRHD A 2
BRHD C 0 A_TakeInventory("WaveBurnerFlag")
BRHD A 0 A_TakeInventory("BurnerUseTrap_F")
Goto Ready2

Altfire:
BRHD A 0 A_JumpIfInventory("BurnBabyBurnAmmo",28,"JumpCheck")
goto Ready2
JumpCheck:
BRHD A 0 A_JumpIf(CallACS("cbm_GetPointerButtonInput",0,true) & BT_JUMP,"HoverBeginCheck")
BRHD A 2 A_JumpIf(z-floorz==0,"SlideSlide")
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",4)
BRHD A 0 A_GiveInventory("BurnBabyBurnAmmo",2)
goto Ready2
HoverBeginCheck:
BRHD A 2 A_JumpIfInventory("BurnBabyBurnAmmo",84,"HoverBegin")
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",4)
BRHD A 0 A_GiveInventory("BurnBabyBurnAmmo",2)
goto Ready2

SlideSlide:
BRHD D 2 Offset(-14,49)A_GiveInventory("ThirdDegreeBearAmmo",3)
BRHD D 0 A_WeaponReady(14)
BRHD D 2 A_GiveInventory("ThirdDegreeBearAmmo",3)
BRHD E 2 A_GiveInventory("ThirdDegreeBearAmmo",3)
BRHD E 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
SlideSlideSlide:
BRHD F 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD F 2 A_GiveInventory("BurnerGroundDash_P")
BRHD F 0 A_Refire("SlideAmmo")
Goto Clear
SlideAmmo:
BRHD F 0 A_JumpIfInventory("BurnBabyBurnAmmo",1,"SlideSlideSlide")
goto Clear

HoverBegin:
BRHD F 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,2)
BRHD F 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
goto HoverTime
HoverTime:
BRHD F 2 A_GiveInventory("BurnerHoverTime_P")
BRHD F 0 A_Refire("HoverAmmo")
goto Launch
HoverAmmo:
BRHD F 0 A_JumpIfInventory("BurnBabyBurnAmmo",1,"HoverTime")
goto Launch

Launch:
BRHD G 0 ACS_NamedExecuteWithResult("cbm_cantpushwallsplayer",0,1)
BRHD G 0 A_Stop
BRHD G 0 A_PlaySound("weapon/BurnerDive",1,1.0)
BRHD G 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,0)
BRHD G 0 A_GiveInventory("CBM_DisableJumpPowerGiver",1)
BRHD G 0 A_GiveInventory("BurnerDiveFlag",1)
BRHD G 0 A_TakeInventory("BurnBabyBurnAmmo",28)
BRHD G 0 A_TakeInventory("BurnBabyBurnAmmo",28,1)
BRHD G 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD G 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD G 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD H 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD H 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD H 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD G 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD G 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD G 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD H 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD H 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD H 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD G 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD G 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD G 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD H 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD H 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD H 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD G 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD G 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD G 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD H 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD H 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD H 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD G 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD G 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD G 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD H 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD H 0 A_GiveInventory("BurnerAirDashStart_P",1)
BRHD H 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD G 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD G 0 A_GiveInventory("BurnerAirDashStart_P",1)
goto LaunchWait

LaunchWait:
BRHD G 0 A_GiveInventory("BurnerDiveFlag",1)
BRHD G 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD G 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD G 0 A_GiveInventory("BurnerAirDash_P",1)
BRHD H 0 A_JumpIfInventory("BurnerDiveFlag",500,"GroundHit")
BRHD H 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD H 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD H 0 A_GiveInventory("BurnerAirDash_P",1)
BRHD H 1 A_JumpIf(z-floorz<8,"GroundHit")
BRHD H 0 A_SpawnItemEX("BurnerFlameTrail",0,0,0,0,0,0,0,1)
BRHD H 0 A_GiveInventory("BurnerAirDash_P",1)
loop

GroundHit:
BRHD D 0 ACS_NamedExecuteWithResult("cbm_cantpushwallsplayer",0,0)
BRHD D 0 A_TakeInventory("BurnerDiveFlag")
BRHD D 0 A_Stop
BRHD D 0 A_SpawnItemEx("BurnExplosion",0,0,32)
BRHD D 0 A_FireCustomMissile("WaveBurnLineSpawner",0,0)
BRHD D 15
BRHD D 0 A_TakeInventory("CBM_DisableJumpPower")
goto Clear
Clear:
BRHD A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
BRHD A 0 A_TakeInventory("BurnerUseTrap_F")
BRHD A 0 A_TakeInventory("VivifyCycle1")
goto Ready2

ThrowTraps:
BRHD A 0 A_JumpIfInventory("ThirdDegreeBearAmmo",56,"ThrowTrapsOK")
BRHD A 0 A_TakeInventory("BurnerUseTrap_F",999)
goto Ready2
ThrowTrapsOK:
BRHD A 0 A_GunFlash("NoFlash")
BRHD A 0 A_GiveInventory("Burnerman_Item_P")
BRHD A 1 Offset(25,73)
BRHD I 0 A_JumpIf(1,1)
BRHD I 2 Offset(25,63)
BRHD J 2 Offset(-1,32)
BRHD J 6 Offset(-25,14)
BRHD J 3 Offset(-1,32)
BRHD I 3 Offset(25,63)
TNT1 A 3
BRHD A 2 Offset(30,72)
BRHD A 2 Offset(15,52)
BRHD A 0 A_TakeInventory("BurnerUseTrap_F",999)
goto Ready2
NoAmmo:
BRHD A 0 A_TakeInventory("BurnerUseTrap_F",999)
BRHD A 0 A_JumpIfInventory("IsBot",1,"BotAmmo")
goto FireEnd
BotAmmo:
BRHD A 0 A_GiveInventory("ThirdDegreeBearAmmo",84)
BRHD C 4 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
BRHD B 2
BRHD A 20
BRHD A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
Goto Ready2
}
}

actor ThirdDegreeBearAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 224
+INVENTORY.IGNORESKILL
}

actor BurnBabyBurnAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 112
+INVENTORY.IGNORESKILL
}

actor BurnerDiveFlag : Inventory
{
Inventory.amount 1
Inventory.maxamount 500
}

actor BurnerUseTrap_F :OnceC{}

actor BurnerRiseSoundDelay : Powerup
{
Powerup.Duration 15
}

actor BurnerTrapItem : BasicClassItem
{
inventory.icon "BurnTrap"
inventory.pickupmessage "Time to catch some gummy bears."
Tag "Toss Burner Traps"
states
{
Spawn:
BRHD Z 1
loop
UseCBM:
TNT1 A 0 A_JumpIfInventory("BurnerUseTrap_F",1,"No")
TNT1 A 0 A_JumpIfInventory("ThirdDegreeBearAmmo",56,"GimmeTraps")
fail
GimmeTraps:
TNT1 A 0 A_GiveInventory("BurnerUseTrap_F",1)
fail
}
}


actor Burnerman_Fire_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("IsUnderWater",1,"FireUW")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,1)
goto BurnTo
TNT1 A 0 A_GiveInventory("Burnerman_Fire2_P")
goto BurnTo

BurnTo:
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",1,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",0,1,8,0)goto F1
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",2,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",5,0,8,0)goto F2
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",3,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",10,1,8,0)goto F1
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",4,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",15,0,8,0)goto F2
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",5,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",10,1,8,0)goto F1
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",6,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",5,0,8,0)goto F2
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",7,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",0,1,8,0)goto F1
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",8,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",-5,0,8,0)goto F2
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",9,2) TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",-10,1,8,0)goto F1
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",10,2)TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",-15,0,8,0)goto F2
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",11,2)TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",-10,1,8,0)goto F1
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",99,2)TNT1 A 0 A_FireCustomMissile("WaveBurnBoss",-5,0,8,0)goto F2

FireUW:
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",1,2)
TNT1 A 0 A_FireCustomMissile("WaveBurnUWBoss2",0,1,8,0)
goto F1
TNT1 A 0 A_FireCustomMissile("WaveBurnUWBoss",0,0,8,0)
TNT1 A 0 A_TakeInventory("WaveBurnerFlag")
goto Cycle

F1:
TNT1 A 0 A_PlaySoundEx("weapon/BurnerWave","Weapon")
F2:
TNT1 A 0 A_JumpIfInventory("WaveBurnerFlag",12,2)
TNT1 A 0 A_GiveInventory("WaveBurnerFlag",1)
goto Cycle
TNT1 A 0 A_TakeInventory("WaveBurnerFlag")
goto Cycle

Cycle:
TNT1 A 0 A_JumpIfInventory("VivifyCycle2",2,"DoneZ")
goto DoneX
DoneX:
TNT1 A 0 A_GiveInventory("VivifyCycle2",1)
stop
DoneZ:
TNT1 A 0 A_TakeInventory("VivifyCycle2",2)
stop

}
}
actor Burnerman_Fire2_P : Burnerman_Fire_P
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("IsUnderWater",1,"FireUW")
goto BurnTo
}
}

actor Burnerman_Item_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/BombThrow","Weapon")
TNT1 A 0 A_TakeInventory("ThirdDegreeBearAmmo",14)
TNT1 A 0 A_TakeInventory("ThirdDegreeBearAmmo",42,1)
TNT1 A 0 A_FireCustomMissile("BurnerTrap",-10,0,8,0)
TNT1 A 0 A_FireCustomMissile("BurnerTrap",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("BurnerTrap",10,0,8,0)
stop
}
}

actor BurnerGroundDash_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("BurnBabyBurnAmmo",1,1)
TNT1 A 0 A_GiveInventory("VivifyCycle1",1)
TNT1 A 0 A_GiveInventory("ThirdDegreeBearAmmo",3)
TNT1 A 0 A_JumpIf(z-floorz==0,"Ground")
goto Air
Air:
TNT1 A 0 A_Recoil(-2)
stop
Ground:
TNT1 A 0 A_Recoil(-6)
stop
}
}

actor BurnerRiseSound_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BurnerRiseSoundDelay",1,3)
TNT1 A 0 A_PlaySoundEx("weapon/BurnerRise","Weapon")
TNT1 A 0 A_GiveInventory("BurnerRiseSoundDelay",1)
TNT1 A 0
stop
}
}

actor BurnerHoverTime_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("BurnBabyBurnAmmo",1)
TNT1 A 0 A_TakeInventory("BurnBabyBurnAmmo",3,1)//2
TNT1 A 0 A_GiveInventory("BurnerRiseSound_P")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,"No")
TNT1 A 0 ThrustThingZ(0,24+CallACS("core_checkrune",RUNE_RAGE)*12,0,0)
stop
No:
TNT1 A 0
stop
}
}
actor BurnerAirDashStart_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),"No")
UpLimit:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,"UpLimitR")
TNT1 A 0 A_ChangeVelocity(45,0,-4.5,3)
stop
UpLimitR:
TNT1 A 0 A_ChangeVelocity(60,0,-6,3)
stop
No:
TNT1 A 0
stop
}
}
actor BurnerAirDash_P : BurnerAirDashStart_P
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),"No")
TNT1 A 0 A_JumpIf(pitch<360 && pitch>=270 || pitch>=0 && pitch<=10, "UpLimit")//Looking up/looking straight/down a little
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,"PickupR")
TNT1 A 0 A_ChangeVelocity(cos(pitch)*45,0,-sin(pitch)*45,3)
stop
PickupR:
TNT1 A 0 A_ChangeVelocity(cos(pitch)*60,0,-sin(pitch)*60,3)
stop
}
}


actor BurnerTrap : ProjSpawnFuncActor
{
PROJECTILE
damagetype "BurnerM_HalfShock"
Obituary "$OB_BURNERTRAPT"
-NOGRAVITY
+SKYEXPLODE
+EXPLODEONWATER
+NOEXPLODEFLOOR
Gravity 1.0
ReactionTime 5
Damage (100)
Height 5
Radius 8
Speed 45
Scale 2.5
States
{
Spawn:
BRHD K 0 //ThrustThingZ(0,5,0,0)
BRHD K 1
BRHD K 0 A_JumpIf(z-floorz<10,"Set")
goto Spawn+1
Set:
BRHD K 0 A_Stop
BRHD K 0 A_SpawnItemEx("BurnerTrapSet")
stop
Death:
XDeath:
TNT1 A 0 A_SetGravity(0.0)
TNT1 A 1 A_SpawnItemEx("BurnerTrapDeathFX",0,0,25,0,0,0,0,1)
Stop
Crash:
BRHD K 0
BRHD K 0 A_PlaySoundEx("weapon/slashclawhit","Weapon")
BRHD KLMLMLMLMLM 2
TNT1 A 0 A_SpawnItemEx("BurnerTrapDeathFX",0,0,25,0,0,0,0,1)
stop
}
}
actor BurnerTrapDeathFX : BasicGraphicEffect
{
States
{
SpawnFrame:
NMFX A 0
NMFX ABCD 2
stop
}
}

actor BurnerTrapSet : ProjSpawnFuncActor
{
PROJECTILE
damagetype "BurnerM_Shock"
Obituary "$OB_BURNERTRAP"
+FLOORHUGGER
+THRUGHOST
+DONTREFLECT
+DONTBLAST
+HITTRACER
Damage (100)
Radius 8
Height 5
Scale 2.5
Args 210
States
{
Spawn:
BRHD K 0
BRHD K 0 A_Stop
BRHD K 0 A_GiveInventory("Once",1)
BRHD LMNO 2
BRHD P 2 A_SetArg(1,CallACS("core_getptrteam",AAPTR_TARGET))
BRHD P 0
goto S_InvisCheck
S_InvisCheck:
TNT1 A 0 A_JumpIf(Args[1]==-1,"S_Invis")
TNT1 A 0 A_JumpIf(Args[1]==0,"S_InvisB")
TNT1 A 0 A_JumpIf(Args[1]==1,"S_InvisR")
TNT1 A 0 A_JumpIf(Args[1]==2,"S_InvisO")
TNT1 A 0 A_JumpIf(Args[1]==3,"S_InvisP")
S_Invis:
TNT1 A 1 A_CountDownArg(0)
TNT1 A 0 //A_SpawnItemEx("BurnerTrapTeamFX0",0,0,12,0,0,0,0,1)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
loop
S_InvisB:
TNT1 A 1 A_CountDownArg(0)
TNT1 A 0 A_SpawnItemEx("BurnerTrapTeamFXB",0,0,12,0,0,0,0,1)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
loop
S_InvisR:
TNT1 A 1 A_CountDownArg(0)
TNT1 A 0 A_SpawnItemEx("BurnerTrapTeamFXR",0,0,12,0,0,0,0,1)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
loop
S_InvisO:
TNT1 A 1 A_CountDownArg(0)
TNT1 A 0 A_SpawnItemEx("BurnerTrapTeamFXO",0,0,12,0,0,0,0,1)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
loop
S_InvisP:
TNT1 A 1 A_CountDownArg(0)
TNT1 A 0 A_SpawnItemEx("BurnerTrapTeamFXP",0,0,12,0,0,0,0,1)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
loop

Death:
XDeath:
TNT1 A 0 A_JumpIfInventory("Once",1,"SuperDeath")
TNT1 A 1 A_SpawnItemEx("BurnerTrapDeathFX",0,0,25,0,0,0,0,1)
Stop
SuperDeath:
BRHD POML 1
BRHD K 4
TNT1 A 0 A_SpawnItemEx("BurnerTrapDeathFX",0,0,25,0,0,0,0,1)
stop
Crash:
TNT1 A 0
TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("cbm_istracerally")==1, "Respawn")
BRHD K 0 A_PlaySoundEx("weapon/slashclawhit","Weapon")
BRHD POML 1
BRHD K 35
TNT1 A 0 A_SpawnItemEx("BurnerTrapDeathFX",0,0,25,0,0,0,0,1)
stop
Respawn:
TNT1 A 1 A_SpawnItemEx("BurnerTrapRespawn",0,0,0,0,0,0,0,SXF_TRANSFERSPECIAL)
stop
}
}

actor BurnerTrapRespawn : BurnerTrapSet
{
+THRUACTORS
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("Once",1)
TNT1 AAAAAA 1 A_CountDownArg(0)
TNT1 A 0 A_ChangeFlag("THRUACTORS",0)
goto S_InvisCheck
}
}

//actor BurnerTrapSetB : BurnerTrapSet{DesignatedTeam 0}
//actor BurnerTrapSetR : BurnerTrapSet{DesignatedTeam 1}
//actor BurnerTrapSetO : BurnerTrapSet{DesignatedTeam 2}
//actor BurnerTrapSetP : BurnerTrapSet{DesignatedTeam 3}

actor BurnerTrapProtect : PowerProtection
{
Powerup.Duration 3
DamageFactor "BurnerM_Shock", 0.2
DamageFactor "BurnerM_HalfShock", 0.2
}

actor BurnerTrapTeamFX0 : BasicGraphicEffect
{
VisibleToPlayerClass "Burnerman"
RenderStyle "Translucent"
Alpha 0.6
Scale 2.0
States
{
SpawnFrame:
BRHD M 0 //A_JumpIf(ACS_NamedExecuteWithResult("cbm_istargetclient")==1,"Spawn2")
BRHD M 1
stop
}
}
actor BurnerTrapTeamFXB : BasicGraphicEffect
{
VisibleToTeam 0
RenderStyle "Translucent"
Alpha 0.6
Scale 2.0
States
{
SpawnFrame:
BRHD M 0
BRHD M 1
stop
}
}
actor BurnerTrapTeamFXR : BurnerTrapTeamFXB
{
VisibleToTeam 1
}
actor BurnerTrapTeamFXO : BurnerTrapTeamFXB
{
VisibleToTeam 2
}
actor BurnerTrapTeamFXP : BurnerTrapTeamFXB
{
VisibleToTeam 3
}

actor WaveBurnBoss : ProjSpawnFuncActor
{
PROJECTILE
damagetype "BurnerM_Shot"
Obituary "$OB_WAVEBURNER"
+BRIGHT
Damage (40)
radius 5
height 5
Speed 34
scale 2.5
States
{
Spawn:
TNT1 A 2
Q_BG ABCD 3
Q_BG D 1
stop
Death:
TNT1 A 1 A_SpawnItemEx("OilPitIgnite",0,0,8)
stop
}
}

actor WaveBurnUWBoss : WaveBurnBoss
{
damagetype "BurnerM_Shot2"
Obituary "$OB_WAVEBURNER2"
-BRIGHT
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("PropBlowerEffect")
Q_BG EF 3
TNT1 A 0 A_SpawnItemEx("PropBlowerEffect")
Q_BG GH 3
TNT1 A 1 A_SpawnItemEx("PropBlowerEffect")
stop//goto Death
Death:
TNT1 A 1 A_SpawnItemEx("PropBlowerEffect")
stop
}
}
actor WaveBurnUWBoss2 : WaveBurnUWBoss
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("WaveBurnUWBossFX0",0,0,0,momx,momy,momz,0,1+8)
goto WaveBurnUWBoss::Spawn
}
}

actor WaveBurnUWBossFX0 : BasicClientSide
{
RenderStyle None
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("WaveBurnUWBossFX",frandom(-8,8),frandom(-8,8),frandom(-8,8),momx/5,momy/5,momz/5,0,1+8)
TNT1 A 0 A_Jump(16,6)
TNT1 A 0 A_SpawnItemEx("WaveBurnUWBossFX",frandom(-8,8),frandom(-8,8),frandom(-8,8),momx/5,momy/5,momz/5,0,1+8)
TNT1 A 0 A_Jump(96,4)
TNT1 A 0 A_SpawnItemEx("WaveBurnUWBossFX",frandom(-8,8),frandom(-8,8),frandom(-8,8),momx/5,momy/5,momz/5,0,1+8)
TNT1 A 0 A_Jump(128,2)
TNT1 A 0 A_SpawnItemEx("WaveBurnUWBossFX",frandom(-8,8),frandom(-8,8),frandom(-8,8),momx/5,momy/5,momz/5,0,1+8)
TNT1 A 0
stop
}
}
actor WaveBurnUWBossFX : BasicGraphicEffect//M
{
//+THRUACTORS
Alpha 0.8
Speed 5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_ChangeVelocity(0,10*sin(frandom(-8,8)),10*sin(frandom(-4,4)),1)
TNT1 A 0 A_ScaleVelocity(frandom(1.25,2.5))
Q_BG IJ 3 ThrustThingZ(0,Random(3,6),0,1)
Q_BG K 5 A_Jump(230,1)
wait
Q_BG L 3
stop
}
}

actor BurnExplosionSound : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_PlaySoundEx("weapon/BurnerBoom","Body")
stop
}
}

actor BurnExplosion : BasicExplosion
{
Obituary "$OB_BURNERDIVE"
damagetype "BurnerM_DiveLand"
+FLOORHUGGER
+BRIGHT
radius 16
Height 48
scale 5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("weapon/BurnerBoom","Body")
TNT1 A 0 A_Stop
TNT1 A 0 A_Explode(350+CallACS("core_checkrune",RUNE_SPREAD,2)*700,172,0,0,64)
TNT1 A 1 A_SpawnItemEx("OilPitIgnite",0,0,8)
BRHD VWV 3
stop
}
}

actor WaveBurnLineSpawner : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("WaveBurnLineSpawn",8,0,0,0,0,0,0)
TNT1 A 0 A_SpawnItemEx("WaveBurnLineSpawn",8,0,0,0,0,0,45)
TNT1 A 0 A_SpawnItemEx("WaveBurnLineSpawn",8,0,0,0,0,0,90)
TNT1 A 0 A_SpawnItemEx("WaveBurnLineSpawn",8,0,0,0,0,0,135)
TNT1 A 0 A_SpawnItemEx("WaveBurnLineSpawn",8,0,0,0,0,0,180)
TNT1 A 0 A_SpawnItemEx("WaveBurnLineSpawn",8,0,0,0,0,0,-45)
TNT1 A 0 A_SpawnItemEx("WaveBurnLineSpawn",8,0,0,0,0,0,-90)
TNT1 A 0 A_SpawnItemEx("WaveBurnLineSpawn",8,0,0,0,0,0,-135)
stop
}
}


actor WaveBurnLineSpawn : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_BURNERDIVEX"
damagetype "BurnerM_FireLine"
-NOGRAVITY
+BRIGHT
Damage(50)
Height 10
Radius 6
Scale 2.5
States
{
Spawn:
TNT1 A 0
BRHD Q 4 ThrustThingZ(0,50,1,1)
wait
Crash:
Death:
TNT1 A 0 A_SpawnItemEx("WaveBurnLine",0,0,0,15,0,0,0,1)
stop
}
}

actor WaveBurnLine : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_BURNERDIVEX"
damagetype "BurnerM_FireLine"
-NOGRAVITY
+DONTSPLASH
+BRIGHT
+NOEXPLODEFLOOR
+STEPMISSILE
maxstepheight 24
+BOUNCEONCEILINGS
BounceCount 1
gravity 900.0
Damage (50+Args[0]*10)
Height 40
Radius 6
speed 20
Scale 2.5
States
{
Spawn:
BRHD Q 0
BRHD Q 1 A_SpawnItemEx("OilPitIgnite",0,0,8)
BRHD Q 0 A_SetArg(0,11)
SpawnL:
BRHD Q 0 A_SetArg(0,Args[0]+1)
BRHD QQQQQQQQQ 1 A_SpawnItemEx("WaveBurnLineFX",0,0,0,0,0,0,0,1)
BRHD Q 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
loop
Crash:
XDeath:
TNT1 A 0
stop
Death:
TNT1 A 1
stop
}
}

actor WaveBurnLineFX : BasicGraphicEffect
{
+BRIGHT
States
{
SpawnFrame:
BRHD Q 1
BRHD UTSRQ 3
stop
}
}

actor BurnerFlameTrail : BasicGraphicEffect
{
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_SpawnItemEX("BurnerFlameTrailFX",2,12,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEX("BurnerFlameTrailFX",2,-12,0,0,0,0,0,1)
stop
}
}

actor BurnerFlameTrailFX : BasicGraphicEffect
{
+BRIGHT
States
{
SpawnFrame:
BRHD Y 3
BRHD X 1 A_FadeOut(0.15)
loop
}
}


actor Burnerman_W_NormalBar : NormalBar {Args 218,40}
//actor Burnerman_W_SecondBar : SecondBar {Args 201,110}//116,118
actor Burnerman_W_ScriptBar : ScriptBar {}