//Mid detonation now only restores one ammo
//Mobility recoded
actor PirateMan : VCBaseClass
{
Player.ScoreIcon "PIRAMUGS"
player.startitem "BaseFlagPack", 1
player.displayname "Pirateman"
player.soundclass "Piratemanc"
player.startitem "RemoteMineBoss"
player.startitem "UltimateAttackItem4"
player.startitem "UltSoundWatcherSpawn4"
player.startitem "RemoteMineStock", 8
player.startitem "BaseAltfireAmmo", 112
player.startitem "IsFromMMB"
player.startitem "NoHealthBar"
player.viewheight 51
player.forwardmove 0.8,0.8
player.sidemove 0.78,0.78
player.jumpz 10
States
{
Spawn:
Animation0:
PIRA B 0
PIRA B 1 A_JumpIf(z-floorz>0, "Jumping")
PIRA A 1 A_JumpIf(z-floorz>0, "Jumping")
Goto Spawn+2
See:
PIRA BBBBBCCCCCDDDDDEEEEE 1 A_JumpIf(z-floorz>0, "Jumping")
Goto Spawn+1
Jumping:
PIRA J 1 A_JumpIf(z-floorz<=0, "Spawn")
wait
Missile:
Animation1:
PIRA F 0 A_JumpIfInventory("PirateBubbleActive",1,"Animation6")
PIRA FFF 1 A_JumpIf(z-floorz>0, "JumpingMissile")
Missile2:
PIRA GGGGGGG 1 A_JumpIf(z-floorz>0, "JumpingMissile2")
Goto Spawn+2
JumpingMissile:
PIRA KKK 1 A_JumpIf(z-floorz<=0, "Missile")
JumpingMissile2:
PIRA LLLLLLL 1 A_JumpIf(z-floorz<=0, "Missile2")
Goto Jumping
Animation2:
PirateBubbleSpinA:
PRB2 GGGG 1
goto Spawn+2
Animation3:
PirateBubbleSpinB:
PRB2 HHHH 1
goto Spawn+2
Animation4:
PirateBubbleSpinC:
PRB2 IIII 1
goto Spawn+2
Animation5:
PIRA PQQQQQ 2
goto Spawn+2
Animation6:
PIRA I 10
goto Spawn+2
Animation7:
PIRA M 4
A7Loop:
PIRA MNON 2
loop

ClassPain:
PIRA HHHHHHHHHH 2 A_SpawnItem("PainFX",0,3)
Goto Spawn+1

Death.WaveBurner:
Death.WaveBurnerUW:
Death.Burnerman:
TNT1 A 1 A_JumpIfInventory("PirateBubbleWaveBurnerChecker",1,"ClassDeath.Weakness")
Goto ClassDeath
ClassDeath.Weakness:
TNT1 A 0 A_SpawnItemEx("DeadBurnedPirateMan",0,0,32,0,0,0,0,SXF_TRANSFERTRANSLATION)
NOFX A 20 ACS_ExecuteAlways(999,0,0)
NOFX A 1 A_CheckPlayerDone
wait
ClassDeath:
PIRA H 20 ACS_ExecuteAlways(999,0,0)
PIRA H 0 A_PlayerScream
PLY1 H 0 A_SpawnItemEx("FakeDeathFXMMB", 0, 0, 32)
NOFX A 1 A_CheckPlayerDone
wait
WeaponGetM:
PIRA H 0 A_JumpIfInTargetInventory("RemoteMineWepM",1,2)
PIRA H 0 A_GiveToTarget("WeaponGetter")
PIRA H 0 A_GiveToTarget("RemoteMineWepM")
goto ClassDeath
}
}

actor DeadBurnedPirateMan
{
Translation "56:56=85:85", "192:192=216:216", "198:198=239:239"
PROJECTILE
+NOGRAVITY
+THRUACTORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+NOEXPLODEFLOOR
+DONTBLAST
Gravity 1.0
height 8
radius 8
scale 2.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
TNT1 A 0 A_PlaySoundEx("weapon/ballonboo","Auto")
PIR2 ABCDABCDABCDABCDABCD 2
TNT1 A 0 A_ChangeFlag("NOGRAVITY",False)
Spawn2:
PIR2 EEFF 2 A_CheckFloor("Spawn3")
loop
Spawn3:
TNT1 A 0 A_PlaySoundEx("misc/quake","Body")
TNT1 A 0 A_PlaySoundEx("weapon/wallrush","Weapon")
PIR2 GGHHGGGGGG 2
TNT1 A 0 A_PlaySoundEx("mm7/dead","Auto")
TNT1 A 2 A_SpawnItemEX("CriticalDeathSpawner",0,0,0,0,0,0,0,SXF_TRANSFERTRANSLATION)
Stop
}
}

actor RemoteMineStock : Ammo
{
inventory.amount 1
inventory.maxamount 8
}

Actor RemoteMineBoss : VCBaseWeapon
{
weapon.ammotype "RemoteMineStock"
weapon.ammotype2 "BaseAltfireAmmo"
Weapon.AmmoUse 1
Obituary "$OB_PIRATEMAN1"
const int BBL_SPD = 25;
const int BBL_SPD_2 = 35;
const int HIT_OFS = 32;
States
{
Ready:
TNT1 A 0 A_JumpIfInventory("RemoteMineStock",8,1)
goto Ready2
PRMI A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,28)) TNT1 A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
PRMI A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,28)) TNT1 A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
PRMI A 0 A_GiveInventory("PirateAmmoHandler",1)
loop
Ready2: //Can altfire to detonate mines without enough ammo for the bubble -Fr3ak
PRMI A 1 A_WeaponReady TNT1 A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
PRMI A 1 A_WeaponReady TNT1 A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
PRMI A 0 A_GiveInventory("PirateAmmoHandler",1)
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
PRMI A 1 A_Lower
Loop
Select:
TNT1 A 0 ACS_ExecuteAlways(991,0,925)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
PRMI A 1 A_Raise
Loop

