actor Aquaman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_8H"
dropitem "WaterBalloonWep"
Weapon.AmmoUse 1
Weapon.AmmoGive 28
Obituary "$OB_WATERBALLOON"
Inventory.Pickupmessage "I've been waiting for you!"
weapon.ammotype "HandsomeGuyAmmo"
weapon.ammotype2 "WaitingForYouAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_08 H 1
loop

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

Ready:
AQAQ A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_AQUAMAN)
AQAQ FEDCB 2
AQAQ A 0 A_SpawnItemEX("AquamanRainbowFX")
goto Ready1
Ready1:
AQAQ A 10 A_WeaponReady
wait

Fire:
AQAQ C 0 A_JumpIfInventory("IsBot",1,"BotFire")
AQAQ C 0 A_JumpIfInventory("WaitingForYouAmmo",20,"FireCannon")
AQAQ C 0 A_PlaySoundEx("weapon/waterballoon","Weapon")
AQAQ C 0 A_JumpIfInventory("HandsomeGuyAmmo",22,"Fire4")
AQAQ C 0 A_JumpIfInventory("HandsomeGuyAmmo",15,"Fire3")
AQAQ C 0 A_JumpIfInventory("HandsomeGuyAmmo",8,"Fire2")
AQAQ C 0 A_JumpIfInventory("HandsomeGuyAmmo",1,"Fire1")
AQAQ C 0
goto Fire0
FireEnd:

AQAQ C 2 Offset(-20,12)
AQAQ D 2 Offset(-12,20)
AQAQ E 2 Offset(4,36)
AQAQ F 2 Offset(8,40)

//AQAQ A 2 Offset(-16,20)
//AQAQ A 2 Offset(-24,8)
//AQAQ A 4 A_WeaponReady(14)
Goto Ready1

Fire4:
AQAQ C 0 A_FireCustomMissile("WaterBalloonBoss4",random(-2,2),1,8,0)
Goto FireEnd

Fire3:
AQAQ C 0 A_FireCustomMissile("WaterBalloonBoss3",random(-2,2),1,8,0)
Goto FireEnd

Fire2:
AQAQ C 0 A_FireCustomMissile("WaterBalloonBoss2",random(-2,2),1,8,0)
Goto FireEnd

Fire1:
AQAQ C 0 A_FireCustomMissile("WaterBalloonBoss1",random(-2,2),1,8,0)
Goto FireEnd

Fire0:
AQAQ C 0 A_FireCustomMissile("WaterBalloonBoss0",random(-2,2),1,8,0)
AQAQ C 2 Offset(-20,12)
AQAQ D 2 Offset(-12,20)
AQAQ E 2 Offset(4,36)
AQAQ F 2 Offset(8,40)
AQAQ A 4 A_WeaponReady(14)
Goto Ready1

FireCannonX:
goto Fire+2
FireCannon:
AQAQ A 0 A_GunFlash("Flash.WaterCannon",1)
AQAQ A 0 A_JumpIfInventory("WaterCannonFlag",1,"FireCannonX")

AQAQ A 0 A_GiveInventory("WaterCannonFlag",1)
AQAQ A 0 A_GiveInventory("WaterCannonFlag2",1)
AQAQ A 0 A_GiveInventory("WaterCannonFlag3",1)
AQAQ A 0 A_PlaySoundEx("weapon/WaterCannonFire","Weapon")
AQAQ A 0 A_TakeInventory("AquaKillFlag",9)
AQAQ A 0 A_TakeInventory("WaitingForYouAmmo",56)
AQAQ A 0 A_TakeInventory("HandsomeGuyAmmo",20)
AQAQ A 0 A_FireCustomMissile("WaterCannonSpawner",0,1,8,0)

