actor BlackHoleBombBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_9H"
dropitem "RainbowGalaxyWepCDropped"
Weapon.AmmoUse 0
Weapon.AmmoGive 56
Obituary "$OB_BLACKHOLEBOMB"
Inventory.Pickupmessage "SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApuppiesAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE"
weapon.ammotype "SpaceTravelAmmo"
inventory.icon "BLAKHOLI"
States
{
Spawn:
//C_09 H 1
C_09 RSTUVWX 4
loop

//9H_H DGJMPSV 4 A_WeaponReady
//9H_H EHKNQTW 4 A_WeaponReady
//9H_H FILORUX 4 A_WeaponReady

Ready:
9H_H A 0 ACS_ExecuteAlways(998,0,DYE_GALAXYMAN)
9H_H A 0 A_GunFlash
9H_H A 0 A_GiveInventory("GalaxyHudCvar_P",1)
9H_H A 0 A_JumpIfInventory("SpawningMisfired",1,"ReadySpawn")
9H_H A 0 A_GiveInventory("SpawningMisfire",1)
goto ReadyMisF

ReadyMisF:
9H_H A 2 A_WeaponReady
9H_H A 0 A_GiveInventory("SpawningMisfired",1)
9H_H A 0 A_TakeInventory("SpawningMisfire",9)
Goto ReadySpawn
SpawnProtect:
9H_H A 1
Goto ReadyMisF

ReadySpawn:
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"ReadySpawn1")
goto ReadySpawn2
ReadySpawn1:
"####" A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"ReadySpawn3")
"####" A 2 A_WeaponReady(12)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,2)
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready0_1")
goto Ready0_2
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1")
goto Ready2
ReadySpawn2:
"####" A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"ReadySpawn4")
"####" A 2 A_WeaponReady(8)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Ready2")
goto Ready0_2
ReadySpawn3:
"####" A 2 A_WeaponReady(4)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,2)
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready0_3")
goto Ready0_4
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready3")
goto Ready4
ReadySpawn4:
"####" A 2 A_WeaponReady
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Ready4")
goto Ready0_4

Ready0:
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready0_1")
goto Ready0_2
Ready0_1:
"####" A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready0_3")
"####" A 4 A_WeaponReady(12)
"####" A 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" A 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" A 0
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready0_1")
goto Ready0_2
Ready0_2:
"####" A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready0_4")
"####" A 4 A_WeaponReady(8)
"####" A 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" A 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" A 0
loop
Ready0_3:
"####" A 4 A_WeaponReady(4)
"####" A 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" A 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" A 0
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready0.3")
goto Ready0_4
Ready0_4:
"####" A 4 A_WeaponReady
"####" A 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" A 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" A 0
loop

ReadyC:
"####" A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1")
goto Ready2

Ready1:
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",7,"Ready1.a")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",6,"Ready1.b")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",5,"Ready1.c")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",4,"Ready1.d")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",3,"Ready1.e")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",2,"Ready1.f")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Ready1.g")
Ready1.a:
"####" D 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready3.a")
"####" D 4 A_WeaponReady(12)//WRF_NOFIRE
"####" D 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" D 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" D 0 A_TakeInventory("GalaxyHudFlag",1)
"####" D 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1.b")
goto Ready2
Ready1.b:
"####" G 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready3.b")
"####" G 4 A_WeaponReady(12)
"####" G 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" G 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" G 0 A_TakeInventory("GalaxyHudFlag",1)
"####" G 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1.c")
goto Ready2
Ready1.c:
"####" J 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready3.c")
"####" J 4 A_WeaponReady(12)
"####" J 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" J 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" J 0 A_TakeInventory("GalaxyHudFlag",1)
"####" J 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1.d")
goto Ready2
Ready1.d:
"####" M 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready3.d")
"####" M 4 A_WeaponReady(12)
"####" M 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" M 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" M 0 A_TakeInventory("GalaxyHudFlag",1)
"####" M 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1.e")
goto Ready2
Ready1.e:
"####" P 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready3.e")
"####" P 4 A_WeaponReady(12)
"####" P 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" P 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" P 0 A_TakeInventory("GalaxyHudFlag",1)
"####" P 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1.f")
goto Ready2
Ready1.f:
"####" S 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready3.f")
"####" S 4 A_WeaponReady(12)
"####" S 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" S 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" S 0 A_TakeInventory("GalaxyHudFlag",1)
"####" S 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1.g")
goto Ready2
Ready1.g:
"####" V 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready3.g")
"####" V 4 A_WeaponReady(12)
"####" V 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" V 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" V 0 A_GiveInventory("GalaxyHudFlag",7)
"####" V 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready1.a")
goto Ready2

Ready2:
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",7,7)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",6,11)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",5,15)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",4,19)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",3,23)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",2,27)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,31)

"####" D 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready4")//7
"####" D 4 A_WeaponReady(8)//WRF_NOSECONDARY
"####" D 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" D 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" D 0 A_TakeInventory("GalaxyHudFlag",1)

"####" G 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready4")//6
"####" G 4 A_WeaponReady(8)
"####" G 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" G 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" G 0 A_TakeInventory("GalaxyHudFlag",1)

"####" J 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready4")//5
"####" J 4 A_WeaponReady(8)
"####" J 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" J 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" J 0 A_TakeInventory("GalaxyHudFlag",1)

"####" M 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready4")//4
"####" M 4 A_WeaponReady(8)
"####" M 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" M 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" M 0 A_TakeInventory("GalaxyHudFlag",1)

"####" P 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready4")//3
"####" P 4 A_WeaponReady(8)
"####" P 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" P 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" P 0 A_TakeInventory("GalaxyHudFlag",1)

"####" S 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready4")//2
"####" S 4 A_WeaponReady(8)
"####" S 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" S 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" S 0 A_TakeInventory("GalaxyHudFlag",1)

"####" V 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Ready4")//1
"####" V 4 A_WeaponReady(8)
"####" V 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" V 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" V 0 A_GiveInventory("GalaxyHudFlag",7)
loop

Ready3:
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",7,"Ready3.a")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",6,"Ready3.b")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",5,"Ready3.c")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",4,"Ready3.d")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",3,"Ready3.e")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",2,"Ready3.f")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Ready3.g")
Ready3.a:
"####" D 4 A_WeaponReady(4)//WRF_NOPRIMARY
"####" D 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" D 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" D 0 A_TakeInventory("GalaxyHudFlag",1)
"####" D 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready3.b")
goto Ready4
Ready3.b:
"####" G 4 A_WeaponReady(4)
"####" G 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" G 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" G 0 A_TakeInventory("GalaxyHudFlag",1)
"####" G 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready3.c")
goto Ready4
Ready3.c:
"####" J 4 A_WeaponReady(4)
"####" J 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" J 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" J 0 A_TakeInventory("GalaxyHudFlag",1)
"####" J 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready3.d")
goto Ready4
Ready3.d:
"####" M 4 A_WeaponReady(4)
"####" M 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" M 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" M 0 A_TakeInventory("GalaxyHudFlag",1)
"####" M 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready3.e")
goto Ready4
Ready3.e:
"####" P 4 A_WeaponReady(4)
"####" P 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" P 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" P 0 A_TakeInventory("GalaxyHudFlag",1)
"####" P 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready3.f")
goto Ready4
Ready3.f:
"####" S 4 A_WeaponReady(4)
"####" S 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" S 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" S 0 A_TakeInventory("GalaxyHudFlag",1)
"####" S 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready3.g")
goto Ready4
Ready3.g:
"####" V 4 A_WeaponReady(4)
"####" V 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" V 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" V 0 A_GiveInventory("GalaxyHudFlag",7)
"####" V 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Ready3.a")
goto Ready4

Ready4:
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",7,7)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",6,10)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",5,13)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",4,16)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",3,19)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",2,22)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,25)

"####" D 4 A_WeaponReady
"####" D 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" D 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" D 0 A_TakeInventory("GalaxyHudFlag",1)

"####" G 4 A_WeaponReady
"####" G 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" G 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" G 0 A_TakeInventory("GalaxyHudFlag",1)

