actor BubbleLeadWep : MegaBuster 10007
{
Weapon.AmmoUse 2
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Obituary "%o was bounced away by %k's Bubble Lead."
Inventory.Pickupmessage "Power up! Bubble Lead!"
weapon.ammotype "BubbleAmmo"
inventory.icon "BUBBI"
inventory.pickupsound "weapon/weaponup"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
WEAP D 1
loop
Ready:
BUBB D 0 ACS_ExecuteAlways(998,0,1)
BUBB D 1 A_WeaponReady
goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BUBB D 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BUBB D 1 A_Raise
Loop
Fire:
BUBB D 0 A_JumpIfNoAmmo("NoAmmo")
BUBB D 0 A_PlaySoundEx("weapon/mbuster","Weapon")
BUBB D 0 A_TakeInventory("BubbleAmmo",2)
BUBB D 0 A_SpawnItemEx("BubbleLeadStart",6,0,0,8,0,8,0,0,0)
BUBB EFD 4//A_FireCustomMissile("BubbleLead",0,1,8,0)
BUBB D 0 A_Refire
goto Ready+1
NoAmmo:
BUBB D 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor BubbleAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
}

actor BubbleLeadStart
{
PROJECTILE
-NOGRAVITY
Damage (20)
Height 5
Radius 6
Scale 2.5
States
{
Spawn:
BUBB ABCB 3
loop
Death:
TNT1 A 0 A_JumpIf(z-floorz==0,"Death2")
TNT1 A 1
stop
Death2:
TNT1 A 1 A_SpawnItemEx("BubbleLead",0,0,0,18,0,0,0,0,0)
stop
}
}

actor BubbleLead// : MaceFX1
{
-SOLID
PROJECTILE
-NOGRAVITY
Damage (20)
Height 16
Radius 20
Scale 2.5
gravity 3.0
speed 18
States
{
Spawn:
BUBB A 4 
BUBB A 0 A_GiveInventory("Clip",1)
BUBB BCB 4
loop
Death:
TNT1 A 0 A_JumpIfInventory("Clip",1,"Continue")
TNT1 A 1
stop
Continue:
TNT1 A 0  A_CustomMissile("BubbleLead",0,0,0,2,0)
TNT1 A 1
stop
}
}