actor Burstman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_7C"
dropitem "DangerWrapWep"
Weapon.AmmoUse 0
Weapon.AmmoGive 28
Obituary "$OB_DANGERWRAP"
weapon.ammotype1 "BurstBursterBurstestAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_07 C 1
loop

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

Ready:
BURX A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_BURSTMAN)
BURX A 0 A_GunFlash("Flash",1)
goto Ready1
Ready1:
BURX A 0 A_JumpIfInventory("BurstBursterBurstestAmmo",7,"Ready3")
//BURX A 0 //A_JumpIfInventory("BurstBursterBurstestAmmo",2,"Ready2")
BURX A 6 A_WeaponReady(8)//12
BURX A 0 A_JumpIfInventory("BurstTrigger",1,2)
BURX A 0 A_GiveInventory("BurstBursterBurstestAmmo",2)
BURX A 0
loop
Ready2:
BURX A 0 A_JumpIfInventory("BurstBursterBurstestAmmo",7,"Ready3")
BURX A 6 A_WeaponReady(8)
BURX A 0 A_JumpIfInventory("BurstTrigger",1,2)
BURX A 0 A_GiveInventory("BurstBursterBurstestAmmo",2)
BURX A 0
loop
Ready3:
BURX A 6 A_WeaponReady
BURX A 0 A_JumpIfInventory("BurstTrigger",1,2)
BURX A 0 A_GiveInventory("BurstBursterBurstestAmmo",2)
BURX A 0
loop

Fire:
BURX A 0 A_PlaySoundEx("weapon/wrapfire","Weapon")
TNT1 A 0 A_JumpIfInventory("BurstBursterBurstestAmmo",2,1)
goto Fire0
BURX B 6 A_GiveInventory("BurstM_FireCheck_P",1)
BURX C 6
BURX A 14
goto Ready1
Fire0:
BURX B 4 A_GiveInventory("BurstM_FireCheck_P",1)
BURX C 4
BURX A 9
goto Ready1

Altfire:
BURX A 0 A_GiveInventory("VivifyDelay5",1)
BURX A 0 A_Refire(1)
BURX A 0 A_TakeInventory("BurstBursterBurstestAmmo",3)
BURX A 0 A_TakeInventory("BurstBursterBurstestAmmo",4,1)
BURX A 2 offset(0,42)A_FireCustomMissile("DangerBubbleSpawner",0,0,0,0)
BURX A 2 offset(0,52)
BURX A 2 offset(0,62)
BURX A 2 offset(0,72)
BURX A 2 offset(0,62)
BURX A 2 offset(0,52)
BURX A 2 offset(0,42)
goto Ready1

Flash:
TNT1 A 1 A_JumpIfInventory("DangerFly",1,"Flash.FlyStart")
loop


Flash.FlyStart:
TNT1 A 0 A_SpawnItemEx("DangerBombTrappedFXWarper",0,0,0,0,0,0,0,1)
goto Flash.Fly
Flash.Fly:
TNT1 A 1 A_GiveInventory("Burstman_FlightThrust_P",1)
TNT1 A 0 A_JumpIfInventory("BurstItemFire",1,"Flash.FlyEnd")
TNT1 A 0 A_JumpIfInventory("DangerFly",1,"Flash.Fly")
goto Flash.FlyEnd

Flash.FlyEnd:
TNT1 A 0 A_TakeInventory("BurstItemFire",9)
TNT1 A 0 A_TakeInventory("DangerFly",999)
TNT1 A 1 A_SpawnItemEx("DangerTrappedFXPOP",0,0,-32,momx,momy,momz,0,1+8)
goto Flash.Land

Flash.Land:
TNT1 A 0 A_JumpIf(z-floorz==0,"Flash.LandEnd")
TNT1 A 0 A_JumpIf(momz==0,"Flash.LandZ")
TNT1 A 1 A_JumpIfInventory("DangerFly",1,"Flash.FlyStart")
loop
Flash.LandZ:
TNT1 A 1 A_JumpIfInventory("DangerFly",1,"Flash.FlyStart")
TNT1 A 0 A_JumpIf(z-floorz==0,"Flash.LandEnd")
TNT1 A 0 A_JumpIf(momz==0,"Flash.LandEnd")
goto Flash.Land+2
Flash.LandEnd:
TNT1 A 0 A_TakeInventory("BurstTrigger",99)
goto Flash
}
}

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