"####" J 4 A_WeaponReady
"####" J 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" J 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" J 0 A_TakeInventory("GalaxyHudFlag",1)

"####" M 4 A_WeaponReady
"####" M 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" M 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" M 0 A_TakeInventory("GalaxyHudFlag",1)

"####" P 4 A_WeaponReady
"####" P 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" P 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" P 0 A_TakeInventory("GalaxyHudFlag",1)

"####" S 4 A_WeaponReady
"####" S 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" S 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" S 0 A_TakeInventory("GalaxyHudFlag",1)

"####" V 4 A_WeaponReady
"####" V 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
"####" V 0 A_GiveInventory("SpaceTravelAmmo",3)
"####" V 0 A_GiveInventory("GalaxyHudFlag",7)
loop

Flash:
TNT1 A 0 A_Jump(256,1,3,5,7,9,11,13)
TNT1 A 2 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 2 ACS_ExecuteAlways(991,0,DYE_GALAXYMAN1)
TNT1 A 2 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 2 ACS_ExecuteAlways(991,0,DYE_GALAXYMAN7)
TNT1 A 2 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 2 ACS_ExecuteAlways(991,0,DYE_GALAXYMAN6)
TNT1 A 2 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 2 ACS_ExecuteAlways(991,0,DYE_GALAXYMAN5)
TNT1 A 2 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 2 ACS_ExecuteAlways(991,0,DYE_GALAXYMAN4)
TNT1 A 2 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 2 ACS_ExecuteAlways(991,0,DYE_GALAXYMAN3)
TNT1 A 2 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 2 ACS_ExecuteAlways(991,0,DYE_GALAXYMAN2)
goto Flash+1

Deselect:
//9H_H A 0 A_GiveInventory("BlackHoleFlagD",1)
9H_H AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
9H_H A 1 A_Lower
Loop
Select:
9H_H AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
9H_H A 1 A_Raise
Loop

Fire:
9H_H A 0 A_JumpIfInventory("IsBot",1,"BotFire")
9H_H A 0 A_JumpIfInventory("SpawningMisfire",1,"SpawnProtect")
9H_H A 0 A_JumpIfInventory("GalaxyAltFlag",1,"Fire_A")
9H_H A 0 A_JumpIfInventory("BlackHoleFlag",1,"Fire2")
9H_H A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"Fire2Wait")

9H_H A 0 A_GiveInventory("GalaxymanMain_CI",1)
9H_H A 0 A_GiveInventory("BlackHoleFlag",1)

9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",7,"Fire_1")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",6,"Fire_2")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",5,"Fire_3")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",4,"Fire_4")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",3,"Fire_5")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",2,"Fire_6")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Fire_7")
goto Fire_0
Fire_0:
9H_H BC 3
9H_H C 4 offset(50,-7)
9H_H C 3 A_WeaponReady(14)//Reset offsets
9H_H B 3
goto Ready0

BotFire:
9H_H A 1 A_GiveInventory("RainbowGalaxyBoss",1)
9H_H A 1 A_SelectWeapon("RainbowGalaxyBoss")
Goto Ready0

Fire_1:
9H_H E 3
9H_H F 1
9H_H I 2
9H_H I 2 offset(50,-7)
9H_H L 2 offset(50,-7)
9H_H L 2 A_WeaponReady(14)
9H_H O 1
9H_H N 3 A_TakeInventory("GalaxyHudFlag",4)
goto ReadyC
Fire_2:
9H_H H 3
9H_H I 1
9H_H L 2
9H_H L 2 offset(50,-7)
9H_H O 2 offset(50,-7)
9H_H O 2 A_WeaponReady(14)
9H_H R 1
9H_H Q 3 A_TakeInventory("GalaxyHudFlag",4)
goto ReadyC
Fire_3:
9H_H K 3
9H_H L 1
9H_H O 2
9H_H O 2 offset(50,-7)
9H_H R 2 offset(50,-7)
9H_H R 2 A_WeaponReady(14)
9H_H U 1
9H_H T 3 A_TakeInventory("GalaxyHudFlag",4)
goto ReadyC
Fire_4:
9H_H N 3
9H_H O 1
9H_H R 2
9H_H R 2 offset(50,-7)
9H_H U 2 offset(50,-7)
9H_H U 2 A_WeaponReady(14)
9H_H X 1
9H_H W 3 A_GiveInventory("GalaxyHudFlag",3)
goto ReadyC
Fire_5:
9H_H Q 3
9H_H R 1
9H_H U 2
9H_H U 2 offset(50,-7)
9H_H X 2 offset(50,-7)
9H_H X 2 A_WeaponReady(14)
9H_H F 1
9H_H E 3 A_GiveInventory("GalaxyHudFlag",4)
goto ReadyC
Fire_6:
9H_H T 3
9H_H U 1
9H_H X 2
9H_H X 2 offset(50,-7)
9H_H F 2 offset(50,-7)
9H_H F 2 A_WeaponReady(14)
9H_H I 1
9H_H H 3 A_GiveInventory("GalaxyHudFlag",5)
goto ReadyC
Fire_7:
9H_H W 3
9H_H X 1
9H_H F 2
9H_H F 2 offset(50,-7)
9H_H I 2 offset(50,-7)
9H_H I 2 A_WeaponReady(14)
9H_H K 1
9H_H K 3 A_GiveInventory("GalaxyHudFlag",6)
goto ReadyC

Fire2:
9H_H A 0 A_JumpIfInventory("MissingBlackHole",1,"Fire2Reset")
9H_H A 0 A_GiveInventory("BlackHoleFlagD",1)
9H_H A 0 A_GiveInventory("MissingBlackHole",1)
goto Fire2Wait
Fire2Reset:
9H_H A 0 A_PlaySoundEx("GNT/FailUse","Body")
9H_H A 0 A_TakeInventory("BlackHoleFlagD",999)
9H_H A 0 A_TakeInventory("MissingBlackHole",999)
9H_H A 0 A_TakeInventory("BlackHoleFlag",999)
9H_H A 0 A_TakeInventory("BlackHoleBombCooldown",999)
goto Fire2Wait

Fire2Wait:
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",7,"Fire2_1")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",6,"Fire2_2")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",5,"Fire2_3")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",4,"Fire2_4")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",3,"Fire2_5")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",2,"Fire2_6")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Fire2_7")
goto Fire2_0
Fire2_0:
9H_H AA 2 A_RailWait
Goto Ready0

Fire2_1:
9H_H D 2
9H_H D 2 A_TakeInventory("GalaxyHudFlag",1)
Goto ReadyC
Fire2_2:
9H_H G 2
9H_H G 2 A_TakeInventory("GalaxyHudFlag",1)
Goto ReadyC
Fire2_3:
9H_H J 2
9H_H J 2 A_TakeInventory("GalaxyHudFlag",1)
Goto ReadyC
Fire2_4:
9H_H M 2
9H_H M 2 A_TakeInventory("GalaxyHudFlag",1)
Goto ReadyC
Fire2_5:
9H_H P 2
9H_H P 2 A_TakeInventory("GalaxyHudFlag",1)
Goto ReadyC
Fire2_6:
9H_H S 2
9H_H S 2 A_TakeInventory("GalaxyHudFlag",1)
Goto ReadyC
Fire2_7:
9H_H V 2
9H_H V 2 A_GiveInventory("GalaxyHudFlag",7)
Goto ReadyC

Altfire:
9H_H A 0 A_JumpIfInventory("GalaxyAltFlag",1,"AltfireEnd")
9H_H A 0 A_JumpIfInventory("GalaxyPortFlag",1,"GalaxyTeleport")
9H_H A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Altfire2")
Goto ReadyC

Fire_A:
TNT1 A 1 A_GiveInventory("BlackHoleFlagD",1)
goto Altfire4

Altfire2:
9H_H A 0 A_GiveInventory("GalaxyAltFlag",1)
9H_H A 0 SetPlayerProperty(0,1,0)
9H_H A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
9H_H A 0 A_ChangeFlag("NOGRAVITY",1)
9H_H A 0

9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",7,"Altfire2_1")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",6,"Altfire2_2")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",5,"Altfire2_3")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",4,"Altfire2_4")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",3,"Altfire2_5")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",2,"Altfire2_6")
9H_H A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Altfire2_7")

