const int PUMP_MAXRADIUS = 258;

actor Pumpman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_10B"
Dropitem "WaterShieldWep"
Weapon.AmmoUse2 224
Weapon.AmmoGive2 224
Obituary "$OB_PUMPCLOSE"
Inventory.Pickupmessage "It's time to lay some pipe."
weapon.ammotype "PumpSluggerAmmo"
weapon.ammotype2 "PumpSluggerAmmo"
States
{
Spawn:
C_10 B 1
loop

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

Ready:
PUMH A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_PUMPMAN)
PUMH A 0 A_GunFlash("Flash",0)
PUMH A 0 A_GiveInventory("SpawningMisfire",1)
goto Ready0
Ready0:
PUMH A 2 A_WeaponReady
PUMH A 0 A_TakeInventory("SpawningMisfire",1)
Goto Ready1

SpawnProtect:
PUMH A 1
Goto Ready0

Ready1:
PUMH A 0 A_JumpIfInventory("CutterFlag",1,"FireWait")
PUMH A 0 A_JumpIfInventory("PumpmanShieldFlag",1,"Ready3")
Ready2:
PUMH A 0 A_JumpIfInventory("PumpSluggerAmmo",224,"Ready4")
PUMH A 1 A_WeaponReady(8)
loop
Ready3:
PUMH A 1 A_WeaponReady
PUMH A 0 A_JumpIfInventory("PumpmanShieldFlag",1,"Ready3")
goto Ready1
Ready4:
PUMH A 2 A_WeaponReady
wait

Fire:
PUMH B 0 A_JumpIfInventory("SpawningMisfire",1,"SpawnProtect")
PUMH B 0 A_GiveInventory("PumpHandleToss_P")
PUMH B 0 A_Refire(1)
PUMH B 3
PUMH H 2
PUMH I 1
PUMH J 2
PUMH K 1 A_JumpIfInventory("RollingCutterFlag",1,"FireEnd")
Goto FireWait
FireWait:
PUMH K 0 A_JumpIfInventory("RollingCutterFlag",1,"FireEnd")
PUMH K 1 A_GiveInventory("CutterFlag",1)
PUMH K 0 A_JumpIfInventory("CutterFlag",35,"FireEndSnd")
loop
FireEndSnd:
PUMH B 0 A_PlaySoundEx("weapon/CutterCatch",1,0,0)
FireEnd:
PUMH B 0 A_TakeInventory("CutterFlag",999)
PUMH B 0 A_TakeInventory("RollingCutterFlag",999)
PUMH B 0 A_TakeInventory("PumpmanNoHandleF",999)
PUMH B 0 A_GunFlash("Flash",0)
PUMH BLM 3
PUMH M 0 A_TakeInventory("PumpmanNoHandleF",999)
PUMH MLB 2
PUMH NA 2
Goto Ready1

PUMH L 2 A_GunFlash("Flash",0)
PUMH BK 3
PUMH J 6 A_TakeInventory("PumpmanNoHandleF",999)
PUMH MA 2
Goto Ready1

NoAmmo:
PUMH A 1
Goto Ready1
AltFire:
PUMH A 0 A_JumpIfInventory("PumpmanShieldFlag",1,"AltRadius")
PUMH A 0 A_JumpIfNoAmmo("NoAmmo")
ShieldSetup:
PUMH M 0 A_GiveInventory("VivifyDelay4",1)
PUMH M 0 A_Refire(1)
PUMH NCDE 2
PUMH F 0 A_TakeInventory("PumpNextRadius")
PUMH F 0 A_TakeInventory("PumpBubbleHP1")
PUMH F 0 A_TakeInventory("PumpBubbleHP2")
PUMH F 0 A_TakeInventory("PumpBubbleHP3")
PUMH F 0 A_TakeInventory("PumpBubbleHP4")
PUMH F 0 A_TakeInventory("PumpBubbleHP5")
PUMH F 0 A_TakeInventory("PumpBubbleHP6")
PUMH F 0 A_TakeInventory("PumpBubbleHP7")
PUMH F 0 A_TakeInventory("PumpBubbleHP8")
PUMH F 0 A_GiveInventory("AdapterWaitCount",1)
PUMH F 0 A_GiveInventory("PumpmanShieldFlag",1)
PUMH F 0 A_GiveInventory("Pumpman_Alt_P")
PUMH F 0 A_PlaySoundEx("wep/PumpShieldSpawn","Weapon")

PUMH F 3 A_GiveInventory("PumpBubbleHP1",300)
PUMH G 2
PUMH F 3 A_GiveInventory("PumpBubbleHP2",300)
PUMH G 2
PUMH F 3 A_GiveInventory("PumpBubbleHP3",300)
PUMH G 2
PUMH F 3 A_GiveInventory("PumpBubbleHP4",300)
PUMH G 2
PUMH F 3 A_GiveInventory("PumpBubbleHP5",300)
PUMH G 2
PUMH F 3 A_GiveInventory("PumpBubbleHP6",300)
PUMH G 2
PUMH F 3 A_GiveInventory("PumpBubbleHP7",300)
PUMH G 2
PUMH F 3 A_GiveInventory("PumpBubbleHP8",300)
PUMH G 2
PUMH E 2 A_GiveInventory("PumpmanShieldFlag",1)
PUMH D 2
PUMH C 0 A_TakeInventory("AdapterWaitCount")
PUMH C 0
PUMH CBN 2
Goto Ready1