actor DangerTrapRecover : Powerup
{
powerup.duration 90
}

actor BurstTrigger : OnceC{}

actor DangerFly : Inventory
{
inventory.amount 1
inventory.maxamount 105
}

actor PowerBurstFlightSpeed : PowerSpeed
{
powerup.duration 3
Speed 2.0
+POWERSPEED.NOTRAIL
}

actor BurstBombStock : Inventory
{
inventory.amount 1
inventory.maxamount 3
}

actor BurstItemFire : Powerup
{
Powerup.Duration 3
}
actor BurstItemFireD : Powerup
{
+INVENTORY.ADDITIVETIME
Powerup.Duration 3
}

actor BurstStockItem : BasicClassItem
{
inventory.icon "BursIcon"
inventory.pickupmessage "Bombs, bombers, bombests, you want it it your's my friend as long as you have enough screws."
Tag "Burst Stock Trigger"
states
{
Spawn:
BURX Z 1
loop
UseCBM:
TNT1 A 0 A_JumpIfInventory("DangerFly",1,"Use3")
TNT1 A 0 A_JumpIfInventory("BurstItemFireD",1,"No")
TNT1 A 0 A_JumpIfInventory("BurstBombStock",3,"Use2")
goto Use1//fail
Use1:
TNT1 A 0 A_PlaySoundEx("weapon/crashland","SoundSlot7")
TNT1 A 0 A_GiveInventory("BurstBombStock",1)
TNT1 A 0 A_GiveInventory("BurstItemFireD_RC",1)
fail
Use2:
TNT1 A 0 A_PlaySoundEx("weapon/crashland","SoundSlot7")
TNT1 A 0 A_TakeInventory("BurstBombStock",2)
TNT1 A 0 A_GiveInventory("BurstItemFireD_RC",1)
fail
Use3:
TNT1 A 0 A_GiveInventory("BurstItemFire",1)
fail
}
}


actor BurstM_FireCheck_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BurstBombStock",3,"Fire3C")
TNT1 A 0 A_JumpIfInventory("BurstBombStock",2,"Fire2C")
TNT1 A 0 A_JumpIfInventory("BurstBombStock",1,"Fire1C")
goto Fire0
Fire1C:
TNT1 A 0 A_JumpIfInventory("BurstBursterBurstestAmmo",2,"Fire1")
goto Fire0
Fire2C:
TNT1 A 0 A_JumpIfInventory("BurstBursterBurstestAmmo",5,"Fire2")
goto Fire1C
Fire3C:
TNT1 A 0 A_JumpIfInventory("BurstBursterBurstestAmmo",10,"Fire3")
goto Fire2C
Fire0:
TNT1 A 0 A_FireCustomMissile("BurstDangerWrap0",0,1,-8,0)
stop
Fire1:
TNT1 A 0 A_TakeInventory("BurstBursterBurstestAmmo",2,1)
TNT1 A 0 A_FireCustomMissile("BurstDangerWrap",0,1,-8,0)
stop
Fire2:
TNT1 A 0 A_TakeInventory("BurstBursterBurstestAmmo",1)
TNT1 A 0 A_TakeInventory("BurstBursterBurstestAmmo",4,1)
TNT1 A 0 A_FireCustomMissile("BurstDangerWrap2",0,1,-8,0)
stop
Fire3:
TNT1 A 0 A_TakeInventory("BurstBursterBurstestAmmo",2)
TNT1 A 0 A_TakeInventory("BurstBursterBurstestAmmo",8,1)
TNT1 A 0 A_FireCustomMissile("BurstDangerWrap3",0,1,-8,0)
stop
}
}

actor BurstItemFireD_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
TNT1 AA 0 A_GiveInventory("BurstItemFireD",1)
stop
}
}