//AQAQ A 2 Offset(-16,20)//I
//AQAQ A 2 Offset(-24,8)//J
AQAQ B 2 Offset(-20,12)//K
AQAQ C 2 Offset(-20,12)//L
AQAQ D 2 Offset(-12,20)//M
AQAQ E 2 Offset(4,36)//N
AQAQ F 2 Offset(8,40)//O
AQAQ A 2 Offset(4,36)

AQAQ A 16 A_WeaponReady(14)
goto Ready1


AltFire:
AQAQ D 0 A_JumpIfInventory("HandsomeGuyAmmo",28,"AltCannon")
goto AltChargeS
AltChargeS:
AQAQ D 0 A_TakeInventory("AquamanChargeSound_F",999)
AQAQ D 0 A_PlaySound("weapon/AquaCharge2",1,1.0)
AltCharge:
AQAQ D 0 A_GiveInventory("HandsomeGuyAmmo",2)
AQAQ D 0 A_GiveInventory("AquamanChargeSound_F",1)
AQAQ D 2 Offset(-8,24)
AQAQ C 2 Offset(-16,16)
AQAQ B 1 Offset(-16,16)
AQAQ B 0 A_ReFire(1)
goto AltWait
AQAQ D 0 A_JumpIfInventory("HandsomeGuyAmmo",28,"AltCannonWait")
AQAQ D 0 A_JumpIfInventory("AquamanChargeSound_F",7,"AltChargeS")
goto AltCharge

AltWait:
AQAQ B 0 A_StopSound(1)
AQAQ BB 2 Offset(-8,24)A_ReFire//10
goto Ready1
AltStall:
AQAQ B 0 A_JumpIfInventory("IsBot",1,"Ready1")
AQAQ B 1 Offset(-8,24)
AQAQ B 0 A_ReFire("AltStall")
goto Ready1
AltCannonWait:
AQAQ B 0 A_StopSound(1)
AQAQ B 2 Offset(-8,24)A_JumpIfInventory("IsBot",1,"BotAltCannonWait")
AQAQ B 8 Offset(-8,24)
AQAQ B 0 A_ReFire("AltCannon")
goto Ready1

AltCannon:
AQAQ A 0 A_JumpIfInventory("WaitingForYouAmmo",20,"AltPillar")
AQAQ A 0 A_JumpIfInventory("WaitingForYouAmmo",1,"NoCannon")
AQAQ B 0 A_JumpIfInventory("WaterCannonFlag4",1,"NoCannon")
AQAQ B 0 A_JumpIfInventory("WaterCannonFlag",1,"NoCannon")
AQAQ B 0 A_GunFlash("NoFlash",1)
AQAQ B 0 A_PlaySoundEx("weapon/AquaCharge","Weapon")
AltCannonH:
AQAQ C 0 A_JumpIfInventory("WaterCannonFlag4",1,"NoCannon")
AQAQ C 0 A_JumpIfInventory("WaterCannonFlag",1,"NoCannon")
AQAQ C 0
AQAQ C 2 Offset(-8,24)A_GiveInventory("WaitingForYouAmmo",1)
AQAQ B 2 Offset(-8,24)A_GiveInventory("WaitingForYouAmmo",1)
AQAQ A 0 A_JumpIfInventory("WaitingForYouAmmo",20,"AltStall")
AQAQ B 0 A_ReFire("AltCannonH")
AQAQ A 0 A_JumpIfInventory("WaitingForYouAmmo",10,"AltRainbow")
CannonDrain:
AQAQ B 0 A_StopSound(1)
AQAQ B 1 Offset(-8,24)A_GunFlash("Flash.DrainCannon",1)//A_TakeInventory("WaitingForYouAmmo",1)
AQAQ B 0 //A_JumpIfInventory("WaitingForYouAmmo",1,"CannonDrain")
AQAQ B 0 A_ClearRefire
goto Ready1
AltRainbow:
AQAQ A 0 A_SpawnItemEX("AquamanRainbowFX")
goto CannonDrain