Fire:
PRMI A 0 A_JumpIfNoAmmo("DetonateMines")
PRMI A 1 Offset(18, 50) A_GiveInventory("PirateM1Handler",1)
PRMI A 1 Offset(27, 59) A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",4)==5,"MidDet")
PRMI A 1 Offset(33, 65) A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",4)==5,"MidDet")
PRMI AAAAAAAAAAAAAAAAAAAA 1 Offset(36, 68) A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",4)==5,"MidDet")
goto FireEnd
MidDet:
COMM B 0 A_PlaySoundEx("weapon/commandoswitch","Auto")
TNT1 A 0 A_GiveInventory("RemoteMineStock",1)//TNT1 A 0 A_GiveInventory("RemoteMineStock",8)
PRMI A 1 Offset(36, 68) A_GiveInventory("RemoteMineDetonate",1)
PRMI A 11 Offset(36, 68) //10 Offset(36, 68)
PRMI A 9 Offset(36, 68) A_TakeInventory("RemoteMineDetonate",9)//1 Offset(36, 68) A_TakeInventory("RemoteMineDetonate",9)
PRMI A 0 A_GiveInventory("TopPainFlag",1)
goto FireEnd
FireEnd:
PRMI A 1 Offset(33, 65)
PRMI A 1 Offset(27, 59)
PRMI A 1 Offset(18, 50)
PRMI A 0 A_WeaponReady(WRF_NOFIRE)
Goto Ready
DetonateMines:
TNT1 A 0 A_GunFlash
PRMI A 4 A_GiveInventory("RemoteMineDetonate",1)
PRMI A 1 Offset(0,42)
PRMI A 1 Offset(0,52)
PRMI A 2 Offset(0,62)
PRMI A 1 Offset(0,72)
DetonateMines2:
PRMI A 2 Offset(0,82)A_PlaySoundEx("weapon/PirateReloadStart","Body")
TNT1 A 0 A_JumpIfInventory("PirateBubbleUltActive",1,"DetonateContinue")
PRMI A 8 Offset(0,82)
DetonateContinue:
PRMI A 1 Offset(0,82)
PRMI A 4 Offset(0,82)
PRMI A 0 Offset(12,82)A_GiveInventory("RemoteMineStock",1)
PRMI A 0 A_PlaySoundEx("weapon/PirateReload","Body")
PRMI A 2
PRMI A 2 Offset(-12,82)
PRMI A 0 A_JumpIfInventory("RemoteMineStock",8,"DetonateEnd")
Goto DetonateContinue
DetonateEnd:
PRMI A 0 A_WeaponReady(WRF_NOFIRE)
PRMI A 2 Offset(0,82)
PRMI A 1 Offset(0,72)
PRMI A 1 Offset(0,62)
PRMI A 1 Offset(0,52)
PRMI A 1 Offset(0,42)
PRMI A 1 A_TakeInventory("RemoteMineDetonate",1)
TNT1 A 0 A_GunFlash("EndFlash")
Goto Ready