actor Burstman_FlightThrust_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("BurstTrigger",1)
TNT1 A 0 A_TakeInventory("DangerFly",1)
TNT1 A 0 A_JumpIf(z-floorz==0,"P_SpeedDown")
TNT1 A 0 A_JumpIf(momz==0,"P_SpeedDown")
goto P_SpeedUp
P_SpeedUp:
TNT1 A 0 A_GiveInventory("PowerBurstFlightSpeed",1)
goto P_ThrustCheck
P_SpeedDown:
TNT1 A 0 A_TakeInventory("PowerBurstFlightSpeed",1)
goto P_ThrustCheck
P_ThrustCheck:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 ThrustThingz(0,13,1-((CallACS("cbm_GetPointerButtonInput",0,true) & BT_JUMP)>0),0)//If jump held, go up
TNT1 A 0
stop
}
}


actor BurstDangerWrap0 : ProjSpawnFuncActor
{
var int user_translateLikePlayer;
Translation "192:192=218:218","198:198=73:73"
PROJECTILE
damagetype "BurstM_Shot"
Obituary "$OB_DANGERBUBBLE"
+SKYEXPLODE
+EXPLODEONWATER
Damage (90)
Radius 16
Height 10
Speed 20
scale 2.5
States
{
Spawn:
BURX H 0
BURX HI 5
BURX HJ 5 ThrustThingZ(0,10,0,1)
Spawn2:
BURX HIHJ 5 ThrustThingZ(0,10,0,1)
loop
Death:
BURX T 2
stop
}
}

actor BurstDangerWrap : BurstDangerWrap0
{
States
{
Spawn:
BURX K 0
BURX KL 5
BURX KM 5 ThrustThingZ(0,6,0,1)
Spawn2:
BURX KLKM 5 ThrustThingZ(0,6,0,1)
loop

Death:
BURX T 0 A_JumpIf(z-ceilingz==0-10,"SpawnMineCeiling")
BURX T 0 A_JumpIf(z-floorz==0,"SpawnMine")
BURX T 2 A_SpawnItemEx("BurstDangerWrapMineT1",0,0,0,0,0,3)
stop

Crash:
XDeath:
BURX T 0 A_SpawnItemEx("BurstDangerWrapBoom",0,0,5)
BURX T 2
stop

SpawnMine:
BURX T 2 A_SpawnItemEx("BurstDangerWrapMine",0,0,0,0,0,8)
stop
SpawnMineCeiling:
BURX T 2 A_SpawnItemEx("BurstDangerWrapMineT1",0,0,-13)
stop
}
}

actor BurstDangerWrap2 : BurstDangerWrap
{
States
{
Spawn:
BURX N 0
BURX NO 5
BURX NP 5 ThrustThingZ(0,2,0,1)
Spawn2:
BURX NONP 5 ThrustThingZ(0,2,0,1)
loop

Death:
BURX T 0 A_JumpIf(z-ceilingz==0-10,"SpawnMineCeiling")
BURX T 0 A_JumpIf(z-floorz==0,"SpawnMine")
BURX T 0 A_SpawnItemEx("BurstDangerWrapMineT2",0,0,0,5,0,3,random(0,359))
BURX T 2 A_SpawnItemEx("BurstDangerWrapMineT1",0,0,0,0,0,3)
stop

Crash:
XDeath:
BURX T 0 A_SpawnItemEx("BurstDangerWrapMine2",0,0,0,5,0,8,random(0,359))
BURX T 0 A_SpawnItemEx("BurstDangerWrapBoom",0,0,5)
BURX T 2
stop

SpawnMine:
BURX T 0 A_SpawnItemEx("BurstDangerWrapMine2",0,0,0,5,0,8,random(0,359))
BURX T 2 A_SpawnItemEx("BurstDangerWrapMine",0,0,0,0,0,8)
stop
SpawnMineCeiling:
BURX T 0 A_SpawnItemEx("BurstDangerWrapMineT2",0,0,-13,5,0,0,random(0,359))
BURX T 2 A_SpawnItemEx("BurstDangerWrapMineT1",0,0,-13)
stop
}
}