9H_H BC 3
9H_H C 3 offset(50,-7)
goto Altfire2End

Altfire2_1:
9H_H E 3
9H_H F 1
9H_H I 2
9H_H I 2 offset(50,-7)
9H_H L 1
goto Altfire2End
Altfire2_2:
9H_H H 3
9H_H I 1
9H_H L 2
9H_H L 2 offset(50,-7)
9H_H O 1
goto Altfire2End
Altfire2_3:
9H_H K 3
9H_H L 1
9H_H O 2
9H_H O 2 offset(50,-7)
9H_H R 1
goto Altfire2End
Altfire2_4:
9H_H N 3
9H_H O 1
9H_H R 2
9H_H R 2 offset(50,-7)
9H_H U 1
goto Altfire2End
Altfire2_5:
9H_H Q 3
9H_H R 1
9H_H U 2
9H_H U 2 offset(50,-7)
9H_H X 1
goto Altfire2End
Altfire2_6:
9H_H T 3
9H_H U 1
9H_H X 2
9H_H X 2 offset(50,-7)
9H_H F 1
goto Altfire2End
Altfire2_7:
9H_H W 3
9H_H X 1
9H_H F 2
9H_H F 2 offset(50,-7)
9H_H I 1
goto Altfire2End


Altfire2End:
TNT1 A 0 //A_TakeInventory("GalaxyHudFlag",9)
TNT1 A 0 A_JumpIfInventory("BlackHoleFlag",1,"Altfire3")
Goto Altfire4

Altfire3:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,3)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 ThrustThingZ(0,2,0,1)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",9,1)
TNT1 A 0 A_PlaySoundEx("weapon/RamFlight","Weapon")
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(2)
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(2)
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(2)
TNT1 A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Altfire3")
goto AltfireEnd

Altfire4:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,3)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 ThrustThingZ(0,2,0,1)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",9,1)
TNT1 A 0 A_PlaySoundEx("weapon/RamFlight","Weapon")
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Altfire4")
goto AltfireEnd

AltfireEnd:
9H_H C 0 A_TakeInventory("GalaxyAltFlag",999)
9H_H C 0 SetPlayerProperty(0,0,0)
9H_H C 0 A_ChangeFlag("NOGRAVITY",0)

9H_H C 0 //A_GiveInventory("GalaxyHudFlag",random(1,7))

9H_H C 0 A_JumpIfInventory("GalaxyHudFlag",7,"AltfireEnd_4")
9H_H C 0 A_JumpIfInventory("GalaxyHudFlag",6,"AltfireEnd_5")
9H_H C 0 A_JumpIfInventory("GalaxyHudFlag",5,"AltfireEnd_6")
9H_H C 0 A_JumpIfInventory("GalaxyHudFlag",4,"AltfireEnd_7")
9H_H C 0 A_JumpIfInventory("GalaxyHudFlag",3,"AltfireEnd_1")
9H_H C 0 A_JumpIfInventory("GalaxyHudFlag",2,"AltfireEnd_2")
9H_H C 0 A_JumpIfInventory("GalaxyHudFlag",1,"AltfireEnd_3")
goto AltfireEnd_0
AltfireEnd_0:
9H_H C 3 offset(50,-7)
9H_H C 0 A_WeaponReady(14)
9H_H CB 3
9H_H A 2 offset(12,22)
9H_H A 2 offset(6,27)
Goto Ready0
AltfireEnd_1:
9H_H F 1 offset(50,-7)
9H_H I 2
9H_H I 2 A_WeaponReady(14)
9H_H L 1
9H_H K 3
9H_H M 2 offset(12,22)
9H_H M 2 offset(6,27)
Goto ReadyC
AltfireEnd_2:
9H_H I 1 offset(50,-7)
9H_H L 2
9H_H L 2 A_WeaponReady(14)
9H_H O 1
9H_H N 3
9H_H P 2 offset(12,22)
9H_H P 2 offset(6,27)
Goto ReadyC
AltfireEnd_3:
9H_H L 1 offset(50,-7)
9H_H O 2
9H_H O 2 A_WeaponReady(14)
9H_H R 1
9H_H Q 3
9H_H S 2 offset(12,22)
9H_H S 2 offset(6,27)
Goto ReadyC
AltfireEnd_4:
9H_H O 1 offset(50,-7)
9H_H R 2
9H_H R 2 A_WeaponReady(14)
9H_H U 1
9H_H T 3
9H_H V 2 offset(12,22)
9H_H V 2 offset(6,27)
Goto ReadyC
AltfireEnd_5:
9H_H R 1 offset(50,-7)
9H_H U 2
9H_H U 2 A_WeaponReady(14)
9H_H X 1
9H_H W 3
9H_H D 2 offset(12,22)
9H_H D 2 offset(6,27)
Goto ReadyC
AltfireEnd_6:
9H_H U 1 offset(50,-7)
9H_H X 2
9H_H X 2 A_WeaponReady(14)
9H_H F 1
9H_H E 3
9H_H G 2 offset(12,22)
9H_H G 2 offset(6,27)
Goto ReadyC
AltfireEnd_7:
9H_H X 1 offset(50,-7)
9H_H F 2
9H_H F 2 A_WeaponReady(14)
9H_H I 1
9H_H H 3
9H_H J 2 offset(12,22)
9H_H J 2 offset(6,27)
Goto ReadyC

GalaxyTeleport:
"####" A 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" A 0 A_SpawnItemEx("GalaxymanPortalWarperFX",0,0,0,0,0,0,0,1)
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",7,"GalaxyTeleport_1")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",6,"GalaxyTeleport_2")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",5,"GalaxyTeleport_3")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",4,"GalaxyTeleport_4")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",3,"GalaxyTeleport_5")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",2,"GalaxyTeleport_6")
"####" A 0 A_JumpIfInventory("GalaxyHudFlag",1,"GalaxyTeleport_7")
goto GalaxyTeleport_0
GalaxyTeleport_0:
"####" A 1 A_SetTranslucent(0.9,1)
"####" A 1 A_SetTranslucent(0.8,1)
"####" A 1 A_SetTranslucent(0.7,1)
"####" A 1 A_SetTranslucent(0.6,1)
"####" A 1 A_SetTranslucent(0.5,1)
"####" A 1 A_SetTranslucent(0.4,1)
"####" A 1 A_SetTranslucent(0.3,1)
"####" A 1 A_SetTranslucent(0.2,1)
"####" A 1 A_SetTranslucent(0.1,1)
"####" A 1 A_SetTranslucent(0.0,1)
"####" A 0 A_TakeInventory("UnSolid",1)
"####" A 0 A_ChangeFlag("SOLID",0)
"####" A 0 A_GiveInventory("Nudge",1)
"####" A 1 Thing_Move(tid, tid+6000, 1)
"####" A 0 A_SpawnItemEx("ResolidifyPlayer_H")
"####" A 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" A 1 A_SetTranslucent(0.2,1)
"####" A 1 A_SetTranslucent(0.4,1)
"####" A 1 A_SetTranslucent(0.6,1)
"####" A 1 A_SetTranslucent(0.8,1)
"####" A 1 A_SetTranslucent(1.0,0)
"####" A 4
goto Ready0