AltRadius:
PUMH P 0 A_JumpIfInventory("PumpNextRadius",1,"AltRadiusDec")
AltRadiusInc:
PUMH P 0 A_GiveInventory("PumpResizeShieldSnd_P",1)
PUMH P 1 A_GiveInventory("PumpRadiusUp",1)
PUMH P 0 A_JumpIfInventory("PumpCurrentRadius",PUMP_MAXRADIUS,2)
PUMH P 0 A_Refire("AltRadiusInc")
PUMH P 0 A_GiveInventory("PumpNextRadius",1)
Goto AltRadiusEnd
AltRadiusDec:
PUMH P 0 A_GiveInventory("PumpResizeShieldSnd_P",1)
PUMH P 1 A_GiveInventory("PumpRadiusDown",1)
PUMH P 0 A_JumpIfInventory("PumpCurrentRadius",6,2)
PUMH P 0 A_TakeInventory("PumpNextRadius")
Goto AltRadiusEnd
PUMH P 0 A_Refire("AltRadiusDec")
PUMH P 0 A_TakeInventory("PumpNextRadius")
Goto AltRadiusEnd
AltRadiusEnd:
PUMH A 1 A_RailWait
PUMH A 1 A_Refire("AltRadiusEnd")
Goto Ready1


Flash:
TNT1 AAA 2 A_JumpIfInventory("PumpmanShieldFlag",1,"Flash.Wait")
TNT1 A 1 A_JumpIfInventory("PumpmanShieldFlag",1,"Flash.Wait")
TNT1 A 0 A_GiveInventory("PumpSluggerAmmo",8)
loop
Flash.Wait:
TNT1 A 1 A_RailWait
TNT1 A 0 A_JumpIfInventory("PumpmanShieldFlag",1,"Flash.Wait")
goto Flash
}
}

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

actor PumpmanNoHandleF : Inventory {}
actor PumpmanShieldFlag : Inventory {}
actor PumpNextRadius : Inventory {}

actor PumpMainTrigger : Powerup
{
powerup.duration 8
}
actor PumpItemTrigger : Powerup
{
powerup.duration 8
}
actor PumpSizeSoundBuffer : Powerup
{
powerup.duration 6
}
actor PumpRadiusUp : Powerup
{
powerup.duration 2
}
actor PumpRadiusDown : PumpRadiusUp {}

actor PumpCurrentRadius : Inventory
{
inventory.amount 1
inventory.maxamount 258
}

actor PumpBubbleHP1 : Inventory
{
inventory.amount 1
inventory.maxamount 500
}

actor PumpBubbleHP2 : PumpBubbleHP1 {}
actor PumpBubbleHP3 : PumpBubbleHP1 {}
actor PumpBubbleHP4 : PumpBubbleHP1 {}
actor PumpBubbleHP5 : PumpBubbleHP1 {}
actor PumpBubbleHP6 : PumpBubbleHP1 {}
actor PumpBubbleHP7 : PumpBubbleHP1 {}
actor PumpBubbleHP8 : PumpBubbleHP1 {}

actor PumpExplodeItem : BasicClassItem
{
inventory.icon "WATRPOP"
inventory.pickupmessage "Insert funny Pumpman message here."
Tag "Split Water Shield"
states
{
Spawn:
PUMH [ 1
loop
UseCBM:
TNT1 A 0 A_JumpIfInventory("PumpItemTrigger",1,"No")
TNT1 A 0 A_JumpIfInventory("AdapterWaitCount",1,"No")
TNT1 A 0 A_JumpIfInventory("PumpmanShieldFlag",1,"Trigger")
goto No
Trigger:
//TNT1 A 0 A_SetArg(0,CallACS("cbm_countinv_acs",101,0))//PumpSluggerAmmo
//TNT1 A 0 A_TakeInventory("PumpSluggerAmmo",Args[0]/2)
//TNT1 A 0 A_TakeInventory("PumpSluggerAmmo",Args[0]/2+Args[0]%2,1)
//TNT1 A 0 A_TakeInventory("PumpSluggerAmmo",999,1)
TNT1 A 0 A_GiveInventory("PumpItemTrigger",1)
TNT1 A 0 A_SpawnItemEx("PumpExplodeFailsafe_H")
fail
}
}

actor PumpExplodeFailsafe_H : BasicWatcher
{
Args 6
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDownArg(0)
TNT1 A 1 A_JumpIfInTargetInventory("PumpmanShieldFlag",1,"Spawn")
stop
Death:
TNT1 A 0 A_TakeFromTarget("PumpmanShieldFlag",99)
stop
}
}

actor PumpResizeShieldSnd_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PumpSizeSoundBuffer",1,"No")
TNT1 A 0 A_PlaySoundEx("wep/PumpShieldSize","Weapon")
TNT1 A 0 A_GiveInventory("PumpSizeSoundBuffer",1)
stop
No:
TNT1 A 0
stop
}
}