Altfire:
RATU A 0 A_JumpIfInventory("NoAltfire",1,"Ready")
TNT1 A 0 A_JumpIfInventory("RemoteMineStock",8,"PirateBubble")
TNT1 A 0 A_JumpIfInventory("TopPainFlag",1,"Ready")
Goto DetonateMines
PirateBubble:
TNT1 A 0 A_JumpIfInventory("PirateBubbleUltActive",1,"PirateBubbleUlt")
PRMI A 2 Offset(0,42) A_GiveInventory("PirateM2Handler",1)
PRMI A 2 Offset(0,52)
PRMI A 2 Offset(0,62)
PRMI A 2 Offset(0,72) A_GiveInventory("ToadChargeDamageGive")
BubbleReady:
PRMI A 1 Offset(0,82) A_GiveInventory("PirateManCharge",2)
PRMI A 0 A_JumpIfInventory("PirateManCharge",0,"BubbleReady2")
TNT1 A 0 A_JumpIfInventory("BasicArmor",1,1)
Goto PirateBubbleEnd
TNT1 A 0 A_Refire("BubbleReady")
TNT1 A 0 A_TakeInventory("PirateManCharge",999)
goto PirateBubbleEnd
BubbleReady2:
PRMI A 1 Offset(0,92)
TNT1 A 0 A_JumpIfInventory("BasicArmor",1,1)
Goto PirateBubbleEnd
TNT1 A 0 A_JumpIfInventory("PirateBubbleActive",1,1)
Goto PirateBubbleEnd
TNT1 A 0 A_Refire("BubbleReady2")
TNT1 A 0 A_TakeInventory("PirateManCharge",999)
goto PirateBubbleVertical
PirateBubbleVertical:
TOAD A 0 A_GiveInventory("ToadChargeDamageTake")
TNT1 A 0 A_JumpIfInventory("PirateBubbleUltActive",1,"PirateBubbleUlt") 
PRMI A 2 Offset(20,62)
TNT1 A 1 A_Stop
TNT1 A 0 A_GunFlash("BubbleDash")
TNT1 A 0 A_GiveInventory("IsSpinningBubble",1)
Goto PirateBubbleVerticalHold+1
PirateBubbleVerticalHold:
TNT1 A 0 A_SpawnItemEx("PirateBubbleDamager",0,0,32)
TNT1 A 1 A_ChangeVelocity(CallACS("VC_XYMob",BBL_SPD/2),0,cos(pitch)*BBL_SPD,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("PirateBubbleHitBox",0,0,HIT_OFS,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",2)>0,"PirateBubbleEnd") TNT1 A 0 A_CheckCeiling("PirateBubbleVerticalHold2") TNT1 A 0 A_JumpIfInventory("BaseAltfireAmmo",1,1) Goto PirateBubbleEnd TNT1 A 0 A_JumpIfInventory("BasicArmor",1,1) Goto PirateBubbleEnd
TNT1 A 0 A_SpawnItemEx("PirateBubbleDamager",0,0,32)
TNT1 A 1 A_ChangeVelocity(CallACS("VC_XYMob",BBL_SPD/2),0,cos(pitch)*BBL_SPD,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("PirateBubbleHitBox",0,0,HIT_OFS,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",2)>0,"PirateBubbleEnd") TNT1 A 0 A_CheckCeiling("PirateBubbleVerticalHold2") TNT1 A 0 A_JumpIfInventory("BaseAltfireAmmo",1,1) Goto PirateBubbleEnd TNT1 A 0 A_JumpIfInventory("BasicArmor",1,1) Goto PirateBubbleEnd
TNT1 A 0
Goto PirateBubbleVerticalHold+1
PirateBubbleVerticalHold2:
TNT1 A 0 A_SpawnItemEx("PirateBubbleDamager",0,0,-32)
TNT1 A 1 A_ChangeVelocity(CallACS("VC_XYMob",BBL_SPD/2),0,cos(pitch)*-BBL_SPD,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("PirateBubbleHitBox",0,0,-HIT_OFS,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",2)>0,"PirateBubbleEnd") TNT1 A 0 A_CheckFloor("PirateBubbleVerticalHold") TNT1 A 0 A_JumpIfInventory("BaseAltfireAmmo",1,1) Goto PirateBubbleEnd TNT1 A 0 A_JumpIfInventory("BasicArmor",1,1) Goto PirateBubbleEnd
TNT1 A 0 A_SpawnItemEx("PirateBubbleDamager",0,0,-32)
TNT1 A 1 A_ChangeVelocity(CallACS("VC_XYMob",BBL_SPD/2),0,cos(pitch)*-BBL_SPD,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("PirateBubbleHitBox",0,0,-HIT_OFS,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",2)>0,"PirateBubbleEnd") TNT1 A 0 A_CheckFloor("PirateBubbleVerticalHold") TNT1 A 0 A_JumpIfInventory("BaseAltfireAmmo",1,1) Goto PirateBubbleEnd TNT1 A 0 A_JumpIfInventory("BasicArmor",1,1) Goto PirateBubbleEnd
TNT1 A 0
Goto PirateBubbleVerticalHold2+1
PirateBubbleEnd:
TOAD A 0 A_GiveInventory("ToadChargeDamageTake")
TNT1 A 0 A_GunFlash("EndFlash")
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("PirateMiniBubbleFX",0,0,32,Random(-10,10),Random(-10,10),Random(-10,10))
TNT1 A 0 A_TakeInventory("PirateBubbleWaveBurnerChecker",1)
TNT1 A 0 A_TakeInventory("PirateBubbleSlowDown",1)
TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",112)
TNT1 A 0 A_PlaySoundEx("weapon/WaterShieldPop","Body")
TNT1 A 0 A_TakeInventory("PirateManCharge",999)
TNT1 A 0 A_GiveInventory("PirateBubbleEnd",1)
TNT1 A 2 ACS_NamedExecuteWithResult("VC_SetState",0)
TNT1 A 0 A_TakeInventory("CutterFlag",99)
TNT1 A 0 A_ScaleVelocity(0.25)
TNT1 A 0 A_ClearRefire
TNT1 A 0 A_TakeInventory("IsSpinningBubble",1)
PRMI A 2 Offset(20,62) A_TakeInventory("BasicArmor",100)
Goto Ready

UltimateAttack:
TNT1 A 0 ACS_NamedExecuteAlways("VC_UltimateText",0,78) TNT1 A 0 A_PlaySoundEx("classes/ultimateactivation","Auto")
TNT1 A 0 A_GiveInventory("PowerUltBuildCooldown",1) TNT1 A 0 A_TakeInventory("UltAttackFlag",1)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",True) TNT1 A 0 A_GiveInventory("InvProtection")
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",7)
PRMI A 2 Offset(20,62) A_GiveInventory("InvProtection") TNT1 A 0 A_ChangeFlag("INVULNERABLE",True)
PRMI B 2 Offset(17,80) A_GiveInventory("InvProtection") TNT1 A 0 A_ChangeFlag("INVULNERABLE",True)
TNT1 A 0 A_GunFlash("PirateUltBubble")
PRMI BCDBCD 2 Offset(0,32)
PRMI B 0 A_PlaySoundEx("weapon/piratefill","Body")
UltStartUp:
PRMI BCD 2 Offset(0,32)
TNT1 A 0 A_JumpIfInventory("MediumLongUltimateAmmo",1,"UltStartUp")
TNT1 A 0 A_GiveInventory("PirateUltHandler")
PRMI B 2 Offset(17,80) A_PlaySoundEx("weapon/piratefull","Body")
PRMI A 2 Offset(20,62) A_TakeInventory("UltAttackFlag",1)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",False) TNT1 A 0 A_TakeInventory("InvProtection")
TNT1 A 0 A_GunFlash("EndFlash")
Goto Ready
PirateBubbleUlt:
PRMI A 2 Offset(20,62)
TNT1 A 1 A_Stop
TNT1 A 0 A_GunFlash("BubbleDash")
TNT1 A 0 A_GiveInventory("IsSpinningBubble",1)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",True)
TNT1 A 0 A_GiveInventory("InvProtection")
TNT1 A 0 SetPlayerProperty(0,1,4)
PirateBubbleUltHold:
TNT1 A 0 A_SpawnItemEx("PirateMiniBubbleFX",0,random(-32,32),random(0,64)) TNT1 A 1 A_ChangeVelocity(cos(pitch)*BBL_SPD_2,0,-sin(pitch)*BBL_SPD_2,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("PirateBubbleHitBox2",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIfInventory("UltBubbleForceStop",1,"BounceBack") TNT1 A 0 A_JumpIfInventory("BaseAltfireAmmo",1,1) Goto EndUltBubble
TNT1 A 0 A_SpawnItemEx("PirateMiniBubbleFX",0,random(-32,32),random(0,64)) TNT1 A 0 A_SpawnItemEx("PirateBubbleHitBox2",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",4)==3,"PirateBubbleUltHold")
TNT1 A 0 A_SpawnItemEx("PirateMiniBubbleFX",0,random(-32,32),random(0,64)) TNT1 A 0 A_SpawnItemEx("PirateBubbleHitBox2",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",4)==5,"PirateBubbleUltHold")
Goto EndUltBubble
BounceBack:
TNT1 A 0 A_Stop
TNT1 A 0 A_PlaySoundEx("weapon/blizzardbowl","Weapon")
BLLD B 0 A_ChangeVelocity(-10,0,10,CVF_REPLACE|CVF_RELATIVE)
Goto EndUltBubble
EndUltBubble:
TNT1 A 0 SetPlayerProperty(0,0,4)
TNT1 A 0 A_GunFlash("EndFlash")
TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",112)
TNT1 A 0 A_PlaySoundEx("weapon/WaterShieldPop","Body")
TNT1 A 0 A_GiveInventory("PirateBubbleEnd",1)
TNT1 A 2 ACS_NamedExecuteWithResult("VC_SetState",0)
TNT1 A 0 A_ScaleVelocity(0.75)
TNT1 A 0 A_TakeInventory("IsSpinningBubble",1)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",False)
TNT1 A 1 A_TakeInventory("InvProtection")
PRMI AA 1 Offset(-20,62) A_TakeInventory("UltBubbleForceStop",1)
Goto Ready
Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"EndFlash") TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",1)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"EndFlash") TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",1)
loop
BubbleDash:
TNT1 A 0 A_PlaySoundEx("weapon/kingaxespin","Weapon")
TNT1 A 0 A_JumpIf(Health>0,1) Goto EndFlash TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",2) TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",1)
TNT1 A 0 A_JumpIf(Health>0,1) Goto EndFlash TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",2) TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",1)
TNT1 A 0 A_JumpIf(Health>0,1) Goto EndFlash TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",3) TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",1)
TNT1 A 0 A_JumpIf(Health>0,1) Goto EndFlash TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",3) TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",1)
TNT1 A 0 A_JumpIf(Health>0,1) Goto EndFlash TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",4) TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",1)
TNT1 A 0 A_JumpIf(Health>0,1) Goto EndFlash TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",4) TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",1)
loop
PirateUltBubble:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"EndFlash") TNT1 A 1 A_stop TNT1 A 0 A_TakeInventory("MediumLongUltimateAmmo",6) TNT1 A 0 A_SpawnItemEx("PirateHoseFX",0,0,96,0,0,30) TNT1 A 0 A_PlaySoundEx("weapon/WaterSpray","Weapon")
TNT1 A 0 A_JumpIfInventory("IsDead",1,"EndFlash") TNT1 A 1 A_stop TNT1 A 0 A_TakeInventory("MediumLongUltimateAmmo",6) TNT1 A 0 A_SpawnItemEx("PirateHoseFX",0,0,96,0,0,30)
loop
EndFlash:
TNT1 A 0 A_TakeInventory("PirateBubbleActive")
TNT1 A 1 ACS_NamedExecuteWithResult("VC_SetState",0)
stop
}
}

Actor RemoteMineRM1
{
PROJECTILE
+DONTREFLECT
+SKYEXPLODE
Species "RemoteMineRM"
+THRUSPECIES
+HITTRACER
+DONTREFLECT
Damagetype "PirateManMineDirect1"
Obituary "$OB_PIRATEMAN1"
Damage (0)
Radius 14
Height 14
Speed 60
Scale 2.5
reactiontime 5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode", 1)
RPMI A 0 A_GiveInventory("WeaponCharge",1) //To fix firing in corners. -Fr3ak
Spawn2:
RPMI AABB 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")//A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0,"XDeath")
RPMI A 0 A_Countdown
RPMI AABB 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")//A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0,"XDeath")
RPMI A 0 A_Countdown
RPMI AA 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")//A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0,"XDeath")
RPMI A 0 A_Countdown
Spawn3:
RPMI B 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0,"XDeath")
RPMI B 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI B 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0,"XDeath")
RPMI B 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0,"XDeath")
RPMI A 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0,"XDeath")
RPMI A 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI A 0 A_Countdown
loop
Crash:
XDeath:
TNT1 A 0 A_JumpIfInventory("KazoickID",1,"Nope",AAPTR_TRACER)
TNT1 A 0 A_ChangeFlag("NOINTERACTION",1)
RPMI A 0 A_GiveToTarget("RemoteMineStock",1)
RPMI A 0 A_PlaySoundEx("weapon/rmineexplode","Weapon")
RPMI A 0 A_SpawnItemEx("RemoteMineRMExplosionFX",0,0,0,0,0,0,0,1)
TNT1 AAAAAAAAAAAAAA 2 A_Explode(20,64,0,0,48)
Stop
Death:
RPMI A 0 A_JumpIfInventory("WeaponCharge",1,"Death2")
goto Death2
Death2:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("StickedRemoteMineRM",0,0,0,0,0,0,0,1)
TNT1 A 2 A_PlaySoundEx("weapon/rminestick","Weapon")
stop
Nope://.Flyboy:
TNT1 A 0 A_RadiusGive("YesIAmRemoteMineBruh",112,RGF_OBJECTS,1)
TNT1 A 2 A_Explode(20,64,0,0,48)