GalaxyTeleport_1:
"####" D 1 A_SetTranslucent(0.9,1)
"####" D 1 A_SetTranslucent(0.8,1)
"####" D 1 A_SetTranslucent(0.7,1)
"####" D 1 A_SetTranslucent(0.6,1)
"####" G 1 A_SetTranslucent(0.5,1)
"####" G 1 A_SetTranslucent(0.4,1)
"####" G 1 A_SetTranslucent(0.3,1)
"####" G 1 A_SetTranslucent(0.2,1)
"####" J 1 A_SetTranslucent(0.1,1)
"####" J 1 A_SetTranslucent(0.0,1)
"####" J 0 A_TakeInventory("UnSolid",1)
"####" J 0 A_ChangeFlag("SOLID",0)
"####" J 0 A_GiveInventory("Nudge",1)
"####" J 1 Thing_Move(tid,tid+6000,1)
"####" J 0 A_SpawnItemEx("ResolidifyPlayer_H")
"####" J 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" J 1 A_SetTranslucent(0.2,1)
"####" M 1 A_SetTranslucent(0.4,1)
"####" M 1 A_SetTranslucent(0.6,1)
"####" M 1 A_SetTranslucent(0.8,1)
"####" M 1 A_SetTranslucent(1.0,0)
"####" P 4 A_TakeInventory("GalaxyHudFlag",5)
goto ReadyC
GalaxyTeleport_2:
"####" G 1 A_SetTranslucent(0.9,1)
"####" G 1 A_SetTranslucent(0.8,1)
"####" G 1 A_SetTranslucent(0.7,1)
"####" G 1 A_SetTranslucent(0.6,1)
"####" J 1 A_SetTranslucent(0.5,1)
"####" J 1 A_SetTranslucent(0.4,1)
"####" J 1 A_SetTranslucent(0.3,1)
"####" J 1 A_SetTranslucent(0.2,1)
"####" M 1 A_SetTranslucent(0.1,1)
"####" M 1 A_SetTranslucent(0.0,1)
"####" M 0 A_TakeInventory("UnSolid",1)
"####" M 0 A_ChangeFlag("SOLID",0)
"####" M 0 A_GiveInventory("Nudge",1)
"####" M 1 Thing_Move(tid,tid+6000,1)
"####" M 0 A_SpawnItemEx("ResolidifyPlayer_H")
"####" M 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" M 1 A_SetTranslucent(0.2,1)
"####" P 1 A_SetTranslucent(0.4,1)
"####" P 1 A_SetTranslucent(0.6,1)
"####" P 1 A_SetTranslucent(0.8,1)
"####" P 1 A_SetTranslucent(1.0,0)
"####" S 4 A_TakeInventory("GalaxyHudFlag",5)
goto ReadyC
GalaxyTeleport_3:
"####" J 1 A_SetTranslucent(0.9,1)
"####" J 1 A_SetTranslucent(0.8,1)
"####" J 1 A_SetTranslucent(0.7,1)
"####" J 1 A_SetTranslucent(0.6,1)
"####" M 1 A_SetTranslucent(0.5,1)
"####" M 1 A_SetTranslucent(0.4,1)
"####" M 1 A_SetTranslucent(0.3,1)
"####" M 1 A_SetTranslucent(0.2,1)
"####" P 1 A_SetTranslucent(0.1,1)
"####" P 1 A_SetTranslucent(0.0,1)
"####" P 0 A_TakeInventory("UnSolid",1)
"####" P 0 A_ChangeFlag("SOLID",0)
"####" P 0 A_GiveInventory("Nudge",1)
"####" P 1 Thing_Move(tid,tid+6000,1)
"####" P 0 A_SpawnItemEx("ResolidifyPlayer_H")
"####" P 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" P 1 A_SetTranslucent(0.2,1)
"####" S 1 A_SetTranslucent(0.4,1)
"####" S 1 A_SetTranslucent(0.6,1)
"####" S 1 A_SetTranslucent(0.8,1)
"####" S 1 A_SetTranslucent(1.0,0)
"####" V 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC
GalaxyTeleport_4:
"####" M 1 A_SetTranslucent(0.9,1)
"####" M 1 A_SetTranslucent(0.8,1)
"####" M 1 A_SetTranslucent(0.7,1)
"####" M 1 A_SetTranslucent(0.6,1)
"####" P 1 A_SetTranslucent(0.5,1)
"####" P 1 A_SetTranslucent(0.4,1)
"####" P 1 A_SetTranslucent(0.3,1)
"####" P 1 A_SetTranslucent(0.2,1)
"####" S 1 A_SetTranslucent(0.1,1)
"####" S 1 A_SetTranslucent(0.0,1)
"####" S 0 A_TakeInventory("UnSolid",1)
"####" S 0 A_ChangeFlag("SOLID",0)
"####" S 0 A_GiveInventory("Nudge",1)
"####" S 1 Thing_Move(tid,tid+6000,1)
"####" S 0 A_SpawnItemEx("ResolidifyPlayer_H")
"####" S 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" S 1 A_SetTranslucent(0.2,1)
"####" V 1 A_SetTranslucent(0.4,1)
"####" V 1 A_SetTranslucent(0.6,1)
"####" V 1 A_SetTranslucent(0.8,1)
"####" V 1 A_SetTranslucent(1.0,0)
"####" D 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC
GalaxyTeleport_5:
"####" P 1 A_SetTranslucent(0.9,1)
"####" P 1 A_SetTranslucent(0.8,1)
"####" P 1 A_SetTranslucent(0.7,1)
"####" P 1 A_SetTranslucent(0.6,1)
"####" S 1 A_SetTranslucent(0.5,1)
"####" S 1 A_SetTranslucent(0.4,1)
"####" S 1 A_SetTranslucent(0.3,1)
"####" S 1 A_SetTranslucent(0.2,1)
"####" V 1 A_SetTranslucent(0.1,1)
"####" V 1 A_SetTranslucent(0.0,1)
"####" V 0 A_TakeInventory("UnSolid",1)
"####" V 0 A_ChangeFlag("SOLID",0)
"####" V 0 A_GiveInventory("Nudge",1)
"####" V 1 Thing_Move(tid,tid+6000,1)
"####" V 0 A_SpawnItemEx("ResolidifyPlayer_H")
"####" V 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" V 1 A_SetTranslucent(0.2,1)
"####" D 1 A_SetTranslucent(0.4,1)
"####" D 1 A_SetTranslucent(0.6,1)
"####" D 1 A_SetTranslucent(0.8,1)
"####" D 1 A_SetTranslucent(1.0,0)
"####" G 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC
GalaxyTeleport_6:
"####" S 1 A_SetTranslucent(0.9,1)
"####" S 1 A_SetTranslucent(0.8,1)
"####" S 1 A_SetTranslucent(0.7,1)
"####" S 1 A_SetTranslucent(0.6,1)
"####" V 1 A_SetTranslucent(0.5,1)
"####" V 1 A_SetTranslucent(0.4,1)
"####" V 1 A_SetTranslucent(0.3,1)
"####" V 1 A_SetTranslucent(0.2,1)
"####" D 1 A_SetTranslucent(0.1,1)
"####" D 1 A_SetTranslucent(0.0,1)
"####" D 0 A_TakeInventory("UnSolid",1)
"####" D 0 A_ChangeFlag("SOLID",0)
"####" D 0 A_GiveInventory("Nudge",1)
"####" D 1 Thing_Move(tid,tid+6000,1)
"####" D 0 A_SpawnItemEx("ResolidifyPlayer_H")
"####" D 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" D 1 A_SetTranslucent(0.2,1)
"####" G 1 A_SetTranslucent(0.4,1)
"####" G 1 A_SetTranslucent(0.6,1)
"####" G 1 A_SetTranslucent(0.8,1)
"####" G 1 A_SetTranslucent(1.0,0)
"####" J 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC
GalaxyTeleport_7:
"####" V 1 A_SetTranslucent(0.9,1)
"####" V 1 A_SetTranslucent(0.8,1)
"####" V 1 A_SetTranslucent(0.7,1)
"####" V 1 A_SetTranslucent(0.6,1)
"####" D 1 A_SetTranslucent(0.5,1)
"####" D 1 A_SetTranslucent(0.4,1)
"####" D 1 A_SetTranslucent(0.3,1)
"####" D 1 A_SetTranslucent(0.2,1)
"####" G 1 A_SetTranslucent(0.1,1)
"####" G 1 A_SetTranslucent(0.0,1)
"####" G 0 A_TakeInventory("UnSolid",1)
"####" G 0 A_ChangeFlag("SOLID",0)
"####" G 0 A_GiveInventory("Nudge",1)
"####" G 1 Thing_Move(tid,tid+6000,1)
"####" G 0 A_SpawnItemEx("ResolidifyPlayer_H")
"####" G 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)
"####" G 1 A_SetTranslucent(0.2,1)
"####" J 1 A_SetTranslucent(0.4,1)
"####" J 1 A_SetTranslucent(0.6,1)
"####" J 1 A_SetTranslucent(0.8,1)
"####" J 1 A_SetTranslucent(1.0,0)
"####" M 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC

}
}