AltPillar:
AQAQ A 0 A_PlaySoundEx("weapon/WaterCannonFire","Weapon")
AQAQ A 0 A_TakeInventory("AquaKillFlag",9)
AQAQ A 0 A_TakeInventory("WaitingForYouAmmo",56)
AQAQ A 0 A_TakeInventory("HandsomeGuyAmmo",14)
AQAQ A 0 A_GiveInventory("WaterCannonFlag4",1)
AQAQ A 0 A_FireCustomMissile("AquaWaterTowerSpawner",0,1,0,0)

AQAQ B 2 Offset(-20,12)
AQAQ C 2 Offset(-20,12)
AQAQ D 2 Offset(-12,20)
AQAQ E 2 Offset(4,36)
AQAQ F 2 Offset(8,40)
AQAQ A 2 Offset(4,36)

AQAQ A 16 A_WeaponReady(14)
goto Ready1
NoCannon:
AQAQ A 1 A_WeaponReady(14)
AQAQ A 0 A_ClearRefire
Goto Ready1


Flash.DrainCannon:
TNT1 A 0
TNT1 A 2 A_TakeInventory("WaitingForYouAmmo",1)
TNT1 A 0 A_JumpIfInventory("WaitingForYouAmmo",1,"Flash.DrainCannon")
stop

Flash.WaterCannon:
TNT1 A 1
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("WaterCannonFlag",1,1)
goto Flash.WaterCannon+4
TNT1 A 0 A_JumpIfInventory("WaterCannonFlag2",1,"Flash.WaterCannon")
TNT1 A 0 A_TakeInventory("WaterCannonFlag",1)
TNT1 A 0 A_TakeInventory("WaterCannonFlag2",1)
TNT1 A 0 A_TakeInventory("WaterCannonFlag3",1)
TNT1 A 0 A_GiveInventory("AquaKillFlag",1)
stop

BotFire:
AQAQ A 0 A_JumpIfInventory("WaitingForYouAmmo",20,"BotFireA")
AQAQ A 0 A_JumpIfNoAmmo(5)
AQAQ A 0 A_JumpIfInventory("HandsomeGuyAmmo",22,5)
AQAQ A 0 A_JumpIfInventory("HandsomeGuyAmmo",15,5)
AQAQ A 0 A_JumpIfInventory("HandsomeGuyAmmo",8,5)
AQAQ A 0 A_Jump(32,"Altfire")
goto Fire+1
AQAQ A 0 A_Jump(64,"Altfire")
goto Fire+1
AQAQ A 0 A_Jump(8,"Altfire")
goto Fire+1
AQAQ A 0 A_Jump(16,"Altfire")
goto Fire+1
AQAQ A 0 A_Jump(24,"Altfire")
goto Fire+1
BotFireA:
AQAQ A 0 A_Jump(48,"AltPillar")
goto FireCannon
BotAltCannonWait:
AQAQ A 0 A_Jump(128,"Ready1")
goto AltCannon

}
}

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

actor WaitingForYouAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 20
+INVENTORY.IGNORESKILL
}

actor AquamanChargeSound_F : Inventory
{
inventory.amount 1
inventory.maxamount 7
}

actor AquaKillFlag : Inventory {}

actor WaterCannonFlag : Powerup//Water Cannon is out
{
powerup.duration 200
}

actor WaterCannonFlag2 : Powerup//Water Cannon is telling Aqua Man it is out
{
powerup.duration 35
}

actor WaterCannonFlag3 : Powerup//Water Cannon is traveling
{
powerup.duration 100//9
}

actor WaterCannonFlag4 : Powerup//Water Tower is out
{
powerup.duration 100
}

actor AquamanRainbowFX : BasicExplosion
{
+NOTIMEFREEZE
Scale 2.5
States
{
Spawn:
TNT1 A 0
AQAQ Z 2
TNT1 A 2
AQAQ Z 2
TNT1 A 2
AQAQ Z 2
TNT1 A 2
AQAQ Z 2
TNT1 A 2
stop
}
}

