actor BubbleBathWep : BaseMM8BDMWep
{
//$Category MM8BDM-Weapons
//$Title Bubble Bath
//$Sprite DOSWH0
Weapon.AmmoUse 2
Weapon.AmmoGive 28
Weapon.SlotNumber 6
Inventory.Pickupmessage "$PU_BUBBLEBATH"
Obituary "$OB_BUBBLEBATH"
Tag "$TAG_BUBBLEBATH"
weapon.ammotype "BubbleBathAmmo"
inventory.icon "BUBLBA"
States
{
SpawnLoop:
DOSW H -1
loop
Ready:
BUBT A 0 ACS_ExecuteAlways(998,0,DOSREBORN_COLOR_BUOY)
BUBT A 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BUBT A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BUBT A 1 A_Raise
Loop
Fire:
BUBT A 0 A_JumpIfNoAmmo("NoAmmo")
BUBT A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
BUBT A 0 A_FireCustomMissile("BathBubble",0,1,8,0)
BUBT CB 1
BUBT A 5
BUBT A 0 A_Refire
Goto Ready+1
NoAmmo:
BUBT A 1 ACS_Execute(979,0)
Goto Ready+1
}
}
actor BubbleBathWepSH : BubbleBathWep replaces BubbleBathWep {+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans}

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

actor BathBubble
{
Translation "93:93=202:202"
damagetype "BubbleBath"
Obituary "$OB_BUBBLEBATH"
PROJECTILE
+BOUNCEONWALLS
+BOUNCEONFLOORS
+BOUNCEONCEILINGS
+CANBOUNCEWATER
Bouncefactor 0.75
Wallbouncefactor 0.75
Radius 18
Height 18
scale 2.5
damage (21)
speed 28
States
{
Spawn:
BUBT DEF 2
BUBT G 6
goto Slow
Slow:
BUBT H 2 A_ScaleVelocity(.75) // 21
BUBT H 2 A_ScaleVelocity(.66) // ~14
BUBT I 2 A_ScaleVelocity(.5) // ~ 7
BUBT I 2 A_ScaleVelocity(.5) // ~ 4
goto Extend
Extend:
BUBT I 0 A_SpawnItemEx("BathBubbleExtend",0,0,0,0,0,0,0)
stop
Death:
BUBT JK 2
stop
}
}

actor BathBubbleExtend : BathBubble
{
reactiontime 9
States
{
Spawn:
BUBT H 2
BUBT H 2 A_ChangeVelocity(0,0,1,CVF_RELATIVE)
BUBT I 2 A_ChangeVelocity(0,0,1,CVF_RELATIVE)
BUBT I 2
BUBT H 2 A_ChangeVelocity(0,0,-1,CVF_RELATIVE)
BUBT H 2 A_ChangeVelocity(0,0,-1,CVF_RELATIVE)
BUBT I 2
BUBT I 2 A_ChangeVelocity(0,0,-1,CVF_RELATIVE)
BUBT H 2 A_ChangeVelocity(0,0,-1,CVF_RELATIVE)
BUBT H 2
BUBT I 2 A_ChangeVelocity(0,0,1,CVF_RELATIVE)
BUBT I 2 A_ChangeVelocity(0,0,1,CVF_RELATIVE)
BUBT I 0 A_CountDown
loop
Death:
BUBT JK 2 A_PlaySoundEx("weapon/bathpop","Body")
stop
}
}