actor RainbowGalaxyBoss : BlackHoleBombBoss
{
tag "$TAGC_9H2"
Obituary "$OB_BLACKHOLEBOMB"
Inventory.Pickupmessage "Dammit, we know! Everybody knows! Space! You! In it! We get it!"
inventory.icon "XTR0WI_Q"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_09 RSTUVWX 4
loop
Ready:
9H_I A 0 ACS_ExecuteAlways(998,0,DYE_GALAXYMAN)
9H_I A 0 A_GunFlash
9H_I A 0 A_GiveInventory("GalaxyHudCvar_P",1)
9H_I A 0 A_JumpIfInventory("SpawningMisfired",1,"ReadySpawn")
9H_I A 0 A_GiveInventory("SpawningMisfire",1)
goto ReadyMisF

ReadyMisF:
9H_I A 2 A_WeaponReady
9H_I A 0 A_GiveInventory("SpawningMisfired",1)
9H_I A 0 A_TakeInventory("SpawningMisfire",9)
Goto ReadySpawn
SpawnProtect:
9H_I A 1
Goto ReadyMisF

ReadySpawn1:
"####" A 0
goto ReadySpawn2
Ready0_1:
"####" A 0
goto Ready0_2
Ready1:
"####" A 0
goto Ready2

Deselect:
9H_I AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
9H_I A 1 A_Lower
Loop
Select:
9H_I AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
9H_I A 1 A_Raise
Loop

Fire:
FirePew:
9H_I A 0 A_JumpIfInventory("IsBot",1,"BotFire")
9H_I A 0 A_JumpIfInventory("SpawningMisfire",1,"SpawnProtect")
9H_I A 0 A_JumpIfInventory("GalaxyAltFlag",1,"Fire_A")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",7,"FirePew_1")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",6,"FirePew_2")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",5,"FirePew_3")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",4,"FirePew_4")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",3,"FirePew_5")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",2,"FirePew_6")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",1,"FirePew_7")
goto FirePew_0
FirePew_0:
9H_I BC 2
9H_I C 2 offset(-50,-7)
9H_I C 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
9H_I C 2 A_GiveInventory("GalaxymanMain2_CI",1)
9H_I C 0 A_WeaponReady(14)
9H_I CBAA 2
//9H_I A 0 A_Refire("FirePew_0")
Goto Ready0

BotFire:
9H_I A 0 A_JumpIfInventory("WeaponCharge",25,"BotFire2")
9H_I A 0 A_GiveInventory("WeaponCharge",random(1,3))
goto FirePew+2
BotFire2:
9H_I A 0 A_GiveInventory("SpaceTravelAmmo",28)
9H_I A 0 A_GiveInventory("GalaxymanMainBot_CI",1)
9H_I A 0 A_TakeInventory("WeaponCharge",9999)
9H_I BC 3
9H_I C 4 offset(-50,-7)
9H_I C 3 A_WeaponReady(14)//Reset offsets
9H_I B 3
goto ReadyC

FirePew_1:
9H_I E 0 A_TakeInventory("GalaxyHudFlag",9)
9H_I EF 2
9H_I I 2 offset(-50,-7)
9H_I I 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
9H_I I 2 A_GiveInventory("GalaxymanMain2_CI",1)
9H_I L 0 A_WeaponReady(14)
9H_I LKM 2
//9H_I P 0 A_Refire("FirePew_5")
9H_I M 2 A_GiveInventory("GalaxyHudFlag",3)
Goto ReadyC
FirePew_2:
9H_I H 0 A_TakeInventory("GalaxyHudFlag",9)
9H_I HI 2
9H_I L 2 offset(-50,-7)
9H_I L 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
9H_I L 2 A_GiveInventory("GalaxymanMain2_CI",1)
9H_I O 0 A_WeaponReady(14)
9H_I ONP 2
//9H_I S 0 A_Refire("FirePew_6")
9H_I P 2 A_GiveInventory("GalaxyHudFlag",2)
Goto ReadyC
FirePew_3:
9H_I K 0 A_TakeInventory("GalaxyHudFlag",9)
9H_I KL 2
9H_I O 2 offset(-50,-7)
9H_I O 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
9H_I O 2 A_GiveInventory("GalaxymanMain2_CI",1)
9H_I R 0 A_WeaponReady(14)
9H_I RQS 2
//9H_I V 0 A_Refire("FirePew_7")
9H_I S 2 A_GiveInventory("GalaxyHudFlag",1)
Goto ReadyC
FirePew_4:
9H_I N 0 A_TakeInventory("GalaxyHudFlag",9)
9H_I NO 2
9H_I R 2 offset(-50,-7)
9H_I R 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
9H_I R 2 A_GiveInventory("GalaxymanMain2_CI",1)
9H_I U 0 A_WeaponReady(14)
9H_I UTV 2
//9H_I D 0 A_Refire("FirePew_1")
9H_I V 2 A_GiveInventory("GalaxyHudFlag",7)
Goto ReadyC
FirePew_5:
9H_I Q 0 A_TakeInventory("GalaxyHudFlag",9)
9H_I QR 2
9H_I U 2 offset(-50,-7)
9H_I U 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
9H_I U 2 A_GiveInventory("GalaxymanMain2_CI",1)
9H_I X 0 A_WeaponReady(14)
9H_I XWD 2
//9H_I G 0 A_Refire("FirePew_2")
9H_I D 2 A_GiveInventory("GalaxyHudFlag",6)
Goto ReadyC
FirePew_6:
9H_I T 0 A_TakeInventory("GalaxyHudFlag",9)
9H_I TU 2
9H_I X 2 offset(-50,-7)
9H_I X 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
9H_I X 2 A_GiveInventory("GalaxymanMain2_CI",1)
9H_I F 0 A_WeaponReady(14)
9H_I FEG 2
//9H_I J 0 A_Refire("FirePew_3")
9H_I G 2 A_GiveInventory("GalaxyHudFlag",5)
Goto ReadyC
FirePew_7:
9H_I W 0 A_TakeInventory("GalaxyHudFlag",9)
9H_I WX 2
9H_I F 2 offset(-50,-7)
9H_I F 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
9H_I F 2 A_GiveInventory("GalaxymanMain2_CI",1)
9H_I I 0 A_WeaponReady(14)
9H_I IHJ 2
//9H_I M 0 A_Refire("FirePew_4")
9H_I J 2 A_GiveInventory("GalaxyHudFlag",4)
Goto ReadyC


Altfire:
9H_I A 0 A_JumpIfInventory("GalaxyAltFlag",1,"AltfireEnd")
9H_I A 0 A_JumpIfInventory("GalaxyPortFlag",1,"GalaxyTeleport")
9H_I A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Altfire2")
Goto ReadyC

Fire_A:
TNT1 A 1 A_GiveInventory("BlackHoleFlagD",1)
goto Altfire4

Altfire2:
9H_I A 0 A_GiveInventory("GalaxyAltFlag",1)
9H_I A 0 SetPlayerProperty(0,1,0)
9H_I A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
9H_I A 0 A_ChangeFlag("NOGRAVITY",1)
9H_I A 0

9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",7,"Altfire2_1")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",6,"Altfire2_2")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",5,"Altfire2_3")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",4,"Altfire2_4")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",3,"Altfire2_5")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",2,"Altfire2_6")
9H_I A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Altfire2_7")

9H_I BC 3
9H_I C 3 offset(-50,-7)
goto Altfire2End

Altfire2_1:
9H_I E 3
9H_I F 1
9H_I I 2
9H_I I 2 offset(-50,-7)
9H_I L 1
goto Altfire2End
Altfire2_2:
9H_I H 3
9H_I I 1
9H_I L 2
9H_I L 2 offset(-50,-7)
9H_I O 1
goto Altfire2End
Altfire2_3:
9H_I K 3
9H_I L 1
9H_I O 2
9H_I O 2 offset(-50,-7)
9H_I R 1
goto Altfire2End
Altfire2_4:
9H_I N 3
9H_I O 1
9H_I R 2
9H_I R 2 offset(-50,-7)
9H_I U 1
goto Altfire2End
Altfire2_5:
9H_I Q 3
9H_I R 1
9H_I U 2
9H_I U 2 offset(-50,-7)
9H_I X 1
goto Altfire2End
Altfire2_6:
9H_I T 3
9H_I U 1
9H_I X 2
9H_I X 2 offset(-50,-7)
9H_I F 1
goto Altfire2End
Altfire2_7:
9H_I W 3
9H_I X 1
9H_I F 2
9H_I F 2 offset(-50,-7)
9H_I I 1
goto Altfire2End