actor PumpBubbleHP0_P : CustomInventory
{
States
{
Pickup2:
TNT1 A 0 A_TakeInventory("PumpSluggerAmmo",14)
TNT1 A 0 A_TakeInventory("PumpSluggerAmmo",14,1)
TNT1 A 0 A_JumpIfInventory("PumpBubbleHP1",1,"No")
TNT1 A 0 A_JumpIfInventory("PumpBubbleHP2",1,"No")
TNT1 A 0 A_JumpIfInventory("PumpBubbleHP3",1,"No")
TNT1 A 0 A_JumpIfInventory("PumpBubbleHP4",1,"No")
TNT1 A 0 A_JumpIfInventory("PumpBubbleHP5",1,"No")
TNT1 A 0 A_JumpIfInventory("PumpBubbleHP6",1,"No")
TNT1 A 0 A_JumpIfInventory("PumpBubbleHP7",1,"No")
TNT1 A 0 A_JumpIfInventory("PumpBubbleHP8",1,"No")
TNT1 A 0 A_TakeInventory("PumpmanShieldFlag",99)
stop
No:
TNT1 A 0
stop
}
}

actor PumpBubbleHP1_P : PumpBubbleHP0_P
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("PumpBubbleHP1",99999)
goto Pickup2
}
}
actor PumpBubbleHP2_P:PumpBubbleHP0_P{States{Pickup:TNT1 A 0 A_TakeInventory("PumpBubbleHP2",99999)goto Pickup2}}
actor PumpBubbleHP3_P:PumpBubbleHP0_P{States{Pickup:TNT1 A 0 A_TakeInventory("PumpBubbleHP3",99999)goto Pickup2}}
actor PumpBubbleHP4_P:PumpBubbleHP0_P{States{Pickup:TNT1 A 0 A_TakeInventory("PumpBubbleHP4",99999)goto Pickup2}}
actor PumpBubbleHP5_P:PumpBubbleHP0_P{States{Pickup:TNT1 A 0 A_TakeInventory("PumpBubbleHP5",99999)goto Pickup2}}
actor PumpBubbleHP6_P:PumpBubbleHP0_P{States{Pickup:TNT1 A 0 A_TakeInventory("PumpBubbleHP6",99999)goto Pickup2}}
actor PumpBubbleHP7_P:PumpBubbleHP0_P{States{Pickup:TNT1 A 0 A_TakeInventory("PumpBubbleHP7",99999)goto Pickup2}}
actor PumpBubbleHP8_P:PumpBubbleHP0_P{States{Pickup:TNT1 A 0 A_TakeInventory("PumpBubbleHP8",99999)goto Pickup2}}

actor PumpExplodeItemSound : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("VivifyDelay3",1,"No")
TNT1 A 0 A_GiveInventory("VivifyDelay3",1)
TNT1 A 0 A_SpawnItemEX("PumpExplodeSound")
stop
No:
TNT1 A 0
stop
}
}
actor PumpExplodeSound : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("wep/PumpShieldBurst","Body")
TNT1 A 10 A_PlaySoundEx("wep/PumpShieldBurst","Weapon")
stop
}
}

actor PumpHandleToss_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("PumpmanNoHandleF",1)
TNT1 A 0 A_GiveInventory("PumpMainTrigger",1)
TNT1 A 0 A_TakeInventory("CutterFlag")
TNT1 A 0 A_TakeInventory("RollingCutterFlag")
TNT1 A 0 A_SpawnItemEx("PumpHandle",cos(-pitch)*0,0,29+sin(-pitch)*0,cos(-pitch)*1,0,sin(-pitch)*1,0,32)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",1,"Pickup_S")
stop
Pickup_S:
TNT1 A 0 A_SpawnItemEx("PumpHandleSpread",cos(-pitch)*0,0,29+sin(-pitch)*0,cos(-pitch)*45,0,sin(-pitch)*45,15,32)
TNT1 A 0 A_SpawnItemEx("PumpHandleSpread",cos(-pitch)*0,0,29+sin(-pitch)*0,cos(-pitch)*45,0,sin(-pitch)*45,-15,32)
stop
}
}


actor Pumpman_Alt_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("LightTeamFlag",1,"FireB")
TNT1 A 0 A_JumpIfInventory("WilyTeamFlag",1,"FireR")
TNT1 A 0 A_JumpIfInventory("CossackTeamFlag",1,"FireO")
TNT1 A 0 A_JumpIfInventory("KingTeamFlag",1,"FireP")
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB1",0,0,0,0,0,0,0)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB2",0,0,0,0,0,0,45)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB3",0,0,0,0,0,0,90)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB4",0,0,0,0,0,0,135)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB5",0,0,0,0,0,0,180)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB6",0,0,0,0,0,0,225)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB7",0,0,0,0,0,0,270)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB8",0,0,0,0,0,0,315)
stop
FireB:
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB1B",0,0,0,0,0,0,0)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB2B",0,0,0,0,0,0,45)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB3B",0,0,0,0,0,0,90)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB4B",0,0,0,0,0,0,135)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB5B",0,0,0,0,0,0,180)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB6B",0,0,0,0,0,0,225)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB7B",0,0,0,0,0,0,270)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB8B",0,0,0,0,0,0,315)
stop
FireR:
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB1R",0,0,0,0,0,0,0)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB2R",0,0,0,0,0,0,45)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB3R",0,0,0,0,0,0,90)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB4R",0,0,0,0,0,0,135)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB5R",0,0,0,0,0,0,180)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB6R",0,0,0,0,0,0,225)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB7R",0,0,0,0,0,0,270)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB8R",0,0,0,0,0,0,315)
stop
FireO:
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB1O",0,0,0,0,0,0,0)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB2O",0,0,0,0,0,0,45)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB3O",0,0,0,0,0,0,90)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB4O",0,0,0,0,0,0,135)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB5O",0,0,0,0,0,0,180)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB6O",0,0,0,0,0,0,225)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB7O",0,0,0,0,0,0,270)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB8O",0,0,0,0,0,0,315)
stop
FireP:
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB1P",0,0,0,0,0,0,0)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB2P",0,0,0,0,0,0,45)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB3P",0,0,0,0,0,0,90)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB4P",0,0,0,0,0,0,135)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB5P",0,0,0,0,0,0,180)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB6P",0,0,0,0,0,0,225)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB7P",0,0,0,0,0,0,270)
TNT1 A 0 A_SpawnItemEX("PumpShieldBubbleB8P",0,0,0,0,0,0,315)
stop
}
}