actor BurstDangerWrap3 : BurstDangerWrap
{
States
{
Spawn:
BURX Q 0
BURX QR 5
BURX QS 5 ThrustThingZ(0,-2,0,1)
Spawn2:
BURX QRQS 5 ThrustThingZ(0,-2,0,1)
loop

Death:
BURX T 0 A_JumpIf(z-ceilingz==0-10,"SpawnMineCeiling")
BURX T 0 A_JumpIf(z-floorz==0,"SpawnMine")
BURX T 0 A_SpawnItemEx("BurstDangerWrapMineT3",0,0,0,5,0,3,random(0,179))
BURX T 0 A_SpawnItemEx("BurstDangerWrapMineT2",0,0,0,5,0,3,random(180,359))
BURX T 0 A_SpawnItemEx("BurstDangerWrapMineT1",0,0,0,0,0,3)
BURX T 2
stop

Crash:
XDeath:
BURX T 0 A_SpawnItemEx("BurstDangerWrapMine3",0,0,0,5,0,8,random(0,179))
BURX T 0 A_SpawnItemEx("BurstDangerWrapMine2",0,0,0,5,0,8,random(180,359))
BURX T 0 A_SpawnItemEx("BurstDangerWrapBoom",0,0,5)
BURX T 2
stop

SpawnMine:
BURX T 0 A_SpawnItemEx("BurstDangerWrapMine3",0,0,0,5,0,8,random(0,179))
BURX T 0 A_SpawnItemEx("BurstDangerWrapMine2",0,0,0,5,0,8,random(180,359))
BURX T 2 A_SpawnItemEx("BurstDangerWrapMine",0,0,0,0,0,8)
stop
SpawnMineCeiling:
BURX T 0 A_SpawnItemEx("BurstDangerWrapMineT3",0,0,-13,5,0,0,random(0,179))
BURX T 0 A_SpawnItemEx("BurstDangerWrapMineT2",0,0,-13,5,0,0,random(180,359))
BURX T 2 A_SpawnItemEx("BurstDangerWrapMineT1",0,0,-13)
stop
}
}

actor BurstmanBubblePopDeath_H : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BurstDangerWrapMine3",0,0,4,5,0,8,random(0,179))
TNT1 A 0 A_SpawnItemEx("BurstDangerWrapMine2",0,0,4,5,0,8,random(180,359))
TNT1 A 2 A_SpawnItemEx("BurstDangerWrapMine",0,0,4,0,0,8)
stop
}
}


actor BurstDangerWrapMine : ProjSpawnFuncActor
{
var int user_translateLikePlayer;
Translation "192:192=218:218","198:198=73:73"
PROJECTILE
damagetype "BurstM_Boom"
Obituary "$OB_DANGERWRAP"
-NOGRAVITY
+SKYEXPLODE
+THRUACTORS
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
bouncefactor 0.5
wallbouncefactor 0.85
bouncecount 4
reactiontime 1
damage (20)
Radius 15
Height 12
speed 10
scale 2.5
Args 0
States
{
Spawn:
BURX U 0
BURX U 0 A_JumpIf(Pitch>=2,"Spawn1")
BURX U 0 A_SetPitch(pitch+1)
BURX UUUVVV 1
loop
Spawn1:
BURX U 0 A_ChangeFlag("THRUACTORS",0)
BURX U 0 A_JumpIf(Pitch>=10,"Spawn2")
BURX U 0 A_SetPitch(pitch+1)
BURX UUUVVV 1
goto Spawn1+1
Spawn2:
BURX U 0 A_JumpIf(Pitch>=15,"Spawn3a")
BURX U 0 A_SetPitch(pitch+1)
BURX UUVVUU 1
BURX V 0 A_JumpIf(Pitch>=15,"Spawn3b")
BURX V 0 A_SetPitch(pitch+1)
BURX VVUUVV 1
loop
Spawn3a:
BURX U 0 A_JumpIf(Pitch>=20,"SuperDeathU")
BURX U 0 A_SetPitch(pitch+1)
BURX UVUVUV 1
loop
Spawn3b:
BURX V 0 A_JumpIf(Pitch>=20,"SuperDeathV")
BURX V 0 A_SetPitch(pitch+1)
BURX VUVUVU 1
loop

SpawnX:
BURX W 0
BURX W 0 A_JumpIf(Pitch>=2,"SpawnX1")
BURX W 0 A_SetPitch(pitch+1)
BURX WWWXXX 1
loop
SpawnX1:
BURX W 0 A_ChangeFlag("THRUACTORS",0)
BURX W 0 A_JumpIf(Pitch>=10,"SpawnX2")
BURX W 0 A_SetPitch(pitch+1)
BURX WWWXXX 1
goto SpawnX1+1
SpawnX2:
BURX W 0 A_JumpIf(Pitch>=15,"SpawnX3a")
BURX W 0 A_SetPitch(pitch+1)
BURX WWXXWW 1
BURX X 0 A_JumpIf(Pitch>=15,"SpawnX3b")
BURX X 0 A_SetPitch(pitch+1)
BURX XXWWXX 1
loop
SpawnX3a:
BURX W 0 A_JumpIf(Pitch>=20,"SuperDeathW")
BURX W 0 A_SetPitch(pitch+1)
BURX WXWXWX 1
loop
SpawnX3b:
BURX X 0 A_JumpIf(Pitch>=20,"SuperDeathX")
BURX X 0 A_SetPitch(pitch+1)
BURX XWXWXW 1
loop

SuperDeathU:
BURX U 1 A_CountDown
wait
SuperDeathV:
BURX V 1 A_CountDown
wait
SuperDeathW:
BURX W 1 A_CountDown
wait
SuperDeathX:
BURX X 1 A_CountDown
wait

SpawnMine:
TNT1 A 0 A_JumpIf(Pitch>=20,"XDeath")
TNT1 A 0 A_JumpIf(Args[0]==1,"SpawnMineX")
TNT1 A 0 A_SpawnItemEx("BurstDangerWrapMineLand",0,0,0,0,0,0,0,SXF_TRANSFERPITCH)//512
stop
SpawnMineX:
TNT1 A 0 A_JumpIf(Pitch>=20,"XDeath")
TNT1 A 0 A_SpawnItemEx("BurstDangerWrapMineLand2",0,0,0,0,0,0,0,512)
stop

Death:
TNT1 A 0 A_JumpIf(z-floorz==0,"SpawnMine")
goto XDeath
Crash:
XDeath:
TNT1 A 0 A_SetGravity(0.0)
TNT1 A 4 A_SpawnItemEx("BurstDangerWrapBoom22",0,0,5)
stop
}
}