actor WaterBalloonBoss4 : ProjSpawnFuncActor
{
PROJECTILE
Damagetype "AquaM_Shot"
Obituary "$OB_WATERBALLOON"
+DONTSPLASH
-NOGRAVITY
+SKYEXPLODE
+EXPLODEONWATER
+FORCEXYBILLBOARD
+DONTREFLECT
RenderStyle "Translucent"
Alpha 0.9
Mass 110
Meleerange 15
Damage (0)
Height 10
Radius 10
Speed 46
Scale 2.5
States
{
Spawn:
TNT1 A 0
AQBA B 0 A_ChangeVelocity(0,0,MeleeRange/4.0)

AQBA B 0
Spawn2:
AQBA BCD 2
loop
Death:
AQBA E 0 A_SpawnItemEx("SoakifyEffect")
AQBA E 0 A_SetGravity(0.0)
AQBA E 0 A_Explode(Mass,85,0,0,20)
AQBA E 0 A_JumpIf(ceilingz-z<16,"DeathUp")
AQBA EFG 3
stop
DeathUp:
AQBA H 0
AQBA HIJ 3
stop
}
}

actor WaterBalloonBoss3 : WaterBalloonBoss4{speed 39}
actor WaterBalloonBoss2 : WaterBalloonBoss4{speed 32}
actor WaterBalloonBoss1 : WaterBalloonBoss4{speed 25}

actor WaterBalloonBoss0 : WaterBalloonBoss4
{
Obituary "$OB_WATERBALLOONH"
Mass 70
Meleerange 10
Radius 8
Height 8
speed 18
States
{
Spawn:
TNT1 A 0
AQAQ K 0 A_ChangeVelocity(0,0,MeleeRange/4.0)
Spawn2:
AQAQ KLM 2
loop
Death:
AQAQ N 0 A_SpawnItemEx("SoakifyEffect")
AQAQ N 0 A_SetGravity(0.0)
AQAQ N 0 A_Explode(Mass,77,0,0,16)
AQAQ NOP 3
stop
}
}

actor WaterBalloonBossTower : WaterBalloonBoss0
{
Damagetype "AquaM_TowerBit"
Obituary "$OB_WATERTOWERB"
+THRUACTORS
Mass 70
States
{
Spawn:
TNT1 A 0
AQBA D 2
AQBA B 0 A_ChangeFlag("THRUACTORS",0)
AQBA B 0 A_Jump(256,1,2,3)
Spawn2:
AQBA BCD 2
loop
}
}
actor WaterBalloonBossTower2 : WaterBalloonBossTower
{
Mass 50
Radius 8
Height 8
States
{
Spawn:
TNT1 A 0
AQAQ M 2
AQAQ K 0 A_ChangeFlag("THRUACTORS",0)
AQAQ K 0 A_Jump(256,1,2,3)
Spawn2:
AQAQ KLM 2
loop
Death:
AQAQ N 0 A_SetGravity(0.0)
AQAQ N 0 A_Explode(Mass,77,0,0,16)
AQAQ NOP 3
stop
}
}
actor WaterBalloonBossTower3 : WaterBalloonBossTower
{
Mass 30
Radius 6
Height 6
States
{
Spawn:
TNT1 A 0
AQAQ Q 2
AQAQ Q 0 A_ChangeFlag("THRUACTORS",0)
AQAQ Q 0 A_Jump(256,1,2,3)
Spawn2:
AQAQ QRS 2
loop
Death:
AQAQ T 0 A_SetGravity(0.0)
AQAQ T 0 A_Explode(Mass,69,0,0,12)
AQAQ TUV 3
stop
}
}


actor WaterBalloonBossCannon : WaterBalloonBossTower
{
Damagetype "AquaM_CannonBit"
Obituary "$OB_WATERCANNON"
Mass 80
}
actor WaterBalloonBossCannon2 : WaterBalloonBossTower2
{
Damagetype "AquaM_CannonBit"
Obituary "$OB_WATERCANNON"
}
actor WaterBalloonBossCannon3 : WaterBalloonBossTower3
{
Damagetype "AquaM_CannonBit"
Obituary "$OB_WATERCANNON"
}