actor PumpHandle : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_PUMPHANDLE"
damagetype "PumpM_Handle"
+NOTARGETSWITCH
+SKYEXPLODE
+EXPLODEONWATER
+THRUSPECIES
+DONTREFLECT
species "DumbPumpBubble"
damage (240+CallACS("core_checkrune",RUNE_RAGE,2)*120)
Radius 10
Height 14
scale 2.5
speed 1//45
reactiontime 15
States
{
Spawn:
TNT1 A 0
PUM4 W 0 Thing_ChangeTID(0,8000+CallACS("core_gettarget"))
PUM4 W 0 A_ScaleVelocity(45)
PUM4 W 0 A_PlaySound("wep/PumpSlugger",1,1.0,true)
SpawnL:
PUM4 W 0 A_CountDown
PUM4 WXYZ 3 A_TakeFromTarget("CutterFlag",999)
PUM4 W 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death2")
PUM4 WXYZ 3 A_TakeFromTarget("CutterFlag",999)
PUM4 W 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death2")
loop

Death:
PUM4 W 0 //A_PlaySoundEx("wep/PumpSluggerHit","Weapon",1.0,false)
Crash:
XDeath:
PUM4 W 0 A_PlaySound("wep/PumpSlugger",1,0.0,false)
PUM4 W 0 A_SpawnItemEx("PumpHandleReturn",0,0,0,0,0,0,0,4096,0,tid)//SXF_CLEARCALLERTID
TNT1 A 1 A_Stop
stop
Death2:
TNT1 A 0
stop
}
}

actor PumpHandleReturn : PumpHandle
{
+NOINTERACTION
+SEEKERMISSILE
ReactionTime 87//about 30 seconds
damage (0)
speed 45
States
{
Spawn:
TNT1 A 0
PUM4 W 0 A_RearrangePointers(0,0,2)
PUM4 W 0 A_FaceTarget
PUM4 W 0 A_PlaySound("wep/PumpSlugger",1,1.0,true)
goto Spawn2
Spawn2:
PUM4 W 0 A_TakeFromTarget("CutterFlag",999)
PUM4 W 0 A_JumpIfCloser(58,"Death")
PUM4 WW 0 A_SeekerMissile(90,90,2)
PUM4 W 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 W 0 A_JumpIfCloser(58,"Death")
PUM4 W 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 W 0 A_JumpIfCloser(58,"Death")
PUM4 W 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)

PUM4 X 0 A_JumpIfCloser(58,"Death")
PUM4 XX 0 A_SeekerMissile(90,90,2)
PUM4 X 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 X 0 A_JumpIfCloser(58,"Death")
PUM4 X 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 X 0 A_JumpIfCloser(58,"Death")
PUM4 X 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)

PUM4 Y 0 A_TakeFromTarget("CutterFlag",999)
PUM4 Y 0 A_JumpIfCloser(58,"Death")
PUM4 YY 0 A_SeekerMissile(90,90,2)
PUM4 Y 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 Y 0 A_JumpIfCloser(58,"Death")
PUM4 Y 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 Y 0 A_JumpIfCloser(58,"Death")
PUM4 Y 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)

PUM4 Z 0 A_JumpIfCloser(58,"Death")
PUM4 ZZ 0 A_SeekerMissile(90,90,2)
PUM4 Z 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 Z 0 A_JumpIfCloser(58,"Death")
PUM4 Z 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 Z 0 A_JumpIfCloser(58,"Death")
PUM4 Z 1 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
PUM4 Z 0 A_CountDown
PUM4 Z 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death2")
loop
Death:
TNT1 A 0 A_PlaySoundEx("weapon/CutterCatch","Weapon")
TNT1 A 1 A_GivetoTarget("RollingCutterFlag",1)
stop
}
}

actor PumpHandleSpread : PumpHandle
{
reactiontime 30
Speed 45
States
{
Spawn:
TNT1 A 0
PUM4 W 0 A_PlaySound("wep/PumpSlugger",1,1.0,true)
SpawnL:
PUM4 W 0
PUM4 WXYZ 3
PUM4 W 0 A_CountDown
PUM4 W 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death2")
loop
Death:
TNT1 A 0 //
Crash:
XDeath:
TNT1 A 0 A_PlaySound("wep/PumpSlugger",1,0.0,false)
TNT1 A 0 A_SpawnItemEx("PumpHandleReturnSpread")
TNT1 A 1 A_Stop
stop
Death2:
TNT1 A 0
stop
}
}

