actor BubbleLeadBoss : BaseMM8BDMWep_CBM
{
dropitem "BubbleLeadWepCDropped"
Weapon.AmmoUse 4
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "$OB_BUBBLELEAD"
weapon.ammotype "WaddleWaddleAmmo"
States
{
Spawn:
C_02 C 1
loop
Ready:
BUBA A 0 ACS_ExecuteAlways(998,0,742)
BUBA A 0 A_GunFlash
BUBA A 0 A_JumpIfInventory("WaddleWaddleAmmo",4,"Ready2")
BUBA A 3 A_WeaponReady(WRF_NOSECONDARY)
BUBA A 0 A_GiveInventory("WaddleWaddleAmmo",1)
Goto Ready+2
Ready2:
BUBA A 3 A_WeaponReady
BUBA A 0 A_GiveInventory("WaddleWaddleAmmo",1)
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BUBA A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BUBA A 1 A_Raise
Loop
Fire:
BUBA A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
BUBA A 0 A_GiveInventory("BubblemanMain_CI",1)
BUBA BCA 4
BUBA A 0 A_GiveInventory("WaddleWaddleAmmo",2)
Goto Ready+2
Altfire:
BUBA A 0 A_JumpIfInventory("WaddleWaddleAmmo",4,"Altfire2")
goto NoAmmo
Altfire2:
BUBA A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
BUBA A 2 offset(0,34)A_GiveInventory("BubblemanAlt_CI",1)
BUBA A 2 offset(0,36)
BUBA A 1 offset(0,38)
BUBA A 1 offset(0,39)
BUBA A 1 offset(0,39)
BUBA A 1 offset(0,38)
BUBA A 2 offset(0,36)
BUBA A 2 offset(0,32)
BUBA A 0 //A_Refire
goto Ready+2
NoAmmo:
BUBA A 0
Goto Ready+2
Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIf(z-floorz<1,3)
TNT1 A 0 A_JumpIfInventory("StaminaFlag",1,4)
TNT1 A 1 SetPlayerProperty(0,0,3)
loop
TNT1 A 0 A_JumpIfInventory("StaminaFlag",500,2)
TNT1 A 0 A_GiveInventory("StaminaFlag",8)
TNT1 A 0 A_JumpIfInventory("IsUnderWater",1,3)
TNT1 A 0 A_JumpIfInventory("PowerFlood",1,2)
TNT1 A 1 SetPlayerProperty(0,0,3)
loop
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,3)
TNT1 A 0 A_TakeInventory("StaminaFlag",1)
TNT1 A 1 SetPlayerProperty(0,1,3)
loop
TNT1 A 1 SetPlayerProperty(0,0,3)
loop


}
}

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

actor BubbleBounceX
{
translation "192:192=4:4","195:195=102:102"
PROJECTILE
Obituary "$OB_BUBBLELEAD"
damagetype "BubbleLead"
scale 2.5
-NOGRAVITY
Bouncetype Hexen
-ALLOWBOUNCEONACTORS
-BOUNCEONWALLS
+CANBOUNCEWATER
bouncefactor 1.0
wallbouncefactor 1.0
Speed 8
Radius 20
Height 16
gravity 1.0
Damage (22)
ReactionTime 25//45
States
{
Spawn:
BUBA E 0
BUBA E 0 A_Recoil(-9)
TNT1 A 1 ThrustThingZ(0,25,0,0)
BUBA E 0 A_CountDown
BUBA EEEFFF 1 A_JumpIf(z-floorz==0,"Spawn_F")
Goto Spawn+3
Spawn_F:
BUBA E 0 A_PlaySoundEx("weapon/BubbleBounce","Weapon")
BUBA E 1 ThrustThingZ(0,40,0,0)
Goto Spawn+3
Death:
XDeath:
TNT1 A 1
stop
}
}


actor BubbleBounceXB : BubbleBounceX{translation "192:192=205:205","195:195=74:74"}
actor BubbleBounceXR : BubbleBounceX{translation "192:192=171:171","195:195=41:41"}
actor BubbleBounceXO : BubbleBounceX{translation "192:192=104:104","195:195=128:128"}
actor BubbleBounceXP : BubbleBounceX{translation "192:192=229:229","195:195=232:232"}