actor BurstDangerWrapMine2 : BurstDangerWrapMine
{
Args 1
States
{
Spawn:
BURX W 0
goto SpawnX
}
}

actor BurstDangerWrapMine3 : BurstDangerWrapMine
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2)
BURX U 0
goto Super::Spawn
BURX W 0 A_SetArg(0,1)
goto SpawnX
}
}

actor BurstDangerWrapMineT1 : BurstDangerWrapMine
{
-THRUACTORS
}
actor BurstDangerWrapMineT2 : BurstDangerWrapMine2
{
-THRUACTORS
}
actor BurstDangerWrapMineT3 : BurstDangerWrapMine3
{
-THRUACTORS
}


actor BurstDangerWrapMineLand : BurstDangerWrapMine
{
-THRUACTORS
-BOUNCEONWALLS
-BOUNCEONCEILINGS
speed 0
States
{
Spawn:
BURX U 0
goto Spawn1+1

Death:
TNT1 A 0
goto XDeath
}
}

actor BurstDangerWrapMineLand2 : BurstDangerWrapMineLand
{
Args 1
States
{
Spawn:
BURX W 0
goto SpawnX1+1
}
}

actor BurstDangerWrapBoom : BasicExplosion
{
damagetype "BurstM_Boom"
Obituary "$OB_DANGERWRAP"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BasicBoom6FX_4_210",0,0,5,0,0,0,0,1)
TNT1 A 0 A_PlaySoundEx("weapon/BurstExplode","Weapon")
TNT1 A 4 A_Explode(250,128,0,0,24)
stop
}
}
actor BurstDangerWrapBoom22 : BurstDangerWrapBoom
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BasicBoom6FX_4_210",0,0,3,0,0,0,0,1)
TNT1 A 0 A_PlaySound("weapon/BurstExplode",1,0.8)
TNT1 A 4 A_Explode(220,128,0,0,24)
stop
}
}

actor DangerBubbleSpawner : FastProjectile
{
+RIPPER
+DONTBLAST
+THRUGHOST
+SKYEXPLODE
+EXPLODEONWATER
+DONTREFLECT
+SERVERSIDEONLY
reactiontime 5
damage (0)
radius 8
height 16
speed 1000
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDown
loop
Death:
TNT1 A 0 A_SpawnItemEx("DangerTrapHelpX0")
stop
}
}