actor AquaWaterTowerSpawner : ProjSpawnFuncActorFast
{
+DONTBLAST
+SKYEXPLODE
+EXPLODEONWATER
+THRUACTORS
reactiontime 5
damage (0)
radius 8
height 16
speed 1000
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDown
loop
Death:
TNT1 A 0 A_SpawnItemEx("SoakifyEffect")
TNT1 A 0 A_SpawnItemEx("AquaWaterTower")
stop
}
}

actor AquaWaterTower : ProjSpawnFuncActor
{
PROJECTILE
damagetype "AquaM_Tower"
Obituary "$OB_WATERTOWER"
+DONTBLAST
+DONTREFLECT
+THRUACTORS
+FLOORHUGGER
RenderStyle "Translucent"
Alpha 0.9
ReactionTime 1
damage (0)
radius 4
height 4
Scale 2.5
States
{
Spawn:
TNT1 A 1
TNT1 A 0 A_PlaySoundEx("misc/mwsburst","Weapon")
TNT1 A 0
AQUT A 2 A_SpawnItemEx("AWT_Dam_A")
AQUT B 2 A_SpawnItemEx("AWT_Dam_B")
AQUT C 2 A_SpawnItemEx("AWT_Dam_C")
AQUT D 2 A_SpawnItemEx("AWT_Dam_D")
AQUT E 2 A_SpawnItemEx("AWT_Dam_E")
AQUT F 2 A_SpawnItemEx("AWT_Dam_F")
AQUT G 2 A_SpawnItemEx("AWT_Dam_G")
AQUT H 2 A_SpawnItemEx("AWT_Dam_H")
AQUT I 2 A_SpawnItemEx("AWT_Dam_I")

AQUT JKLJKLJKLJKLJKLJKLJKLJKLJKLJKLJKLJKLJKLJKL 2 A_SpawnItemEx("AquaWaterTowerDamager")

AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,8)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,28)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,48)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,68)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,88)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,108)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,128)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,148)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,168)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,188)
AQUT M 0 A_SpawnItemEx("AquaWaterTowerBalloon_H",0,0,208)
AQUT M 1 A_CountDown
wait
Death:
AQUT MNO 3
stop
}
}

actor AquaWaterTowerBalloon_H : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("WaterBalloonBossTower",frandom(0,8),0,frandom(0,8),frandom(0,2),0,frandom(3,6)+0.25,random(0,59)*6)
TNT1 AA 0 A_SpawnItemEx("WaterBalloonBossTower2",frandom(8,24),0,frandom(0,8),frandom(3,6),0,frandom(1,3)+0.25,random(0,359))
TNT1 AAA 0 A_SpawnItemEx("WaterBalloonBossTower3",frandom(8,24),0,frandom(0,8),frandom(3,6),0,frandom(1,3)+0.25,random(0,359))
TNT1 A 0
stop
}
}

actor AquaWaterTowerDamager
{
damagetype "AquaM_Tower"
Obituary "$OB_WATERTOWER"
+MISSILE
+NOGRAVITY
+RIPPER
+DONTSPLASH
+DONTBLAST
+THRUGHOST

+SHOOTABLE
+DONTDRAIN
+NOBLOOD
+NOTARGETSWITCH
+CANTSEEK
+NOPAIN
+DONTREFLECT
+DONTRIP
mass 99999
health 10000

RenderStyle "None"

Damage (30)
Radius 50
Height 251
States
{
Spawn:
TNT1 A 1
stop
}
}
actor AWT_Dam_A : AquaWaterTowerDamager{Height 27}
actor AWT_Dam_B : AWT_Dam_A{Height 52}
actor AWT_Dam_C : AWT_Dam_A{Height 77}
actor AWT_Dam_D : AWT_Dam_A{Height 102}
actor AWT_Dam_E : AWT_Dam_A{Height 127}
actor AWT_Dam_F : AWT_Dam_A{Height 152}
actor AWT_Dam_G : AWT_Dam_A{Height 177}
actor AWT_Dam_H : AWT_Dam_A{Height 202}
actor AWT_Dam_I : AWT_Dam_A{Height 227}