stop
}
}

actor RemoteMineRM2 : RemoteMineRM1
{
Damagetype "PirateManMineDirect2"
States
{
Death2:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("StickedRemoteMineRM2",0,0,0,0,0,0,0,1)
TNT1 A 2 A_PlaySoundEx("weapon/rminestick","Weapon")
stop
}
}

actor RemoteMineRM3 : RemoteMineRM1
{
Damagetype "PirateManMineDirect3"
States
{
Death2:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("StickedRemoteMineRM3",0,0,0,0,0,0,0,1)
TNT1 A 2 A_PlaySoundEx("weapon/rminestick","Weapon")
stop
}
}

actor RemoteMineRM4 : RemoteMineRM1
{
Damagetype "PirateManMineDirect4"
States
{
Death2:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("StickedRemoteMineRM4",0,0,0,0,0,0,0,1)
TNT1 A 2 A_PlaySoundEx("weapon/rminestick","Weapon")
stop
}
}

actor RemoteMineRM5 : RemoteMineRM1
{
Damagetype "PirateManMineDirect5"
States
{
Death2:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("StickedRemoteMineRM5",0,0,0,0,0,0,0,1)
TNT1 A 2 A_PlaySoundEx("weapon/rminestick","Weapon")
stop
}
}

actor RemoteMineRM6 : RemoteMineRM1
{
Damagetype "PirateManMineDirect6"
States
{
Death2:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("StickedRemoteMineRM6",0,0,0,0,0,0,0,1)
TNT1 A 2 A_PlaySoundEx("weapon/rminestick","Weapon")
stop
}
}