Altfire2End:
TNT1 A 0 //A_TakeInventory("GalaxyHudFlag",9)
TNT1 A 0 A_JumpIfInventory("BlackHoleFlag",1,"Altfire3")
Goto Altfire4

Altfire3:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,3)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 ThrustThingZ(0,2,0,1)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",9,1)
TNT1 A 0 A_PlaySoundEx("weapon/RamFlight","Weapon")
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(2)
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(2)
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(2)
TNT1 A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Altfire3")
goto AltfireEnd

Altfire4:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,3)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 ThrustThingZ(0,2,0,1)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",9,1)
TNT1 A 0 A_PlaySoundEx("weapon/RamFlight","Weapon")
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,28,momx,momy,momz,0,8)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_JumpIfInventory("SpaceTravelAmmo",1,"Altfire4")
goto AltfireEnd

AltfireEnd:
9H_I C 0 A_TakeInventory("GalaxyAltFlag",999)
9H_I C 0 SetPlayerProperty(0,0,0)
9H_I C 0 A_ChangeFlag("NOGRAVITY",0)

9H_I C 0 //A_GiveInventory("GalaxyHudFlag",random(1,7))

9H_I C 0 A_JumpIfInventory("GalaxyHudFlag",7,"AltfireEnd_4")
9H_I C 0 A_JumpIfInventory("GalaxyHudFlag",6,"AltfireEnd_5")
9H_I C 0 A_JumpIfInventory("GalaxyHudFlag",5,"AltfireEnd_6")
9H_I C 0 A_JumpIfInventory("GalaxyHudFlag",4,"AltfireEnd_7")
9H_I C 0 A_JumpIfInventory("GalaxyHudFlag",3,"AltfireEnd_1")
9H_I C 0 A_JumpIfInventory("GalaxyHudFlag",2,"AltfireEnd_2")
9H_I C 0 A_JumpIfInventory("GalaxyHudFlag",1,"AltfireEnd_3")
goto AltfireEnd_0
AltfireEnd_0:
9H_I C 3 offset(-50,-7)
9H_I C 0 A_WeaponReady(14)
9H_I CB 3
9H_I A 2 offset(-12,22)
9H_I A 2 offset(-6,27)
Goto Ready0
AltfireEnd_1:
9H_I F 1 offset(-50,-7)
9H_I I 2
9H_I I 2 A_WeaponReady(14)
9H_I L 1
9H_I K 3
9H_I M 2 offset(-12,22)
9H_I M 2 offset(-6,27)
Goto ReadyC
AltfireEnd_2:
9H_I I 1 offset(-50,-7)
9H_I L 2
9H_I L 2 A_WeaponReady(14)
9H_I O 1
9H_I N 3
9H_I P 2 offset(-12,22)
9H_I P 2 offset(-6,27)
Goto ReadyC
AltfireEnd_3:
9H_I L 1 offset(-50,-7)
9H_I O 2
9H_I O 2 A_WeaponReady(14)
9H_I R 1
9H_I Q 3
9H_I S 2 offset(-12,22)
9H_I S 2 offset(-6,27)
Goto ReadyC
AltfireEnd_4:
9H_I O 1 offset(-50,-7)
9H_I R 2
9H_I R 2 A_WeaponReady(14)
9H_I U 1
9H_I T 3
9H_I V 2 offset(-12,22)
9H_I V 2 offset(-6,27)
Goto ReadyC
AltfireEnd_5:
9H_I R 1 offset(-50,-7)
9H_I U 2
9H_I U 2 A_WeaponReady(14)
9H_I X 1
9H_I W 3
9H_I D 2 offset(-12,22)
9H_I D 2 offset(-6,27)
Goto ReadyC
AltfireEnd_6:
9H_I U 1 offset(-50,-7)
9H_I X 2
9H_I X 2 A_WeaponReady(14)
9H_I F 1
9H_I E 3
9H_I G 2 offset(-12,22)
9H_I G 2 offset(-6,27)
Goto ReadyC
AltfireEnd_7:
9H_I X 1 offset(-50,-7)
9H_I F 2
9H_I F 2 A_WeaponReady(14)
9H_I I 1
9H_I H 3
9H_I J 2 offset(-12,22)
9H_I J 2 offset(-6,27)
Goto ReadyC
}
}


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

actor GalaxyAltFlag :OnceC {}

actor GalaxyPortFlag :OnceC{}

actor GalaxyPortCoolDown : Powerup
{
powerup.duration 35
}

actor BlackHoleFlagD : Powerup
{
powerup.duration 35
}

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

actor MissingBlackHole : OnceC {}

actor GalaxyHudCvar_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("cbm_OldGalaxyHud"),"Pickup0")
goto Pickup1
Pickup0:
TNT1 A 0 A_TakeInventory("GalaxyHudFlag",99)
stop
Pickup1:
TNT1 A 0 A_JumpIfInventory("GalaxyHudFlag",1,"No")
TNT1 A 0 A_GiveInventory("GalaxyHudFlag",random(1,7))
stop
No:
TNT1 A 0
stop
}
}


actor PortalItem : BasicClassItem
{
inventory.icon "GalCon"
inventory.pickupmessage "Now you're thinking with Portals!"
Tag "Galaxy Portal Toggle"
states
{
Spawn:
GLCN A 1
loop
Use:
TNT1 A 0 A_JumpIfInventory("GalaxyPortFlag",1,"Take")
TNT1 A 0 A_JumpIfInventory("GalaxyPortCoolDown",1,"No")
TNT1 A 0 A_PlaySoundEX("weapon/shieldhum","SoundSlot7")
TNT1 A 0 A_GiveInventory("GalaxyPortFlag",1)
TNT1 A 0 A_SpawnItemEx("GalaxyPortWatcher")
TNT1 A 0 A_SpawnItemEx("PortChecker",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("GalaxyHoleMarker",0,0,0,0,0,0,0,1)
fail
Take:
TNT1 A 0 A_GiveInventory("GalaxyPortCoolDown",1)
TNT1 A 0 A_TakeInventory("GalaxyPortFlag",999)
fail
}
}


actor GalaxyPortWatcher : BasicHelper
{
states
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_JumpIfInventory("WeaponCharge",32,7)
TNT1 A 0 A_JumpIfInTargetInventory("GalaxyPortFlag",1,2)
TNT1 A 1 A_TakeFromTarget("GalaxyPortFlag",99)
stop
TNT1 A 0 A_JumpIfInTargetInventory("SpaceTravelAmmo",1,3)
TNT1 A 0 A_GiveToTarget("PortCheckerSoundOff",1)
TNT1 A 1 A_TakeFromTarget("GalaxyPortFlag",99)
stop
TNT1 A 0 A_GiveInventory("WeaponCharge",1)
goto Spawn
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"Death")
TNT1 A 0 A_TakeFromTarget("SpaceTravelAmmo",6,1)
TNT1 A 0 A_TakeInventory("WeaponCharge",999)
TNT1 A 0 A_JumpIfInTargetInventory("SpaceTravelAmmo",1,"Spawn")
TNT1 A 0 A_GiveToTarget("PortCheckerSoundOff",1)
TNT1 A 1 A_TakeFromTarget("GalaxyPortFlag",99)
stop
Death:
TNT1 A 1 A_TakeFromTarget("GalaxyPortFlag",99)
stop
}
}