actor BubProj : FastProjectile
{
translation "192:192=4:4"
PROJECTILE
Obituary "$OB_BUBBLEBUSTER"
damagetype "Buster"
Damage (15)
radius 5
height 5
Speed 64
scale 2.5
States
{
Spawn:
TNT1 A 1
BUBA D 1 A_SpawnItemEx("BubProjFX",0,0,0,0,0,0,0,1)
Goto Spawn+1
Death:
BUBA D 1
stop
}
}

actor BubProjB : BubProj{translation "192:192=205:205"}
actor BubProjR : BubProj{translation "192:192=171:171"}
actor BubProjO : BubProj{translation "192:192=104:104"}
actor BubProjP : BubProj{translation "192:192=229:229"}

actor BubProjFX : BasicClientSide
{
//+FORCEXYBILLBOARD
Alpha 0.75
scale 2.0
States
{
Spawn:
TNT1 A 2
COSS Y 1 A_FadeOut
wait
}
}

actor BubblemanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BubProj",0,0,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BubProjB",0,0,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BubProjR",0,0,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BubProjO",0,0,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BubProjP",0,0,-8,0)
goto Done
}
}

actor BubblemanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BubbleBounceX",0,0,0,8)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BubbleBounceXB",0,0,0,8)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BubbleBounceXR",0,0,0,8)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BubbleBounceXO",0,0,0,8)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BubbleBounceXP",0,0,0,8)
goto Done
Done:
TNT1 A 0 A_TakeInventory("WaddleWaddleAmmo",4)
stop
}
}

///////////////////////
//X=================X//
//| The Bubble Item |//
//X=================X//
///////////////////////

actor BubbleFlooder : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "BubIcon"
inventory.pickupmessage "Welcome to Davy Jones' Locker!"
scale 2.0
+INVBAR
states
{
Spawn:
BUBA WXY 3
loop
Use:
TNT1 A 0 A_JumpIfInventory("BubbleFloodBusy",1,"No")
TNT1 A 0 A_JumpIfInventory("BubbleFloodDeployed",1,"Success2")
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(250)==1,"No")
TNT1 A 0 A_JumpIfInventory("IsUnderWater",1,"No")
TNT1 A 0 A_JumpIfInventory("PowerFlood",1,"No")
Success:
TNT1 A 0 A_JumpIf(momx*momx+momy*momy+momz*momz < 36,"TooSlow")
TNT1 A 0 A_SpawnItemEx("BubbleFlood",0,0,56,momx/3,momy/3,momz/12,0,9,0)
fail
TooSlow:
TNT1 A 0 A_SpawnItemEx("BubbleFlood",0,0,56,0,0,0,0,1)
fail
Success2:
TNT1 A 0 A_GiveInventory("BubbleFloodUndeploy",1)
//TNT1 A 0 A_TakeInventory("BubbleFloodDeployed",1)
fail
No:
TNT1 A 0
fail
}
}

actor BubbleFloodDeployed : Inventory
{
inventory.amount 1
inventory.maxamount 1
}
actor BubbleFloodBusy : Inventory
{
inventory.amount 1
inventory.maxamount 1
}
actor BubbleFloodUndeploy : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor BubbleStaminaHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_GiveToTarget("StaminaFlag",8)
stop
}
}