actor RemoteMineRM7 : RemoteMineRM1
{
Damagetype "PirateManMineDirect7"
States
{
Death2:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("StickedRemoteMineRM7",0,0,0,0,0,0,0,1)
TNT1 A 2 A_PlaySoundEx("weapon/rminestick","Weapon")
stop
}
}

actor RemoteMineRM8 : RemoteMineRM1
{
Damagetype "PirateManMineDirect8"
States
{
Death2:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("StickedRemoteMineRM8",0,0,0,0,0,0,0,1)
TNT1 A 2 A_PlaySoundEx("weapon/rminestick","Weapon")
stop
}
}

Actor StickedRemoteMineRM : RemoteMineRM1
{
+THRUACTORS
+DONTBLAST
damagetype "PirateManMine1"
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode", 1)
Spawn2:
RPMI A 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI A 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI A 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI E 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI E 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI E 1 A_JumpIfInTargetInventory("RemoteMineDetonate",1,"Death")
RPMI E 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0,"Death")
loop
Crash:
XDeath:
RPMI A 0 A_GiveToTarget("RemoteMineStock",1)
goto Death
Death:
TNT1 A 0 A_ChangeFlag("NOINTERACTION",1)
RPMI A 0 A_PlaySoundEx("weapon/pirateexplode","Weapon")
RPMI A 0 A_SpawnItemEx("RemoteMineRMExplosionFX2",0,0,0,0,0,0,0,1)
TNT1 AAAAAAAAAAAAAAAAAAAA 2 A_Explode(22,64,0,0,48)
Stop
}
}
actor StickedRemoteMineRM2 : StickedRemoteMineRM {damagetype "PirateManMine2"}
actor StickedRemoteMineRM3 : StickedRemoteMineRM {damagetype "PirateManMine3"}
actor StickedRemoteMineRM4 : StickedRemoteMineRM {damagetype "PirateManMine4"}
actor StickedRemoteMineRM5 : StickedRemoteMineRM {damagetype "PirateManMine5"}
actor StickedRemoteMineRM6 : StickedRemoteMineRM {damagetype "PirateManMine6"}
actor StickedRemoteMineRM7 : StickedRemoteMineRM {damagetype "PirateManMine7"}
actor StickedRemoteMineRM8 : StickedRemoteMineRM {damagetype "PirateManMine8"}

actor PirateMineProtect1 : PowerProtection {powerup.duration 42 damagefactor "PirateManMine1", 0.0}
actor PirateMineProtect2 : PowerProtection {powerup.duration 42 damagefactor "PirateManMine2", 0.0}
actor PirateMineProtect3 : PowerProtection {powerup.duration 42 damagefactor "PirateManMine3", 0.0}
actor PirateMineProtect4 : PowerProtection {powerup.duration 42 damagefactor "PirateManMine4", 0.0}
actor PirateMineProtect5 : PowerProtection {powerup.duration 42 damagefactor "PirateManMine5", 0.0}
actor PirateMineProtect6 : PowerProtection {powerup.duration 42 damagefactor "PirateManMine6", 0.0}
actor PirateMineProtect7 : PowerProtection {powerup.duration 42 damagefactor "PirateManMine7", 0.0}
actor PirateMineProtect8 : PowerProtection {powerup.duration 42 damagefactor "PirateManMine8", 0.0}