actor WaterCannonSpawner : ProjSpawnFuncActor
{
PROJECTILE
damagetype "AquaM_Cannon"
Obituary "$OB_WATERCANNON"
+DONTSEEKINVISIBLE//
+SEEKERMISSILE
+SCREENSEEKER
+DONTBLAST
+DONTREFLECT
+SKYEXPLODE
+RIPPER
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
+BOUNCEONACTORS
bouncefactor 1.0
wallbouncefactor 1.0
damage (0)
Radius 8
Height 8
speed 20//15
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 0 A_SpawnItemEX("WaterCannonNoDamage3")
TNT1 A 1 A_GiveToTarget("WaterCannonFlag2",1)//A_SeekerMissile(2,10,3,50,10)
TNT1 A 0 A_PlaySoundEx("weapon/WaterCannonGo","Weapon")
TNT1 A 0 A_SpawnItemEX("WaterCannon")//A_SpawnItemEX("WaterCannonSound")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 1
TNT1 A 0 A_SpawnItemEX("WaterCannonNoDamage")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 1
TNT1 A 0 A_SpawnItemEX("WaterCannon2")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 1
TNT1 A 0 A_SpawnItemEX("WaterCannonNoDamage2")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 1
TNT1 A 0 A_SpawnItemEX("WaterCannon3")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 1
TNT1 A 0 A_SpawnItemEX("WaterCannonNoDamage3")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 1
TNT1 A 0 A_SpawnItemEX("WaterCannon")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 1
TNT1 A 0 A_SpawnItemEX("WaterCannonNoDamage")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("WaterCannonFlag3",1,"KeepGoing")
TNT1 A 0 A_SpawnItemEX("WaterCannonSpawnerStop")
stop
KeepGoing:
TNT1 A 0 A_SpawnItemEX("WaterCannonSpawnerHome",0,0,0,momx/200,momy/200,momz/200,0,8)
stop

Despawn:
TNT1 A 0 //A_SpawnItemEx("WaterBalloonBossCannon",0,0,0,frandom(-2,2),(random(0,1)*2-1)*frandom(4,10),frandom(1,3))
TNT1 A 0 A_SpawnItemEx("WaterBalloonBossCannon",0,0,0,0,0,0.25)
stop

Death:
TNT1 A 0 A_SpawnItemEx("SoakifyEffect")
stop
}
}

actor WaterCannonSpawnerHome : WaterCannonSpawner
{
speed 1
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 A 0 A_SpawnItemEX("WaterCannonBubble")
TNT1 AAAA 0 A_SeekerMissile(4,15,7,50,10)
TNT1 A 1 A_SeekerMissile(4,10,7,50,10)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 AAAA 0 A_SeekerMissile(4,15,7,50,10)
TNT1 A 1 A_SeekerMissile(4,10,7,50,10)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
TNT1 AAAA 0 A_SeekerMissile(4,15,7,50,10)
TNT1 A 1 A_SeekerMissile(4,10,7,50,10)
TNT1 A 0 A_JumpIfInTargetInventory("WaterCannonFlag3",1,"KeepGoing")
TNT1 A 0 A_SpawnItemEX("WaterCannonSpawnerStop")
stop
KeepGoing:
TNT1 A 0 A_SpawnItemEX("WaterCannonSpawner",0,0,0,momx*200,momy*200,momz*200,0,8)
stop
}
}