actor DangerTrapHelpX0
{
PROJECTILE
+FLOORHUGGER
+DONTBLAST
+THRUACTORS
+DONTREFLECT
+SERVERSIDEONLY
Damage (0)
Radius 8
Height 16
States
{
Spawn:
TNT1 A 0
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("DangerTrapHelpX1")
stop
Death:
TNT1 A 1 A_SpawnItemEx("DangerTrapHelpX1")
stop
}
}

actor DangerTrapHelpX1 : DangerTrapHelpX0
{
-FLOORHUGGER
Radius 32
Height 32
States
{
Spawn:
TNT1 A 0
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("DangerTrap")
stop
Death:
TNT1 A 0 A_JumpIf(Args[0]>14,"Spawn")
TNT1 A 0 A_SetArg(0,Args[0]+1)
TNT1 A 1 A_SpawnItemEx("DangerTrapHelpX1",-4,0,0,0,0,0,0,SXF_TRANSFERSPECIAL)//32768
stop
}
}



actor DangerTrap : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_DANGERTRAP"
damagetype "BurstM_Trap"
+FORCEYBILLBOARD
//+NOINTERACTION
+DONTBLAST
+RIPPER
//+FLOORHUGGER

damage (0+Args[0])
radius 32
height 32
scale 2.0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySound("weapon/BurstBubAppear",5,1.0)
TNT1 A 1 A_JumpIfCloser(16,"Fly")
BMBU AAAAAA 1 A_JumpIfCloser(16,"Fly")
BMBU A 0 A_SetScale(2.5)
BMBU A 0 ThrustThingZ(0,11,0,0)
BMBU AAAAAA 1 A_JumpIfCloser(20,"Fly")
BMBU B 0 A_ChangeFlag(RIPPER,0)
BMBU B 0 A_SetArg(0,100)
BMBU B 0 A_SetScale(3.0)
BMBU B 0 ThrustThingZ(0,9,0,0)
BMBU BBBBBB 1 A_JumpIfCloser(24,"Fly")
BMBU B 0 A_SetScale(3.5)
BMBU B 0 ThrustThingZ(0,7,0,0)
BMBU BBBBBB 1 A_JumpIfCloser(28,"Fly")
BMBU B 0 A_SetScale(4.0)
BMBU B 0 ThrustThingZ(0,5,0,0)
BMBU BBBBBB 1 A_JumpIfCloser(32,"Fly")
BMBU B 0 A_SetScale(4.5)
BMBU B 0 ThrustThingZ(0,3,0,0)
BMBU BBBBBB 1 A_JumpIfCloser(36,"Fly")
BMBU B 0 A_SetScale(5.0)
Spawn2:
BMBU B 0 ThrustThingZ(0,1,0,1)
BMBU B 1 A_JumpIfCloser(40,"Fly")
loop
Death:
BMBU C 3
stop
Fly:
TNT1 A 1 A_GiveToTarget("DangerFly",110)
stop
}
}


actor BurstM_Trap_Start_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("DangerTrapRecover",1,4)
TNT1 A 0 A_SpawnItemEx("DangerTrapped")
TNT1 A 0 ACS_NamedExecuteWithResult("core_groundplayer",0,true)
TNT1 A 0 A_GiveInventory("DangerTrapRecover",1)
TNT1 A 0
stop
}
}