actor PumpHandleReturnSpread : PumpHandleSpread
{
+NOINTERACTION
+SEEKERMISSILE
ReactionTime 87
damage (0)
States
{
Spawn:
TNT1 A 0
PUM4 W 0 A_RearrangePointers(0,0,2)
PUM4 W 0 A_FaceTarget
PUM4 W 0 A_PlaySound("wep/PumpSlugger",1,1.0,true)
goto Spawn2
Spawn2:
PUM4 W 0 A_JumpIfCloser(58,"Death")
PUM4 WW 0 A_SeekerMissile(90,90,2)
PUM4 W 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 W 0 A_JumpIfCloser(58,"Death")
PUM4 W 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 W 0 A_JumpIfCloser(58,"Death")
PUM4 W 1 A_GiveInventory("PumpHandleR_P",1)

PUM4 X 0 A_JumpIfCloser(58,"Death")
PUM4 XX 0 A_SeekerMissile(90,90,2)
PUM4 X 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 X 0 A_JumpIfCloser(58,"Death")
PUM4 X 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 X 0 A_JumpIfCloser(58,"Death")
PUM4 X 1 A_GiveInventory("PumpHandleR_P",1)

PUM4 Y 0 A_JumpIfCloser(58,"Death")
PUM4 YY 0 A_SeekerMissile(90,90,2)
PUM4 Y 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 Y 0 A_JumpIfCloser(58,"Death")
PUM4 Y 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 Y 0 A_JumpIfCloser(58,"Death")
PUM4 Y 1 A_GiveInventory("PumpHandleR_P",1)

PUM4 Z 0 A_JumpIfCloser(58,"Death")
PUM4 ZZ 0 A_SeekerMissile(90,90,2)
PUM4 Z 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 Z 0 A_JumpIfCloser(58,"Death")
PUM4 Z 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 Z 0 A_JumpIfCloser(58,"Death")
PUM4 Z 1 A_GiveInventory("PumpHandleR_P",1)
PUM4 Z 0 A_CountDown
PUM4 Z 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death2")
loop
Death:
TNT1 A 0 A_PlaySoundEx("weapon/CutterCatch","Weapon")
TNT1 A 1
stop
}
}
actor PumpHandleR_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("PumpHandleRDamager",0,0,0,momx,momy,momz,0,8+32)
stop
}
}

actor PumpHandleRDamager
{
PROJECTILE
damagetype "PumpM_Handle"
Obituary "$OB_PUMPHANDLE"
+RIPPER
+THRUGHOST
+DONTBLAST
+DONTSPLASH
+THRUSPECIES
species "DumbPumpBubble"
damage (40+CallACS("core_checkrune",RUNE_RAGE,2)*20)
radius 16
height 16
States
{
Spawn:
TNT1 A 2
stop
}
}

actor PumpShieldBubbleBoom : BasicImplosion
{
Obituary "$OB_PUMPBUBBLE"
damagetype "PumpM_Shield"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(50+CallACS("core_checkrune",RUNE_SPREAD,2)*100,20,0,0,20)
TNT1 A 2
stop
}
}

actor PumpM_ShieldProtect : PowerProtection
{
Powerup.Duration 9
damagefactor "PumpM_Shield", 0.0
}