actor WaterCannonSpawnerStop : WaterCannonSpawner
{
RenderStyle "Translucent"
Alpha 0.9
speed 0
states
{
Spawn:
TNT1 A 0
Spawn2:
AQBA R 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA RR 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA S 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA SS 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA Q 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA QQ 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA R 0 A_GiveToTarget("WaterCannonFlag2",1)
loop
}
}


actor AquaM_CannonProtect : PowerProtection
{
Powerup.Duration 6
damagefactor "AquaM_Cannon", 0.3
}

actor WaterCannon : ProjSpawnFuncActor
{
PROJECTILE
damagetype "AquaM_Cannon"
Obituary "$OB_WATERCANNON"
+DONTBLAST
+DONTREFLECT
+THRUGHOST
RenderStyle "Translucent"
Alpha 0.9
damage (60)
Radius 8//4//3
Height 8//5//4
Speed 5
scale 2.5
States
{
Spawn:
TNT1 A 0
Spawn2:
AQBA K 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA KK 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA L 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA LL 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA M 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA MM 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
loop
Despawn:
//TNT1 A 0 A_SpawnItemEx("WaterBalloonBossCannon2",0,0,0,frandom(-2,2),(random(0,1)*2-1)*frandom(2,6),frandom(1,3))
TNT1 A 0 A_SpawnItemEx("WaterBalloonBossCannon2",0,0,0,0,0,0.25)
stop
Death:
AQBA K 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA KLM 2 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA K 0 A_SpawnItemEx("WaterCannon")
stop
}
}
actor WaterCannon2 : WaterCannon
{
States
{
Spawn:
TNT1 A 0
goto Spawn2+3
}
}
actor WaterCannon3 : WaterCannon
{
States
{
Spawn:
TNT1 A 0
goto Spawn2+6
}
}

actor WaterCannonSound : WaterCannon
{
SeeSound "weapon/WaterCannonGo"
/*States
{
Spawn:
AQBA K 0
AQBA K 0 A_PlaySoundEx("weapon/WaterCannonGo","Weapon")
goto Spawn2
}*/
}

actor WaterCannonNoDamage : WaterCannon
{
//renderstyle none
damage(0)
Radius 4
Height 5
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
goto Spawn2+2
Despawn:
//TNT1 A 0 A_SpawnItemEx("WaterBalloonBossCannon3",0,0,0,frandom(-2,2),(random(0,1)*2-1)*frandom(2,6),frandom(1,3))
TNT1 A 0 A_SpawnItemEx("WaterBalloonBossCannon3",0,0,0,0,0,0.25)
stop
Death:
AQBA K 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA KLM 2 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA K 0 A_SpawnItemEx("WaterCannonNoDamage")
stop
}
}
actor WaterCannonNoDamage2 : WaterCannonNoDamage
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
goto Spawn2+5
}
}
actor WaterCannonNoDamage3 : WaterCannonNoDamage
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
goto Spawn2+8
}
}

actor WaterCannonBubble : WaterCannon
{
States
{
Spawn:
TNT1 A 0
Spawn2:
AQBA N 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA NN 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA O 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA OO 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA P 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA PP 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
loop
Despawn:
TNT1 A 0
//TNT1 AAA 0 A_SpawnItemEx("WaterBalloonBossCannon",0,0,0,frandom(-2,2),frandom(4,10),frandom(3,6))
//TNT1 AAA 0 A_SpawnItemEx("WaterBalloonBossCannon",0,0,0,frandom(-2,2),frandom(-4,-10),frandom(3,6))
TNT1 A 0 A_SpawnItemEx("WaterBalloonBossCannon",0,0,0,0,0,0.25)
stop
Death:
AQBA N 0 A_JumpIfInTargetInventory("AquaKillFlag",1,"Despawn")
AQBA NOP 2 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Despawn")
AQBA N 0 A_SpawnItemEx("WaterCannonBubble")
stop
}
}

//actor Aquaman_W_NormalBar : NormalBar {Args 192,62}
actor Aquaman_W_ScriptBar : ScriptBar {}