actor BubbleFlood
{
Height 0
Radius 0
+NOINTERACTION
-SOLID
+NOGRAVITY
+MISSILE
+DONTBLAST
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("classes/FloodIn", "SoundSlot6")
TNT1 A 0 A_TakeFromTarget("BubbleFloodUndeploy",1)
TNT1 A 0 A_GiveToTarget("BubbleFloodDeployed",1)
TNT1 A 0 A_GiveToTarget("BubbleFloodBusy",1)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner1",0,0,0,0,0,0,0,129)//SXF_CLIENTSIDE
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner1",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner1",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner2",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner2",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner2",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner3",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner3",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner3",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner4",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner4",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner4",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner5",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner5",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner5",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner6",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner6",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner6",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner7",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner7",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner7",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner8",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner8",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawner8",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

TNT1 A 0 A_TakeFromTarget("BubbleFloodBusy",1)

FullDeployed1:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF1",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
FullDeployed2:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF1",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
FullDeployed3:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF1",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
FullDeployed4:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF2",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
FullDeployed5:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF2",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
FullDeployed6:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF2",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
FullDeployed7:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF3",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
FullDeployed8:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF3",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
FullDeployed9:
TNT1 A 0 ACS_ExecuteAlways(212,0,0)
TNT1 A 1 A_SpawnItemEx("BubbleFloodFXSpawnerF3",0,0,0,0,0,0,0,129)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleFloodUndeploy",1,"UnDeploy")
goto FullDeployed1

UnDeploy:
TNT1 A 0 A_SpawnItemEx("BubbleFloodOutSound")
//TNT1 A 0 A_PlaySound("classes/FloodOut", CHAN_WEAPON , 1.0)

TNT1 A 0 A_TakeFromTarget("BubbleFloodDeployed",1)
TNT1 A 0 A_GiveToTarget("BubbleFloodBusy",1)

TNT1 AAA 1 A_SpawnItemEx("BubbleFloodFXSpawner8",0,0,0,0,0,0,0,129)
TNT1 AAA 1 A_SpawnItemEx("BubbleFloodFXSpawner7",0,0,0,0,0,0,0,129)
TNT1 AAA 1 A_SpawnItemEx("BubbleFloodFXSpawner6",0,0,0,0,0,0,0,129)
TNT1 AAA 1 A_SpawnItemEx("BubbleFloodFXSpawner5",0,0,0,0,0,0,0,129)
TNT1 AAA 1 A_SpawnItemEx("BubbleFloodFXSpawner4",0,0,0,0,0,0,0,129)
TNT1 AAA 1 A_SpawnItemEx("BubbleFloodFXSpawner3",0,0,0,0,0,0,0,129)
TNT1 AAA 1 A_SpawnItemEx("BubbleFloodFXSpawner2",0,0,0,0,0,0,0,129)
TNT1 AAA 1 A_SpawnItemEx("BubbleFloodFXSpawner1",0,0,0,0,0,0,0,129)

Death:
TNT1 A 0 A_TakeFromTarget("BubbleFloodBusy",1)
stop
}
}

actor BubbleFloodOutSound : BubbleFlood
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("classes/FloodOut", "SoundSlot6")
stop
}
}

actor BubbleFloodFXSpawner
{
Height 0
Radius 0
- SOLID
+NOGRAVITY
+NOINTERACTION
+CLIENTSIDEONLY
//+NONETID
states
{
spawn5c:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",0,0,165,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",165,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",0,165,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",0,0,-165,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-165,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",0,-165,0,0,0,0,0,129)
spawn4c:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",105,105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",105,-105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-105,105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-105,-105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",105,105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",105,-105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-105,105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-105,-105,105,0,0,0,0,129)
spawn3c:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",0,0,90,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",90,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",0,90,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",0,0,-90,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-90,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",0,-90,0,0,0,0,0,129)
spawn2c:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",60,60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",60,-60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-60,60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-60,-60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",60,60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",60,-60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-60,60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX3",-60,-60,60,0,0,0,0,129)
spawn1c:
TNT1 A 0
stop

spawn5b:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",0,0,165,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",165,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",0,165,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",0,0,-165,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-165,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",0,-165,0,0,0,0,0,129)
spawn4b:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",105,105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",105,-105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-105,105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-105,-105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",105,105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",105,-105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-105,105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-105,-105,105,0,0,0,0,129)
spawn3b:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",0,0,90,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",90,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",0,90,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",0,0,-90,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-90,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",0,-90,0,0,0,0,0,129)
spawn2b:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",60,60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",60,-60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-60,60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-60,-60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",60,60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",60,-60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-60,60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX2",-60,-60,60,0,0,0,0,129)
spawn1b:
TNT1 A 0
stop

spawn5a:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",0,0,165,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",165,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",0,165,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",0,0,-165,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-165,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",0,-165,0,0,0,0,0,129)
spawn4a:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",105,105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",105,-105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-105,105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-105,-105,-105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",105,105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",105,-105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-105,105,105,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-105,-105,105,0,0,0,0,129)
spawn3a:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",0,0,90,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",90,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",0,90,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",0,0,-90,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-90,0,0,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",0,-90,0,0,0,0,0,129)
spawn2a:
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",60,60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",60,-60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-60,60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-60,-60,-60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",60,60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",60,-60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-60,60,60,0,0,0,0,129)
TNT1 A 0 A_SpawnItemEx("BubbleFloodFX1",-60,-60,60,0,0,0,0,129)
spawn1a:
TNT1 A 0
stop
}
}