actor PumpShieldBubbleB1 : CBM_ShootableActor//ProjSpawnFuncActor
{
var int user_radius;
var int user_owner;
Obituary "$OB_PUMPBUBBLE"
damagetype "PumpM_Shield"
+MISSILE

+GHOST
+NOBLOOD
+NOGRAVITY
+NOCLIP
+DONTSPLASH
+DONTBLAST
+NOTARGETSWITCH
+FORCEXYBILLBOARD
+EXPLODEONDEATH
+DONTREFLECT
+DONTDRAIN
//+DONTRIP
+THRUSPECIES
species "DumbPumpBubble"
damagefactor "PumpM_Handle",0.0
damagefactor "PumpM_ShieldToss",0.0
damagefactor "PumpM_Shield",0.0
damagefactor "Telefrag",0.0

painchance 256
painchance "PumpM_Handle", 0
painchance "PumpM_ShieldToss", 0
painchance "PumpM_Shield", 0
painchance "Telefrag", 0


//PainThreshold 1
//RadiusDamageFactor 0.0

painsound "wep/PumpShieldBlock"
deathsound "wep/PumpShieldPop"
renderstyle translucent
alpha 0.75
health 90300//90000+300
stamina 1//For divide by 10 hp for fishing
accuracy 100//Control low health amount. Example (25) 90050 and 90025 for med/low sprites
//reactiontime 1
damage (0)
height 32
radius 32
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
TNT1 A 0 A_Warp(2,16,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)//WARPF_INTERPOLATE|WARPF_USECALLERANGLE|WARPF_NOCHECKPOSITION
TNT1 A 1 A_JumpIfInTargetInventory("PumpBubbleHP1",1,"Appear")
loop
Appear:
PUM4 S 0 A_SetUserVar("user_owner",CallACS("core_gettarget"))
PUM4 S 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 S 1 A_Warp(2,32,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
PUM4 S 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 S 1 A_Warp(2,48,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
PUM4 S 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 S 1 A_Warp(2,64,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
PUM4 S 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 S 1 A_Warp(2,80,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
SpriteSet:
PUM4 E 0
PUM4 "#" 0 A_ChangeFlag("SHOOTABLE",1)
Appear1:
PUM4 "#" 0 A_TakeInventory("AdapterWaitCount",999)
Appear2:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_JumpIfInTargetInventory("PumpItemTrigger",1,"Burst")
PUM4 "#" 0 A_Warp(2,96 + user_radius,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1) + (0.008*(CallACS("core_checkrune",RUNE_RAGE,2)+1) * user_radius),28)
PUM4 "#" 0 A_Explode(50+CallACS("core_checkrune",RUNE_SPREAD,2)*100,20,0,0,20)//A_SpawnItemEx("PumpShieldBubbleBoom",0,0,0,0,0,0,0,1024)
PUM4 "#" 1
PUM4 "#" 0 A_JumpIfInTargetInventory("PumpMainTrigger",1,"AppearTracer1")
PUM4 "#" 0 A_JumpIfInTargetInventory("PumpRadiusUp",1,"Up")
PUM4 "#" 0 A_JumpIfInTargetInventory("PumpRadiusDown",1,"Down")
loop
AppearTracer1:
PUM4 "#" 0 A_GiveInventory("AdapterWaitCount",1)
AppearTracer2:
PUM4 "#" 0 ACS_NamedExecuteWithResult("core_setpointer",AAPTR_TRACER,8000+user_owner)
PUM4 "#" 0 A_JumpIfInTargetInventory("PumpItemTrigger",1,"Burst")
PUM4 "#" 0 A_Warp(AAPTR_TRACER,96 + user_radius,0,-5,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1) + (0.008*(CallACS("core_checkrune",RUNE_RAGE,2)+1) * user_radius),28,"ContinueLikeThis")
goto Appear1
ContinueLikeThis:
PUM4 "#" 0 A_Explode(50+CallACS("core_checkrune",RUNE_SPREAD,2)*100,20,0,0,20)
PUM4 "#" 1
goto AppearTracer2
Up:
PUM4 "#" 0 A_SetUserVar("user_radius",user_radius+6)
Goto RadiusUpdate
Down:
PUM4 "#" 0 A_SetUserVar("user_radius",user_radius-6)
Goto RadiusUpdate
RadiusUpdate:
PUM4 "#" 0 A_TakeFromTarget("PumpCurrentRadius",999)
PUM4 "#" 0 A_GiveToTarget("PumpCurrentRadius",user_radius)
Goto Appear2
Pain:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_Pain
PUM4 "#" 0 A_TakeFromTarget("PumpBubbleHP1",99999)
PUM4 "#" 0 A_GiveToTarget("PumpBubbleHP1",(health-90000)*Stamina)
goto SpriteCheck
FakeDeath:
PUM4 B 0 A_CountDownArg(4)
goto Death
Death:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP1_P",1)
goto BubbDeath
BubbDeath:
PUM4 B 0 A_Scream
PUM4 B 0 A_ChangeFlag("NOINTERACTION",1)
PUM4 B 2
stop
SpriteCheck:
PUM4 "#" 0 A_JumpIf(health>=90000+accuracy*2,"FullHP")
PUM4 "#" 0 A_JumpIf(health>=90000+accuracy,"MediumHP")
PUM4 "#" 0 A_JumpIf(health<=90000,"FakeDeath")
//PUM4 "#" 0 A_JumpIf(health>=1,"LowHP")
LowHP:
PUM4 C 0
goto AppearCheck
MediumHP:
PUM4 D 0
goto AppearCheck
FullHP:
PUM4 E 0
goto AppearCheck
AppearCheck:
PUM4 "#" 0 A_JumpIfInventory("AdapterWaitCount",1,"AppearTracer2")
goto Appear2+2
Die:
PUM4 B 0 A_Scream
PUM4 B 0 A_ChangeFlag("NOINTERACTION",1)
PUM4 B 0 A_TakeFromTarget("PumpBubbleHP1",99999)
PUM4 B 0 A_TakeFromTarget("PumpBubbleHP2",99999)
PUM4 B 0 A_TakeFromTarget("PumpBubbleHP3",99999)
PUM4 B 0 A_TakeFromTarget("PumpBubbleHP4",99999)
PUM4 B 0 A_TakeFromTarget("PumpBubbleHP5",99999)
PUM4 B 0 A_TakeFromTarget("PumpBubbleHP6",99999)
PUM4 B 0 A_TakeFromTarget("PumpBubbleHP7",99999)
PUM4 B 0 A_TakeFromTarget("PumpBubbleHP8",99999)
PUM4 B 0 A_TakeFromTarget("PumpmanShieldFlag",99)
PUM4 B 0 A_TakeFromTarget("PumpSluggerAmmo",28)
PUM4 B 2
stop
Burst:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP1_P",1)
goto BurstCheck
BurstCheck:
PUM4 B 0 A_Warp(AAPTR_TRACER,96 + user_radius,0,-5,0,28+512,"BurstTracerCheck")
PUM4 B 0 A_GiveInventory("PumpExplodeItemSound",1,AAPTR_TARGET)
goto BurstCheck2
BurstTracerCheck:
PUM4 B 0 A_GiveInventory("PumpExplodeItemSound",1,AAPTR_TRACER)
goto BurstCheck2
BurstCheck2:
PUM4 B 0 A_JumpIf(health>=90000+accuracy*2,"FullHPThrow")
PUM4 B 0 A_JumpIf(health>=90000+accuracy,"MediumHPThrow")
//PUM4 B 0 A_JumpIf(health>=1,"LowHPThrow")
LowHPThrow:
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrown",0,0,0,25 - (user_radius / 10.24),-5 - (user_radius / 10.24),0,45*0,SXF_TRANSFERPOINTERS)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertySpread",1,"LowHPThrow_S")
stop
LowHPThrow_S:
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrown",0,0,0,25-(user_radius/10.24),-5-(user_radius/10.24),0,15,1024)
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrown",0,0,0,25-(user_radius/10.24),-5-(user_radius/10.24),0,-15,1024)
stop
MediumHPThrow:
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrownM",0,0,0,25 - (user_radius / 10.24),-5 - (user_radius / 10.24),0,45*0,1024)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertySpread",1,"MediumHPThrow_S")
stop
MediumHPThrow_S:
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrownM",0,0,0,25-(user_radius/10.24),-5-(user_radius/10.24),0,15,1024)
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrownM",0,0,0,25-(user_radius/10.24),-5-(user_radius/10.24),0,-15,1024)
stop
FullHPThrow:
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrownF",0,0,0,25 - (user_radius / 10.24),-5 - (user_radius / 10.24),0,45*0,1024)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertySpread",1,"FullHPThrow_S")
stop
FullHPThrow_S:
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrownF",0,0,0,25-(user_radius/10.24),-5-(user_radius/10.24),0,15,1024)
PUM4 B 0 A_SpawnItemEx("PumpShieldBubbleThrownF",0,0,0,25-(user_radius/10.24),-5-(user_radius/10.24),0,-15,1024)
stop
}
}
actor PumpShieldBubbleB1B : PumpShieldBubbleB1
{
DesignatedTeam 0
}
actor PumpShieldBubbleB1R : PumpShieldBubbleB1
{
DesignatedTeam 1
}
actor PumpShieldBubbleB1O : PumpShieldBubbleB1
{
DesignatedTeam 2
}
actor PumpShieldBubbleB1P : PumpShieldBubbleB1
{
DesignatedTeam 3
}