//oh lord -gibus
actor PirateMineDirectProtect1 : PowerProtection {powerup.duration 42 damagefactor "PirateManMineDirect1", 0.0}
actor PirateMineDirectProtect2 : PowerProtection {powerup.duration 42 damagefactor "PirateManMineDirect2", 0.0}
actor PirateMineDirectProtect3 : PowerProtection {powerup.duration 42 damagefactor "PirateManMineDirect3", 0.0}
actor PirateMineDirectProtect4 : PowerProtection {powerup.duration 42 damagefactor "PirateManMineDirect4", 0.0}
actor PirateMineDirectProtect5 : PowerProtection {powerup.duration 42 damagefactor "PirateManMineDirect5", 0.0}
actor PirateMineDirectProtect6 : PowerProtection {powerup.duration 42 damagefactor "PirateManMineDirect6", 0.0}
actor PirateMineDirectProtect7 : PowerProtection {powerup.duration 42 damagefactor "PirateManMineDirect7", 0.0}
actor PirateMineDirectProtect8 : PowerProtection {powerup.duration 42 damagefactor "PirateManMineDirect8", 0.0}

Actor RemoteMineRMExplosionFX : BasicClientSide
{
scale 3.0
States
{
Spawn:
TNT1 A 0
PRBU A 1
TNT1 A 1
TNT1 A 0 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_JumpIfInventory("CutterFlag",22,1)
loop
PRBU O 1
TNT1 A 1
PRBU O 1
Stop
}
}

Actor RemoteMineRMExplosionFX2 : RemoteMineRMExplosionFX
{
scale 4.0
States
{
Spawn:
TNT1 A 0
PRBU ABACADAEAFAGAHAIAJAKALAMABACADAFAGAHANAPOPO 1
Stop
}
}

actor PirateBubbleVisual
{
Height 0
Radius 0
scale 3.0
+NOCLIP
-SOLID
+NOGRAVITY
+NOINTERACTION
+CLIENTSIDEONLY
+DONTREFLECT
+MISSILE
States
{
Spawn:
TNT1 A 0
Spawn2:
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 B 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 B 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 B 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 B 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 C 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 C 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 C 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Death")
PRB2 C 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
loop
Death:
TNT1 A 0 A_TakeFromTarget("PirateBubbleActive")
stop
}
}

actor PirateBubbleProtect : PowerProtection
{
powerup.duration 12
damagefactor "PirateManBubble", 0.0
damagefactor "PirateManBubbleUlt", 0.0
}

actor PirateBubbleHitBox
{
PROJECTILE
+SKYEXPLODE
+DONTBLAST
+DONTREFLECT
-NOBLOCKMAP
+NOEXPLODEFLOOR
Damagetype "PirateManBubble"
Obituary "$OB_PIRATEMAN2"
+THRUGHOST
damage (24)
Radius 24
Height 24
Speed 0
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
Death:
XDeath:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("BubbleBounceBuffer",1,"End")
TNT1 A 0 A_JumpIfInTargetInventory("BubbleDirectionChange",1,"Take")
TNT1 A 0 A_PlaySoundEx("misc/splash","Auto")
TNT1 A 0 A_GiveToTarget("BubbleDirectionChange",1)
TNT1 A 0 A_GiveToTarget("BubbleBounceBuffer",1)
End:
TNT1 A 1
stop
Take:
TNT1 A 0 A_PlaySoundEx("misc/splash","Auto")
TNT1 A 0 A_TakeFromTarget("BubbleDirectionChange",1)
TNT1 A 0 A_GiveToTarget("BubbleBounceBuffer",1)
TNT1 A 1
stop
}
}

actor PirateBubbleDamager : BasicExplosion
{
Damagetype "PirateManBubble"
Obituary "$OB_PIRATEMAN2"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(35,80,0,0,80)
stop
}
}

actor PirateBubbleHitBox2 : PirateBubbleHitBox
{
Damagetype "PirateManBubbleUlt"
Obituary "$OB_PIRATEMAN3"
Radius 48
Height 48
damage (40)
Speed 12
states
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
Death:
XDeath:
TNT1 A 0 A_GiveToTarget("UltBubbleForceStop",1)
stop
}
}

actor PirateBubbleFlinger
{
//+SERVERSIDEONLY
PROJECTILE
+NOINTERACTION
+NOCLIP
+DONTBLAST
damage 0
radius 1
height 1
speed 0
var int user_force;
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("CannotBeMoved",1,"Death")
TNT1 A 0 A_SetUserVar("user_force",-25)
Spawn2:
TNT1 A 0 A_TransferPointer(AAPTR_TARGET,AAPTR_DEFAULT,AAPTR_TARGET,AAPTR_TRACER) //target's target to self's tracer
TNT1 A 0 A_FaceTracer
TNT1 A 0 ThrustThing(angle*256/360,user_force,1,ACS_ExecuteWithResult(257,0))
stop
Death:
TNT1 A 0
stop
}
}

actor PirateBubbleSlowDown : PowerSpeed
{
+POWERSPEED.NOTRAIL
powerup.duration -999
Speed 0.50
}

actor PirateBubbleHealth : BasicArmorPickup
{
  armor.saveamount 100
  armor.savepercent 90
}

actor PirateBubbleHealth2 : BasicArmorPickup
{
  armor.saveamount 100
  armor.savepercent 75
}

actor PirateMiniBubbleFX : BasicClientSide
{
Translation "192:192=236:236", "198:198=194:194"
Scale 2.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode", 1)
TNT1 A 2
PRB2 JKL 3
PRB2 JJJKKKLLL 1 A_FadeOut(0.1)
stop
}
}

actor PirateHoseFX : BasicClientSide
{
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
MWSX MMNNOOMMNNOOMM 1 ThrustThingZ(0,22,1,1)
stop
}
}

actor PirateUltHandler : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("PirateTeamBubbleCheck",1)
TNT1 A 0 A_PlaySoundEx("weapon/PirateBubble","Body") 
TNT1 A 0 A_GiveInventory("PirateBubbleHealth2",1)
TNT1 A 0 A_JumpIfInventory("PirateBubbleUltActive",1,"Nope") //Prevents lag from multiple bubbles on same user.
TNT1 A 0 A_GiveInventory("PirateUltBubbleVision",1)
TNT1 A 0 A_SpawnItemEx("UltBubbleHPWatcherWatcher")
TNT1 A 0 A_SpawnItemEx("PirateUltBubbleWatcher")
Nope:
TNT1 A 0
stop
}
}