actor DangerTrapped : BasicHelper
{
var int user_anim;
reactiontime 50
States
{
Spawn:
TNT1 A 0
TNT1 A 0 //A_JumpIfInTargetInventory("DangerTrapRecover",1,"Death")
TNT1 A 0 //A_GiveToTarget("DangerTrapRecover",1)
TNT1 A 0 A_SetUserVar("user_anim",random(1,11))
TNT1 A 0 //A_SetArg(1,random(1,11))
TNT1 A 1 A_GiveToTarget("DangerTrappedRise1",1)
TNT1 A 0 A_TakeFromTarget("EternalPainFlag",1)
goto Spawn2
Spawn2:
TNT1 A 0 A_JumpIf(user_anim>=4,"Spawn3")
TNT1 A 0 A_JumpIfInTargetInventory("EternalPainFlag",1,"Death")
TNT1 A 1 A_GiveToTarget("DangerTrappedRise1",1)
TNT1 A 0 A_CountDown
TNT1 A 0 A_SetUserVar("user_anim",user_anim+1)
loop
Spawn3:
TNT1 A 0 A_JumpIf(user_anim>=8,"Spawn4")
TNT1 A 0 A_JumpIfInTargetInventory("EternalPainFlag",1,"Death")
TNT1 A 1 A_GiveToTarget("DangerTrappedRise2",1)
TNT1 A 0 A_CountDown
TNT1 A 0 A_SetUserVar("user_anim",user_anim+1)
loop
Spawn4:
TNT1 A 0 A_JumpIf(user_anim>=12,"Spawn5")
TNT1 A 0 A_JumpIfInTargetInventory("EternalPainFlag",1,"Death")
TNT1 A 1 A_GiveToTarget("DangerTrappedRise3",1)
TNT1 A 0 A_CountDown
TNT1 A 0 A_SetUserVar("user_anim",user_anim+1)
loop
Spawn5:
TNT1 A 0 A_SetUserVar("user_anim",0)
goto Spawn2
Death:
TNT1 A 1 A_GiveToTarget("DangerTrappedPop",1)
stop
}
}

actor DangerTrappedRise : CustomInventory
{
States
{
Pickup:
Pickup2:
TNT1 A 0 A_ChangeVelocity(0,0,2,CVF_REPLACE)
TNT1 A 0 A_GiveInventory("DashingStraitjacket_F",1)
stop
}
}

actor DangerTrappedRise1 : DangerTrappedRise
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("DangerTrappedFX1",0,0,0,momx,momy,momz,0,8)
goto Pickup2
}
}

actor DangerTrappedRise2 : DangerTrappedRise
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("DangerTrappedFX2",0,0,0,momx,momy,momz,0,8)
goto Pickup2
}
}

actor DangerTrappedRise3 : DangerTrappedRise
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("DangerTrappedFX3",0,0,0,momx,momy,momz,0,8)
goto Pickup2
}
}

actor DangerTrappedPop : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("DangerTrappedFX4",0,0,-32,momx,momy,momz,0,8)
TNT1 A 0 ACS_NamedExecuteWithResult("core_groundplayer",0,false)
stop
}
}

actor DangerTrappedFX1 : BasicGraphicEffect
{
Translation "218:218=4:4","73:73=218:218"
+NOTIMEFREEZE
States
{
Spawn:
BMBU D 0
BMBU D 1
stop
}
}

actor DangerTrappedFX2 : DangerTrappedFX1
{
States
{
Spawn:
BMBU E 0
BMBU E 1
stop
}
}

actor DangerTrappedFX3 : DangerTrappedFX1
{
States
{
Spawn:
BMBU F 0
BMBU F 1
stop
}
}
actor DangerTrappedFX4 : DangerTrappedFX1
{
scale 5.0
States
{
Spawn:
BMBU G 0
BMBU G 1 A_PlaySoundEx("classes/burstpop","Weapon")
stop
}
}


actor DangerBombTrappedFXWarper : ShieldWarper_CBM
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 ACS_NamedExecuteAlways("cbm_clientwarper",0,73)
TNT1 A 0 A_Warp(AAPTR_TARGET,0,0,0,0,24)
Goto Shield
Shield:
BMBU D 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,3)
BMBU DDDD 1 A_Warp(AAPTR_TARGET,0,0,0,0,24)
BMBU E 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,3)
BMBU EEEE 1 A_Warp(AAPTR_TARGET,0,0,0,0,24)
BMBU F 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,3)
BMBU FFFF 1 A_Warp(AAPTR_TARGET,0,0,0,0,24)
loop
}
}

actor DangerTrappedFXPop : BasicExplosion
{
scale 5.0
States
{
Spawn:
BMBU G 0
BMBU G 1 A_PlaySoundEx("classes/burstpop","Weapon")
stop
}
}

actor Burstman_W_NormalBar : NormalBar {Args 4,230}
actor Burstman_W_ScriptBar : ScriptBar {}