actor PortChecker
{
-SOLID
+NOGRAVITY
+DONTBLAST
+THRUACTORS
+NOINTERACTION
+FORCEXYBILLBOARD
+BRIGHT
height 1
radius 1
scale 2.0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 Thing_ChangeTID(0,6000+ACS_ExecuteWithResult(257, 0))
Spawn2:
BLKT WWXXYYZZ 1
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"SuperDeath")
TNT1 A 0 A_JumpIfInTargetInventory("GalaxyPortFlag",1,"Spawn2")
goto SuperDeath
SuperDeath:
TNT1 A 0 A_PlaySoundEx("misc/astroplatformappear","Body")
//TNT1 A 0 A_TakeFromTarget("GalaxyPortFlag",999)
BLKT WWXXYYZZ 1 A_FadeOut(0.1)
TNT1 A 0 A_JumpIfInTargetInventory("GalaxyPortFlag",1,"EmergancyRecoveryMode")
stop
EmergancyRecoveryMode:
BLKT WWXXYYZZ 1 A_FadeIn(0.1)
goto Spawn2
}
}

actor PortCheckerSoundOff : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("GalaxyPortCoolDown",1)
TNT1 A 0 A_PlaySoundEX("weapon/shieldhum","SoundSlot7")
stop
}
}

actor GalaxyHoleMarker : MapMarker
{
height 0
radius 0
//+CLIENTSIDEONLY
+NOINTERACTION
+NOGRAVITY
-SOLID
+BRIGHT
States
{
Spawn:
BLKH BBCCDDEE 1
TNT1 A 0 A_JumpIfInTargetInventory("GalaxyPortFlag",1,"Spawn")
BLKH BBCCDDEEBBCCDDEE 1 A_FadeOut(0.1)
stop
}
}


actor GalaxymanPortalWarperFX_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Warp(2,0,0,32,0,24)
TNT1 A 0 A_SetScale(ScaleX-0.2)
TNT1 A 0 A_FadeOut(0.05)
stop
}
}

actor GalaxymanPortalWarperFX : ShieldWarper_CBM
{
Renderstyle translucent
Alpha 1.0
Scale 2.0
+BRIGHT
States
{
Spawn:
9P_H A 0
9P_H AABBAABBAA 1 A_GiveInventory("GalaxymanPortalWarperFX_P",1)
stop
}
}

actor BlackHoleBombPewPew
{
Translation "192:192=59:59","198:198=62:62"
PROJECTILE
damagetype "GalaxyM_Shot"
Obituary "$OB_BLACKHOLEPEW"
+THRUSPECIES
+FORCEXYBILLBOARD
+BRIGHT
Species "DumbBlackHole"
Damage (130)
Speed 27
radius 10
height 10
scale 1.5
States
{
Spawn:
TNT1 A 1
BLKH BBCCDDEE 1 A_SpawnItemEx("BlackHoleBombXFX3",0,0,0,random(-1,-4),random(2,-2),random(2,-2),0,1)
goto spawn+1
}
}

actor BlackHoleBombPewPew1 : BlackHoleBombPewPew{Translation"192:192=205:205","198:198=206:206"}
actor BlackHoleBombPewPew2 : BlackHoleBombPewPew{Translation"192:192=103:103","198:198=116:116"}
actor BlackHoleBombPewPew3 : BlackHoleBombPewPew{Translation"192:192=106:106","198:198=111:111"}
actor BlackHoleBombPewPew4 : BlackHoleBombPewPew{Translation"192:192=248:248","198:198=230:230"}
actor BlackHoleBombPewPew5 : BlackHoleBombPewPew{Translation"192:192=225:225","198:198=227:227"}
actor BlackHoleBombPewPew6 : BlackHoleBombPewPew{Translation"192:192=38:38","198:198=40:40"}
actor BlackHoleBombPewPew7 : BlackHoleBombPewPew{Translation"192:192=57:57","198:198=60:60"}

actor BlackHoleBombPewPewB : BlackHoleBombPewPew{Translation "192:192=205:205","198:198=74:74"}
actor BlackHoleBombPewPewR : BlackHoleBombPewPew{Translation "192:192=171:171","198:198=41:41"}
actor BlackHoleBombPewPewO : BlackHoleBombPewPew{Translation "192:192=104:104","198:198=128:128"}
actor BlackHoleBombPewPewP : BlackHoleBombPewPew{Translation "192:192=229:229","198:198=232:232"}

actor BlackHoleBombX
{
Translation "192:192=59:59","198:198=62:62"//250 251
var int user_S;
DeathSound "weapon/blackholebombdetonateC"
PROJECTILE
Obituary "$OB_BLACKHOLEBOMB"
damagetype "GalaxyM_BHB"
+NOTARGETSWITCH
+FORCEXYBILLBOARD
+BRIGHT
+SKYEXPLODE
+EXPLODEONWATER
+RIPPER
+DONTBLAST
+THRUSPECIES
Species "DumbBlackHole"
damage (0)
Radius 15
Height 8
speed 11
scale 2.5
States
{
Spawn:
BLKH B 0
BLKH B 0 ACS_ExecuteAlways(259,0,1)
BLKH B 0 A_PlaySoundEx("weapon/blackholebombC","Voice",1)
Spawn2:
BLKH BB 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
BLKH B 0 ACS_ExecuteAlways(259,0,1)
BLKH B 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
BLKH BB 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
BLKH B 0 ACS_ExecuteAlways(259,0,1)
BLKH B 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)

BLKH CC 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
BLKH C 0 ACS_ExecuteAlways(259,0,1)
BLKH C 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
BLKH CC 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
BLKH C 0 ACS_ExecuteAlways(259,0,1)
BLKH C 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
BLKH C 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")

BLKH DD 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
BLKH B 0 ACS_ExecuteAlways(259,0,1)
BLKH B 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
BLKH DD 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
BLKH B 0 ACS_ExecuteAlways(259,0,1)
BLKH B 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)

BLKH EE 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
BLKH E 0 ACS_ExecuteAlways(259,0,1)
BLKH E 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
BLKH EE 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
BLKH E 0 ACS_ExecuteAlways(259,0,1)
BLKH E 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
BLKH E 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
Next:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("BlackHoleX",0,0,0,0,0,0,0,33)
//TNT1 A 1 A_StopSound(4)
stop
Death:
TNT1 A 0 A_SpawnItemEx("BlackHoleBombXDeath",0,0,0,0,0,0,0,33)
TNT1 A 0 A_TakeFromTarget("MissingBlackHole",999)
TNT1 A 0 A_TakeFromTarget("BlackHoleFlagD",999)
TNT1 A 0 A_TakeFromTarget("BlackHoleFlag",999)
//TNT1 A 1 A_StopSound(4)
stop
}
}

actor BlackHoleBombXB : BlackHoleBombX{translation "192:192=205:205","198:198=74:74"}
actor BlackHoleBombXR : BlackHoleBombX{translation "192:192=171:171","198:198=41:41"}
actor BlackHoleBombXO : BlackHoleBombX{translation "192:192=104:104","198:198=128:128"}
actor BlackHoleBombXP : BlackHoleBombX{translation "192:192=229:229","198:198=232:232"}

actor BlackHoleBombXBot : BlackHoleBombX
{
-RIPPER
+SEEKERMISSILE
+SCREENSEEKER
ReactionTime 10
scale 2.5
States
{
Spawn:
BLKH B 0
BLKH B 0 A_PlaySoundEx("weapon/blackholebombC","Voice",1)
Spawn2:
BLKH BBBBCCCC 1 A_SeekerMissile(2,10,3,96,3)
BLKH D 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"SuperDeath")
BLKH DDDDEEEE 1 A_SeekerMissile(2,10,3,96,3)
BLKH B 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"SuperDeath")
BLKH B 0 A_CountDown
loop
SuperDeath:
goto Super::Death
Death:
TNT1 A 0
goto Next
}
}

actor BlackHoleBombXBotB : BlackHoleBombXBot{translation "192:192=205:205","198:198=74:74"}
actor BlackHoleBombXBotR : BlackHoleBombXBot{translation "192:192=171:171","198:198=41:41"}
actor BlackHoleBombXBotO : BlackHoleBombXBot{translation "192:192=104:104","198:198=128:128"}
actor BlackHoleBombXBotP : BlackHoleBombXBot{translation "192:192=229:229","198:198=232:232"}