actor PirateTeamBubbleCheck : CustomInventory
{
const int RANGE = 250;
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("LightTeamFlag",1,"L")
TNT1 A 0 A_JumpIfInventory("WilyTeamFlag",1,"W")
TNT1 A 0 A_JumpIfInventory("CossackTeamFlag",1,"C")
TNT1 A 0 A_JumpIfInventory("KingTeamFlag",1,"K")
goto X

L:
TNT1 A 0 A_RadiusGive("PirateBubbleItemL",RANGE,RGF_PLAYERS|RGF_MONSTERS,1)
stop

W:
TNT1 A 0 A_RadiusGive("PirateBubbleItemW",RANGE,RGF_PLAYERS|RGF_MONSTERS,1)
stop

C:
TNT1 A 0 A_RadiusGive("PirateBubbleItemC",RANGE,RGF_PLAYERS|RGF_MONSTERS,1)
stop

K:
TNT1 A 0 A_RadiusGive("PirateBubbleItemK",RANGE,RGF_PLAYERS|RGF_MONSTERS,1)
stop
}
}

actor PirateBubbleItemL : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("LightTeamFlag",1,"Next")
stop

Next:
TNT1 A 0 A_PlaySoundEx("weapon/PirateBubble","Body") 
TNT1 A 0 A_GiveInventory("PirateBubbleHealth2",1)
TNT1 A 0 A_JumpIfInventory("PirateBubbleUltActive",1,"Nope")
TNT1 A 0 A_GiveInventory("PirateUltBubbleVision",1)
TNT1 A 0 A_SpawnItemEx("UltBubbleHPWatcherWatcher") 
TNT1 A 0 A_SpawnItemEx("PirateUltBubbleWatcher")
Nope:
TNT1 A 0
stop
}
}

actor PirateBubbleItemW : PirateBubbleItemL
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("WilyTeamFlag",1,"Next")
stop
}
}

actor PirateBubbleItemC : PirateBubbleItemL
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("CossackTeamFlag",1,"Next")
stop
}
}

actor PirateBubbleItemK : PirateBubbleItemL
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("KingTeamFlag",1,"Next")
stop
}
}

actor BubbleWaterPropertiesGive : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Setgravity(0.5)
stop
}
}

actor BubbleWaterPropertiesTake : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Setgravity(0.8)
stop
}
}

actor BubbleWaterResetProperties : CustomInventory
{
States
{
Pickup:
TNT1 A 0 SetPlayerProperty(0,0,3)
TNT1 A 0 A_TakeInventory("PirateBubbleUltActive",1)
TNT1 A 0 A_TakeInventory("PirateUltBubbleVision",1)
TNT1 A 0 A_GiveInventory("GravityRestore",1)
stop
}
}

actor PirateManCoolDownCheck : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("RemoteMineBoss",1,"PickUp2")
stop
PickUp2:
TNT1 A 0 A_GiveInventory("PirateUltCooldown",1)
stop
}
}

actor PirateUltCooldown : UltBuildCooldownGiver
{
Powerup.Duration 10
}

actor BubbleSwimChecker : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("IsUnderWater",1,"CanSwim")
Goto NoSwim
CanSwim:
TNT1 A 0 SetPlayerProperty(0,1,3)
Goto End
NoSwim:
TNT1 A 0 SetPlayerProperty(0,0,3)
Goto End
End:
TNT1 A 1
stop
}
}

actor PirateUltBubbleTrigger : Powerup
{
    powerup.duration 8
}

actor PirateUltBubbleWatcher
{
Height 0
Radius 0
+NOINTERACTION
-SOLID
+NOGRAVITY
+DONTREFLECT
+MISSILE
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("PirateBubbleUltActive",1)
TNT1 A 0 A_SetTranslucent(0.5,0)
Spawn2:
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 D 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 D 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 D 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 D 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 E 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 E 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 E 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 E 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 D 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 D 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 D 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 D 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 F 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 F 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 F 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1) TNT1 A 0 A_JumpIfInTargetInventory("IsSpinningBubble",1,"Spawn3")
PRB2 F 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION) 
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1) TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1) TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIfInTargetInventory("PirateUltBubbleTrigger",1,"Death") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
loop
Spawn3:
TNT1 A 0 A_GiveToTarget("PirateBubbleWaveBurnerChecker",1)
TNT1 A 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_GiveToTarget("BubbleWaterPropertiesGive",1)
TNT1 A 0 A_GiveToTarget("PirateManCoolDownCheck",1)
TNT1 A 0 A_GiveToTarget("BubbleSwimChecker",1)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleUltActive",1,"Spawn2")
//TNT1 A 0 A_JumpIfInTargetInventory("PirateBubbleEnd",1,"Death")
loop
Death:
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("PirateMiniBubbleFX",0,0,32,Random(-10,10),Random(-10,10),Random(-10,10))
TNT1 A 0 A_GiveToTarget("BubbleWaterResetProperties",1)
TNT1 A 0 A_TakeFromTarget("PirateBubbleWaveBurnerChecker")
stop
}
}

actor UltBubbleHPWatcherWatcher
{
Height 0
Radius 0
+NOINTERACTION
-SOLID
+NOGRAVITY
+MISSILE
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("BasicArmor",1,"Spawn")
TNT1 A 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("BasicArmor",1,"Spawn")
TNT1 A 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_JumpIfInTargetInventory("BasicArmor",1,"Spawn")
Death:
TNT1 A 0 A_GiveToTarget("PirateBubbleEnd",1)
TNT1 A 0 A_GiveToTarget("PirateUltBubbleTrigger",1)
TNT1 AA 1 A_TakeFromTarget("PirateBubbleUltActive",1)
stop
}
}