actor PumpShieldBubbleB2 : PumpShieldBubbleB1
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
TNT1 A 0 A_Warp(2,16,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
TNT1 A 1 A_JumpIfInTargetInventory("PumpBubbleHP2",1,"Appear")
loop
Pain:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_Pain
PUM4 "#" 0 A_TakeFromTarget("PumpBubbleHP2",99999)
PUM4 "#" 0 A_GiveToTarget("PumpBubbleHP2",(health-90000)*Stamina)
goto SpriteCheck
Death:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP2_P",1)
goto BubbDeath
Burst:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP2_P",1)
goto BurstCheck
}
}
actor PumpShieldBubbleB2B : PumpShieldBubbleB2{DesignatedTeam 0}
actor PumpShieldBubbleB2R : PumpShieldBubbleB2{DesignatedTeam 1}
actor PumpShieldBubbleB2O : PumpShieldBubbleB2{DesignatedTeam 2}
actor PumpShieldBubbleB2P : PumpShieldBubbleB2{DesignatedTeam 3}

actor PumpShieldBubbleB3 : PumpShieldBubbleB1
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
TNT1 A 0 A_Warp(2,16,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
TNT1 A 1 A_JumpIfInTargetInventory("PumpBubbleHP3",1,"Appear")
loop
Pain:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_Pain
PUM4 "#" 0 A_TakeFromTarget("PumpBubbleHP3",99999)
PUM4 "#" 0 A_GiveToTarget("PumpBubbleHP3",(health-90000)*Stamina)
goto SpriteCheck
Death:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP3_P",1)
goto BubbDeath
Burst:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP3_P",1)
goto BurstCheck
}
}
actor PumpShieldBubbleB3B : PumpShieldBubbleB3{DesignatedTeam 0}
actor PumpShieldBubbleB3R : PumpShieldBubbleB3{DesignatedTeam 1}
actor PumpShieldBubbleB3O : PumpShieldBubbleB3{DesignatedTeam 2}
actor PumpShieldBubbleB3P : PumpShieldBubbleB3{DesignatedTeam 3}

actor PumpShieldBubbleB4 : PumpShieldBubbleB1
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
TNT1 A 0 A_Warp(2,16,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
TNT1 A 1 A_JumpIfInTargetInventory("PumpBubbleHP4",1,"Appear")
loop
Pain:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_Pain
PUM4 "#" 0 A_TakeFromTarget("PumpBubbleHP4",99999)
PUM4 "#" 0 A_GiveToTarget("PumpBubbleHP4",(health-90000)*Stamina)
goto SpriteCheck
Death:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP4_P",1)
goto BubbDeath
Burst:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP4_P",1)
goto BurstCheck
}
}
actor PumpShieldBubbleB4B : PumpShieldBubbleB4{DesignatedTeam 0}
actor PumpShieldBubbleB4R : PumpShieldBubbleB4{DesignatedTeam 1}
actor PumpShieldBubbleB4O : PumpShieldBubbleB4{DesignatedTeam 2}
actor PumpShieldBubbleB4P : PumpShieldBubbleB4{DesignatedTeam 3}