actor BlackHoleBombXDeath : BasicExplosion
{
Obituary "$OB_BLACKHOLEBOMBX"
damagetype "GalaxyM_Shot"
+FORCEXYBILLBOARD
+BRIGHT
ReactionTime 4
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 //A_PlaySoundEx("weapon/blackholebombdetonateC","Body")
9P_H A 0 A_Explode(100,96,0,0,48)
Spawn2:
9P_H ACBD 1
9P_H A 0 A_CountDown
9P_H A 0 A_SetScale(ScaleX-0.5)
loop
//9P_H ABABABABAB 2 A_SetScale(ScaleX-0.2)
//stop
}
}

actor GalaxyM_BHBProtect : PowerProtection
{
Powerup.Duration 8
DamageFactor "GalaxyM_BHB", 0.09
}

actor GalaxyM_BHBProtect4 : PowerProtection
{
Powerup.Duration 4
DamageFactor "GalaxyM_BHB", 0.0
}

actor PowerGalaxyBHB_ACS : PowerSpeed
{
Speed 2.1
powerup.duration 8
+POWERSPEED.NOTRAIL
}

actor BlackHoleX
{
PROJECTILE
Obituary "$OB_BLACKHOLEBOMB"
damagetype "GalaxyM_BHB"
+NOINTERACTION
+FORCEXYBILLBOARD
+BRIGHT
+THRUACTORS
+NOTARGETSWITCH
+THRUSPECIES
Species "DumbBlackHole"
reactiontime 5
damage (0)
Radius 2
Height 2
Scale 3.0
States
{
Spawn:
BLKH F 0
BLKH F 0 A_TakeFromTarget("MissingBlackHole",999)
BLKH F 0 A_TakeFromTarget("BlackHoleFlag",999)
BLKH F 0 A_TakeFromTarget("BlackHoleFlagD",999)
BLKH F 0 A_GiveToTarget("BlackHoleBombCooldown",1)
BLKH F 0 A_PlaySound("weapon/blackholebombdetonateC",2,1,1)
Spawn2:
BLKH F 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
BLKH FFGG 1 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH H 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
BLKH H 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
BLKH HHII 1 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH J 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
BLKH J 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
BLKH JJKK 1 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH L 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
BLKH L 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
BLKH LLMM 1 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH N 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
BLKH N 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
BLKH NNOO 1 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH P 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
BLKH P 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
BLKH PPQQ 1 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH F 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
BLKH F 0 A_CountDown
loop
Death:
TNT1 A 0 ACS_NamedExecuteAlways("cbm_GalaxyBHB_ACSEnd",0,224)
TNT1 A 1 A_PlaySound("weapon/BlackHoleBombPoof",1,0.75)
TNT1 A 0 A_TakeFromTarget("BlackHoleBombCooldown",999)
X_9H X 3
TNT1 A 1
X_9H Y 3
TNT1 A 1 A_StopSound(2)
X_9H Z 3
TNT1 A 1
X_9H X 2
TNT1 A 1
X_9H Y 2
TNT1 A 1
X_9H Z 2
TNT1 A 1
X_9H X 1
TNT1 A 1
X_9H Y 1
TNT1 A 1
X_9H Z 1
TNT1 A 1
stop
}
}

actor BlackHoleXPlayerEnd_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"Pickup_J")
stop
Pickup_J:
TNT1 A 0 A_ChangeVelocity(momx,momy,11,2)
stop
}
}

actor BlackHoleX_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("BlackHoleX_Damager",0,0,16)
TNT1 A 0 ACS_NamedExecuteAlways("cbm_GalaxyBHB_ACS",0,4,8,224)//cbm_GalaxyBHB_ACS",0,4,22,224
stop
}
}


actor BlackHoleX_Damager : BasicExplosion
{
Obituary "$OB_BLACKHOLEBOMB"
damagetype "GalaxyM_BHB"
//+EXPLODEONDEATH
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(0,24,0,0,24)
TNT1 A 0 A_Explode(220,24,0,0,24)
TNT1 A 4
stop
}
}

actor BlackHoleXHelperFX : BasicClientSide
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0
TNT1 A 0 A_SetPitch(random(-1,1)*10)//(random(0,1)*2-1)
TNT1 AA 0 //A_SpawnItemEx("BlackHoleBombXFX1",0,0,0,Cos(pitch)*224,0,-sin(pitch)*224,random(0,359),513)
TNT1 AA 0 A_SpawnItemEx("BlackHoleBombXFX1",Cos(pitch)*224,0,-sin(pitch)*224,0,0,0,random(0,359),513)
TNT1 A 1
TNT1 A 0 A_SetPitch(random(2,5)*10)
TNT1 A 0 A_SpawnItemEx("BlackHoleBombXFX1",Cos(pitch)*224,0,-sin(pitch)*224,0,0,0,random(0,359),513)
TNT1 A 0 A_SetPitch(random(-2,-4)*10)
TNT1 A 0 A_SpawnItemEx("BlackHoleBombXFX1",Cos(pitch)*224,0,-sin(pitch)*224,0,0,0,random(0,359),513)
TNT1 A 1
TNT1 A 0 A_SetPitch(random(5,9)*10)
TNT1 A 0 A_SpawnItemEx("BlackHoleBombXFX1",Cos(pitch)*224,0,-sin(pitch)*224,0,0,0,random(0,359),513)
TNT1 A 0 A_SetPitch(random(-5,-9)*10)
TNT1 A 0 A_SpawnItemEx("BlackHoleBombXFX1",Cos(pitch)*224,0,-sin(pitch)*224,0,0,0,random(0,359),513)
TNT1 A 1
TNT1 A 0 A_SetPitch(random(-9,9)*10)
TNT1 AA 0 A_SpawnItemEx("BlackHoleBombXFX1",Cos(pitch)*224,0,-sin(pitch)*224,0,0,0,random(0,359),513)
TNT1 A 1
stop
}
}

actor BlackHoleBombXFX : BasicClientSide
{
+FORCEXYBILLBOARD
+BRIGHT
States
{
Spawn:
BLKH TS 3
BLKH S 0 A_ChangeVelocity(-16,0,0,3)
BLKH RRRRRRRRRRRR 1 A_SpawnItemEx("BlackHoleBombXFX2",0,0,0,momx/1.5,momy/1.5,0,0,9)
stop
}
}

actor BlackHoleBombXFX1 : BlackHoleBombXFX
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 //A_ScaleVelocity(0.00390625)
BLKH TS 3
BLKH S 0 A_ChangeVelocity(Cos(pitch)*-14,0,-sin(pitch)*-14,3)//A_ScaleVelocity(-16.0)
BLKH RRRRRRRRRRRR 1 A_SpawnItemEx("BlackHoleBombXFX2",0,0,0,momx/1.5,momy/1.5,momz/1.5,0,9+16384)
stop
}
}

actor BlackHoleBombXFX2 : BlackHoleBombXFX
{
States
{
Spawn:
BLKH R 5
stop
}
}

actor BlackHoleBombXFX3 : BlackHoleBombXFX
{
Scale 1.5
States
{
Spawn:
BLKH TSRRR 3
stop
}
}

actor GalaxyRam : BasicExplosion
{
damagetype "GalaxyM_Ram"
Obituary "$OB_GALAXYRAM"
States
{
Spawn:
TNT1 A 0 
TNT1 A 1 A_Explode(40,84,0,0,24)
stop
}
}

actor GalaxymanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombX",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXP",0,0,0,0)
goto Done
}
}

actor GalaxymanMainBot_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXBot",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXBotB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXBotR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXBotO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombXBotP",0,0,0,0)
goto Done
}
}

actor GalaxymanMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_GiveInventory("GalaxymanMainX_CI",1)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPewB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPewR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPewO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPewP",0,0,0,0)
goto Done
}
}

actor GalaxymanMainX_CI : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Jump(256,1,2,3,4,5,6,7,8)
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew1",0,0,0,0)
stop
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew2",0,0,0,0)
stop
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew3",0,0,0,0)
stop
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew4",0,0,0,0)
stop
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew5",0,0,0,0)
stop
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew6",0,0,0,0)
stop
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew7",0,0,0,0)
stop
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew",0,0,0,0)
stop
}
}