actor PirateManWallRush_CI : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("NewWallSlam",1,"PickupNo")
TNT1 A 0 A_GiveInventory("NoNewWallSlam",1)
TNT1 A 0 A_GiveInventory("NewWallSlam",1)
TNT1 A 0 A_GiveInventory("WallSlamRealTimer",1)
TNT1 A 0 A_SpawnItemEX("PirateManWallRushChecker")
stop
PickupNo:
TNT1 A 0
stop
}
}

actor PirateManWallRushChecker : BaseWallRushChecker
{
Obituary "$OB_PIRATEMAN4"
states
{
DeathCheck:
TNT1 A 0 //A_JumpIfInventory("NewWallSlam",1,"Death",AAPTR_TRACER)
TNT1 A 0 A_SpawnItemEx("RaThorWallBonk")
TNT1 A 0 A_GiveInventory("WallSlamTimer",1)
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("PirateSlamRocks",random(-8,8),random(-8,8),random(-8,8),random(-8,8),random(-8,8),random(-8,8))
TNT1 A 0 A_Quake(3,10,0,256)
TNT1 A 0 A_PlaySoundEx("misc/quake","Body")
TNT1 A 0 A_PlaySoundEx("weapon/wallrush","Weapon")
TNT1 A 0 A_Warp(AAPTR_TRACER,0,0,CallACS("TracerHeightGet")/2,0,0)
TNT1 A 0 A_Explode(13,12,0,0,12)
TNT1 A 35
Death:
TNT1 A 2 A_GiveInventory("TempPitProtectEnd_P",1,AAPTR_TRACER)
stop
}
}

actor PirateSlamRocks : ThorSlamRocks
{
translation "208:208=226:226", "46:46=223:223"
}

actor PirateUltBubbleVision : PowerUp
{
	powerup.color "Blue", 0.2
	powerup.duration -999
}

actor BubbleBounceBuffer : Powerup
{
powerup.duration 5
}

actor RemoteMineDetonate : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor PirateBubbleActive : RemoteMineDetonate {}
actor PirateBubbleUltActive : RemoteMineDetonate {}
actor IsSpinningBubble : RemoteMineDetonate {}
actor BubbleDirectionChange : RemoteMineDetonate {}
actor BubbleDirectionChangeUp : RemoteMineDetonate {}
actor BubbleDirectionChangeDown : RemoteMineDetonate {}
actor UltBubbleForceStop : RemoteMineDetonate {}

actor PirateAmmoHandler : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PirateBubbleUltActive",1,"Pickup2")
TNT1 A 0 A_GiveInventory("BaseAltfireAmmo",1)
stop

Pickup2:
TNT1 A 0 A_GiveInventory("BaseAltfireAmmo",2)
stop
}
}

actor PirateM1Handler : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/hshbreath","Auto")
TNT1 A 0 A_GiveInventory("VC_Timer",1)
TNT1 A 0 A_JumpIfInventory("VC_Timer",7,"Pickup8")
TNT1 A 0 A_JumpIfInventory("VC_Timer",6,"Pickup7")
TNT1 A 0 A_JumpIfInventory("VC_Timer",5,"Pickup6")
TNT1 A 0 A_JumpIfInventory("VC_Timer",4,"Pickup5")
TNT1 A 0 A_JumpIfInventory("VC_Timer",3,"Pickup4")
TNT1 A 0 A_JumpIfInventory("VC_Timer",2,"Pickup3")
TNT1 A 0 A_JumpIfInventory("VC_Timer",1,"Pickup2")
TNT1 A 0 A_FireCustomMissile("RemoteMineRM1",0,1,8,0)
stop

Pickup2:
TNT1 A 0 A_FireCustomMissile("RemoteMineRM2",0,1,8,0)
stop

Pickup3:
TNT1 A 0 A_FireCustomMissile("RemoteMineRM3",0,1,8,0)
stop

Pickup4:
TNT1 A 0 A_FireCustomMissile("RemoteMineRM4",0,1,8,0)
stop

Pickup5:
TNT1 A 0 A_FireCustomMissile("RemoteMineRM5",0,1,8,0)
stop

Pickup6:
TNT1 A 0 A_FireCustomMissile("RemoteMineRM6",0,1,8,0)
stop

Pickup7:
TNT1 A 0 A_FireCustomMissile("RemoteMineRM7",0,1,8,0)
stop

Pickup8:
TNT1 A 0 A_FireCustomMissile("RemoteMineRM8",0,1,8,0)
TNT1 A 0 A_TakeInventory("VC_Timer",9)
stop
}
}

actor PirateM2Handler : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/PirateBubble","Body")
TNT1 A 0 A_SpawnItemEx("PirateBubbleVisual")
TNT1 A 0 A_GiveInventory("PirateBubbleSlowDown",1)
TNT1 A 0 A_GiveInventory("PirateBubbleActive",1)
TNT1 A 0 A_GiveInventory("PirateBubbleHealth",100)
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",5)
TNT1 A 0 A_GiveInventory("PirateBubbleWaveBurnerChecker",1)
stop
}
}

actor PirateBubbleEnd : Powerup
{
powerup.duration 5
}

actor PirateManCharge : Inventory
{
	inventory.amount 1
	inventory.maxamount 52
}

actor PirateBubbleWaveBurnerChecker : VCOnce {}

Actor PiratemanAntiJuggle : PowerSpeed
{
	Powerup.Duration 20
	Speed 1.6
	+POWERSPEED.NOTRAIL
}