actor PumpShieldBubbleB5 : PumpShieldBubbleB1
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
TNT1 A 0 A_Warp(2,16,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
TNT1 A 1 A_JumpIfInTargetInventory("PumpBubbleHP5",1,"Appear")
loop
Pain:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_Pain
PUM4 "#" 0 A_TakeFromTarget("PumpBubbleHP5",99999)
PUM4 "#" 0 A_GiveToTarget("PumpBubbleHP5",(health-90000)*Stamina)
goto SpriteCheck
Death:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP5_P",1)
goto BubbDeath
Burst:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP5_P",1)
goto BurstCheck
}
}
actor PumpShieldBubbleB5B : PumpShieldBubbleB5{DesignatedTeam 0}
actor PumpShieldBubbleB5R : PumpShieldBubbleB5{DesignatedTeam 1}
actor PumpShieldBubbleB5O : PumpShieldBubbleB5{DesignatedTeam 2}
actor PumpShieldBubbleB5P : PumpShieldBubbleB5{DesignatedTeam 3}

actor PumpShieldBubbleB6 : PumpShieldBubbleB1
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
TNT1 A 0 A_Warp(2,16,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
TNT1 A 1 A_JumpIfInTargetInventory("PumpBubbleHP6",1,"Appear")
loop
Pain:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_Pain
PUM4 "#" 0 A_TakeFromTarget("PumpBubbleHP6",99999)
PUM4 "#" 0 A_GiveToTarget("PumpBubbleHP6",(health-90000)*Stamina)
goto SpriteCheck
Death:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP6_P",1)
goto BubbDeath
Burst:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP6_P",1)
goto BurstCheck
}
}
actor PumpShieldBubbleB6B : PumpShieldBubbleB6{DesignatedTeam 0}
actor PumpShieldBubbleB6R : PumpShieldBubbleB6{DesignatedTeam 1}
actor PumpShieldBubbleB6O : PumpShieldBubbleB6{DesignatedTeam 2}
actor PumpShieldBubbleB6P : PumpShieldBubbleB6{DesignatedTeam 3}

actor PumpShieldBubbleB7 : PumpShieldBubbleB1
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
TNT1 A 0 A_Warp(2,16,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
TNT1 A 1 A_JumpIfInTargetInventory("PumpBubbleHP7",1,"Appear")
loop
Pain:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_Pain
PUM4 "#" 0 A_TakeFromTarget("PumpBubbleHP7",99999)
PUM4 "#" 0 A_GiveToTarget("PumpBubbleHP7",(health-90000)*Stamina)
goto SpriteCheck
Death:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP7_P",1)
goto BubbDeath
Burst:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP7_P",1)
goto BurstCheck
}
}
actor PumpShieldBubbleB7B : PumpShieldBubbleB7{DesignatedTeam 0}
actor PumpShieldBubbleB7R : PumpShieldBubbleB7{DesignatedTeam 1}
actor PumpShieldBubbleB7O : PumpShieldBubbleB7{DesignatedTeam 2}
actor PumpShieldBubbleB7P : PumpShieldBubbleB7{DesignatedTeam 3}

actor PumpShieldBubbleB8 : PumpShieldBubbleB1
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
TNT1 A 0 A_Warp(2,16,0,24,0.8*(CallACS("core_checkrune",RUNE_RAGE,2)+1),28)
TNT1 A 1 A_JumpIfInTargetInventory("PumpBubbleHP8",1,"Appear")
loop
Pain:
PUM4 "#" 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Die")
PUM4 "#" 0 A_Pain
PUM4 "#" 0 A_TakeFromTarget("PumpBubbleHP8",99999)
PUM4 "#" 0 A_GiveToTarget("PumpBubbleHP8",(health-90000)*Stamina)
goto SpriteCheck
Death:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP8_P",1)
goto BubbDeath
Burst:
PUM4 B 0 A_GiveToTarget("PumpBubbleHP8_P",1)
goto BurstCheck
}
}
actor PumpShieldBubbleB8B : PumpShieldBubbleB8{DesignatedTeam 0}
actor PumpShieldBubbleB8R : PumpShieldBubbleB8{DesignatedTeam 1}
actor PumpShieldBubbleB8O : PumpShieldBubbleB8{DesignatedTeam 2}
actor PumpShieldBubbleB8P : PumpShieldBubbleB8{DesignatedTeam 3}

actor PumpShieldBubbleThrown : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_PUMPBUBBLE"
damagetype "PumpM_ShieldToss"
+FORCEXYBILLBOARD
+THRUSPECIES
species "DumbPumpBubble"
renderstyle translucent
alpha 0.75
damage (130)
radius 32
height 20
scale 2.5
states
{
Spawn:
TNT1 A 0
PUM4 C 0
goto Flying
Flying:
PUM4 "#" 1 A_ChangeVelocity(0,2.5,0,1)
loop
Death:
PUM4 B 0 A_SpawnItemEx("SoakifyEffect")
PUM4 B 2
stop
}
}

actor PumpShieldBubbleThrownM : PumpShieldBubbleThrown
{
damage (160)
States
{
Spawn:
TNT1 A 0
PUM4 D 0
goto Flying
}
}

actor PumpShieldBubbleThrownF : PumpShieldBubbleThrown
{
damage (190)
States
{
Spawn:
TNT1 A 0
PUM4 E 0
goto Flying
}
}

actor Pumpman_W_NormalBar : NormalBar {Args 201,74}
actor Pumpman_W_ScriptBar : ScriptBar {}