actor BubbleFloodFXSpawner1 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXMA",0,0,0,0,0,0,0,129)
goto Spawn1a
}
}

actor BubbleFloodFXSpawner2 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXMB",0,0,0,0,0,0,0,129)
goto Spawn1b
}
}

actor BubbleFloodFXSpawner3 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXMC",0,0,0,0,0,0,0,129)
goto Spawn2c
}
}

actor BubbleFloodFXSpawner4 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXMD",0,0,0,0,0,0,0,129)
goto Spawn2a
}
}

actor BubbleFloodFXSpawner5 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXME",0,0,0,0,0,0,0,129)
goto Spawn3b
}
}

actor BubbleFloodFXSpawner6 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXMF",0,0,0,0,0,0,0,129)
goto Spawn3c
}
}

actor BubbleFloodFXSpawner7 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXMG",0,0,0,0,0,0,0,129)
goto Spawn4a
}
}

actor BubbleFloodFXSpawner8 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXMH",0,0,0,0,0,0,0,129)
goto Spawn4b
}
}

actor BubbleFloodFXSpawnerF1 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXM3",0,0,0,0,0,0,0,129)
goto Spawn5c
}
}

actor BubbleFloodFXSpawnerF2 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXM1",0,0,0,0,0,0,0,129)
goto Spawn5a
}
}

actor BubbleFloodFXSpawnerF3 : BubbleFloodFXSpawner
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BubbleFloodFXM2",0,0,0,0,0,0,0,129)
goto Spawn5b
}
}

actor BubbleFloodFX1 : BubbleFloodFXSpawner
{
scale 2.5
RenderStyle "Translucent"
Alpha 0.3
+CLIENTSIDEONLY
states
{
Spawn:
BUBA G 0
BUBA G 1
stop
}
}

actor BubbleFloodFX2 : BubbleFloodFX1
{
states
{
Spawn:
BUBA H 0
BUBA H 1
stop
}
}

actor BubbleFloodFX3 : BubbleFloodFX1
{
states
{
Spawn:
BUBA I 0
BUBA I 1
stop
}
}

actor BubbleFloodFXM1 : BubbleFloodFX1{}
actor BubbleFloodFXM2 : BubbleFloodFX2{}
actor BubbleFloodFXM3 : BubbleFloodFX3{}

actor BubbleFloodFXMA : BubbleFloodFXM1{Alpha 0.06}
actor BubbleFloodFXMB : BubbleFloodFXM2{Alpha 0.09}
actor BubbleFloodFXMC : BubbleFloodFXM3{Alpha 0.12}
actor BubbleFloodFXMD : BubbleFloodFXM1{Alpha 0.15}
actor BubbleFloodFXME : BubbleFloodFXM2{Alpha 0.18}
actor BubbleFloodFXMF : BubbleFloodFXM3{Alpha 0.21}
actor BubbleFloodFXMG : BubbleFloodFXM1{Alpha 0.24}
actor BubbleFloodFXMH : BubbleFloodFXM2{Alpha 0.27}

actor BubbleFloodPickup : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PowerFlood",1,"Pickup2")
TNT1 A 0 A_GiveInventory("FloodEnter")
TNT1 A 0 A_SpawnItemEx("FloodExitChecker")
Pickup2:
TNT1 A 0 A_GiveInventory("PowerFlood")
stop
}
}

actor IsUnderBubbleWater : IsUnderWater {}

actor FloodExitChecker
{
Height 0
Radius 0
+NOINTERACTION
-SOLID
+NOGRAVITY
+MISSILE
states
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("PowerFlood",1,"Spawn")
TNT1 A 0 A_GiveToTarget("FloodExit")
stop
}
}

actor FloodEnter : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_GiveInventory("IsUnderBubbleWater")
TNT1 A 0 ACS_ExecuteAlways(212,0,1)
stop
}
}

actor FloodExit : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_TakeInventory("IsUnderBubbleWater")
TNT1 A 0 ACS_ExecuteAlways(212,0,2)
stop
}
}

actor PowerFlood : PowerDamage
{
powerup.duration 3
damagefactor "normal", 1.0
}