actor Galaxyman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_9H"
dropitem "RainbowGalaxyWep"
Weapon.AmmoUse 0
Weapon.AmmoGive 56
Obituary "$OB_BLACKHOLEBOMB"
Inventory.Pickupmessage " "
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

Deselect:
9H_H A 0
goto DeselectSwap
Select:
9H_H A 0
goto SelectSwap

Ready:
9H_H A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_GALAXYMAN)
9H_H A 0 A_GunFlash("Flash",1)
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_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN1,TINT_GLXY1)//TCLR_NONE
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN7,TINT_GLXY2)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN6,TINT_GLXY3)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN5,TINT_GLXY4)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN4,TINT_GLXY5)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN3,TINT_GLXY6)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN2,TINT_GLXY7)

TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN1,TINT_GLXY7)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN7,TINT_GLXY6)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN6,TINT_GLXY5)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN5,TINT_GLXY4)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN4,TINT_GLXY3)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN3,TINT_GLXY2)
TNT1 A 2 A_RailWait
TNT1 A 2 ACS_NamedExecuteWithResult("core_chargecolor",DYE_GALAXYMAN2,TINT_GLXY1)
goto Flash+1

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_FireCustomMissile("BlackHoleBombX",0,0,0,0)
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("Galaxyman_W2",1)
9H_H A 1 A_SelectWeapon("Galaxyman_W2")
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("MissingGalaxyBHB",1,"Fire2Reset")
9H_H A 0 A_GiveInventory("BlackHoleFlagD",1)
9H_H A 0 A_GiveInventory("MissingGalaxyBHB",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("MissingGalaxyBHB",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 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
9H_H A 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,2)
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 ThrustThingZ(0,2,0,1)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",3)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",6,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 ThrustThingZ(0,2,0,1)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",3)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",6,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")
9H_H C 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
9H_H C 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,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 ACS_NamedExecuteWithResult("core_setactorproperty",APROP_RenderStyle,STYLE_Add,65536)
"####" 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_GiveInventory("CBM_90_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("CBM_00_AlphaPowerGiver",1)
"####" A 1 A_GiveInventory("Galaxyman_AltPort_P1")
"####" A 1 A_GiveInventory("Galaxyman_AltPort_P2")
"####" A 1 A_GiveInventory("Galaxyman_AltPort_P23",1)
"####" A 1 A_GiveInventory("Galaxyman_AltPort_P45",1)
"####" A 1 A_GiveInventory("Galaxyman_AltPort_P67",1)
"####" A 1 A_GiveInventory("Galaxyman_AltPort_P89",1)
"####" A 4
goto Ready0


GalaxyTeleport_1:
"####" D 1 A_GiveInventory("CBM_90_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_00_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("Galaxyman_AltPort_P1")
"####" J 1 A_GiveInventory("Galaxyman_AltPort_P2")
"####" M 1 A_GiveInventory("Galaxyman_AltPort_P23",1)
"####" M 1 A_GiveInventory("Galaxyman_AltPort_P45",1)
"####" M 1 A_GiveInventory("Galaxyman_AltPort_P67",1)
"####" M 1 A_GiveInventory("Galaxyman_AltPort_P89",1)
"####" P 4 A_TakeInventory("GalaxyHudFlag",5)
goto ReadyC
GalaxyTeleport_2:
"####" G 1 A_GiveInventory("CBM_90_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_00_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("Galaxyman_AltPort_P1")
"####" M 1 A_GiveInventory("Galaxyman_AltPort_P2")
"####" P 1 A_GiveInventory("Galaxyman_AltPort_P23",1)
"####" P 1 A_GiveInventory("Galaxyman_AltPort_P45",1)
"####" P 1 A_GiveInventory("Galaxyman_AltPort_P67",1)
"####" P 1 A_GiveInventory("Galaxyman_AltPort_P89",1)
"####" S 4 A_TakeInventory("GalaxyHudFlag",5)
goto ReadyC
GalaxyTeleport_3:
"####" J 1 A_GiveInventory("CBM_90_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
"####" J 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_00_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("Galaxyman_AltPort_P1")
"####" P 1 A_GiveInventory("Galaxyman_AltPort_P2")
"####" S 1 A_GiveInventory("Galaxyman_AltPort_P23",1)
"####" S 1 A_GiveInventory("Galaxyman_AltPort_P45",1)
"####" S 1 A_GiveInventory("Galaxyman_AltPort_P67",1)
"####" S 1 A_GiveInventory("Galaxyman_AltPort_P89",1)
"####" V 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC
GalaxyTeleport_4:
"####" M 1 A_GiveInventory("CBM_90_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
"####" M 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_00_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("Galaxyman_AltPort_P1")
"####" S 1 A_GiveInventory("Galaxyman_AltPort_P2")
"####" V 1 A_GiveInventory("Galaxyman_AltPort_P23",1)
"####" V 1 A_GiveInventory("Galaxyman_AltPort_P45",1)
"####" V 1 A_GiveInventory("Galaxyman_AltPort_P67",1)
"####" V 1 A_GiveInventory("Galaxyman_AltPort_P89",1)
"####" D 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC
GalaxyTeleport_5:
"####" P 1 A_GiveInventory("CBM_90_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
"####" P 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_00_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("Galaxyman_AltPort_P1")
"####" V 1 A_GiveInventory("Galaxyman_AltPort_P2")
"####" D 1 A_GiveInventory("Galaxyman_AltPort_P23",1)
"####" D 1 A_GiveInventory("Galaxyman_AltPort_P45",1)
"####" D 1 A_GiveInventory("Galaxyman_AltPort_P67",1)
"####" D 1 A_GiveInventory("Galaxyman_AltPort_P89",1)
"####" G 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC
GalaxyTeleport_6:
"####" S 1 A_GiveInventory("CBM_90_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
"####" S 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_00_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("Galaxyman_AltPort_P1")
"####" D 1 A_GiveInventory("Galaxyman_AltPort_P2")
"####" G 1 A_GiveInventory("Galaxyman_AltPort_P23",1)
"####" G 1 A_GiveInventory("Galaxyman_AltPort_P45",1)
"####" G 1 A_GiveInventory("Galaxyman_AltPort_P67",1)
"####" G 1 A_GiveInventory("Galaxyman_AltPort_P89",1)
"####" J 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC
GalaxyTeleport_7:
"####" V 1 A_GiveInventory("CBM_90_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_80_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_70_AlphaPowerGiver",1)
"####" V 1 A_GiveInventory("CBM_60_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_50_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_40_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_30_AlphaPowerGiver",1)
"####" D 1 A_GiveInventory("CBM_20_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_10_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("CBM_00_AlphaPowerGiver",1)
"####" G 1 A_GiveInventory("Galaxyman_AltPort_P1")
"####" G 1 A_GiveInventory("Galaxyman_AltPort_P2")
"####" J 1 A_GiveInventory("Galaxyman_AltPort_P23",1)
"####" J 1 A_GiveInventory("Galaxyman_AltPort_P45",1)
"####" J 1 A_GiveInventory("Galaxyman_AltPort_P67",1)
"####" J 1 A_GiveInventory("Galaxyman_AltPort_P89",1)
"####" M 4 A_GiveInventory("GalaxyHudFlag",2)
goto ReadyC

}
}

actor Galaxyman_W2 : Galaxyman_W
{
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

Deselect:
9H_I A 0
goto DeselectSwap
Select:
9H_I A 0
goto SelectSwap

Ready:
9H_I A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_GALAXYMAN)
9H_I A 0 A_GunFlash("Flash",1)
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

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 2 A_GiveInventory("Galaxyman_Fire2_P")
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_FireCustomMissile("BlackHoleBombXBot",0,0,0,0)
9H_I A 0 A_TakeInventory("WeaponCharge")
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 EF 2
9H_I I 2 offset(-50,-7)
9H_I I 2 A_GiveInventory("Galaxyman_Fire2_P")
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 HI 2
9H_I L 2 offset(-50,-7)
9H_I L 2 A_GiveInventory("Galaxyman_Fire2_P")
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 KL 2
9H_I O 2 offset(-50,-7)
9H_I O 2 A_GiveInventory("Galaxyman_Fire2_P")
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 NO 2
9H_I R 2 offset(-50,-7)
9H_I R 2 A_GiveInventory("Galaxyman_Fire2_P")
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 QR 2
9H_I U 2 offset(-50,-7)
9H_I U 2 A_GiveInventory("Galaxyman_Fire2_P")
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 TU 2
9H_I X 2 offset(-50,-7)
9H_I X 2 A_GiveInventory("Galaxyman_Fire2_P")
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 WX 2
9H_I F 2 offset(-50,-7)
9H_I F 2 A_GiveInventory("Galaxyman_Fire2_P")
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 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
9H_I A 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,2)
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 ThrustThingZ(0,2,0,1)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",3)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",6,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 ThrustThingZ(0,2,0,1)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",3)
TNT1 A 0 A_TakeInventory("SpaceTravelAmmo",6,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")
9H_I C 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
9H_I C 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,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 MissingGalaxyBHB : 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 Galaxyman_Fire2_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("GalaxyHudFlag")
TNT1 A 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
TNT1 A 0 A_FireCustomMissile("BlackHoleBombPewPew",0,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
UseCBM:
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 Galaxyman_AltPort_P1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEON)
TNT1 A 0 A_GiveInventory("Nudge",1)
TNT1 A 0 Thing_Move(tid,-8700-tid,1)
stop
}
}

actor Galaxyman_AltPort_P2 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteWithResult("core_invisibleplayer",0,false)
TNT1 A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEOFF_DAMAGE,CallACS("core_getmaxhealth")/10)
TNT1 A 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)

TNT1 A 0 A_TakeInventory("CBM_00_AlphaPower")
TNT1 A 0 A_TakeInventory("CBM_10_AlphaPower")
stop
}
}
actor Galaxyman_AltPort_P23 : CustomInventory{States{Pickup:TNT1 A 0 A_TakeInventory("CBM_20_AlphaPower")TNT1 A 0 A_TakeInventory("CBM_30_AlphaPower")stop}}
actor Galaxyman_AltPort_P45 : CustomInventory{States{Pickup:TNT1 A 0 A_TakeInventory("CBM_40_AlphaPower")TNT1 A 0 A_TakeInventory("CBM_50_AlphaPower")stop}}
actor Galaxyman_AltPort_P67 : CustomInventory{States{Pickup:TNT1 A 0 A_TakeInventory("CBM_60_AlphaPower")TNT1 A 0 A_TakeInventory("CBM_70_AlphaPower")stop}}
actor Galaxyman_AltPort_P89 : CustomInventory{States{Pickup:TNT1 A 0 A_TakeInventory("CBM_80_AlphaPower")TNT1 A 0 A_TakeInventory("CBM_90_AlphaPower")
TNT1 A 0 ACS_NamedExecuteWithResult("core_setactorproperty",APROP_RenderStyle,STYLE_Translucent,65536)
stop}}

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",3)
TNT1 A 0 A_TakeFromTarget("SpaceTravelAmmo",3,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 : ProjSpawnFuncActor
{
-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,-8700-CallACS("core_gettarget"))
Spawn2:
9P_H 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)
9P_H WWXXYYZZ 1 A_FadeOut(0.1)
TNT1 A 0 A_JumpIfInTargetInventory("GalaxyPortFlag",1,"EmergancyRecoveryMode")
stop
EmergancyRecoveryMode:
9P_H 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
{
+USESPAWNEVENTSCRIPT
var int user_UseProjSpawnFunc;
height 0
radius 0
//+CLIENTSIDEONLY
+NOINTERACTION
+NOGRAVITY
-SOLID
+BRIGHT
States
{
Spawn:
Q_9H BBCCDDEE 1
TNT1 A 0 A_JumpIfInTargetInventory("GalaxyPortFlag",1,"Spawn")
Q_9H 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:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
9P_H AABBAABBAA 1 A_GiveInventory("GalaxymanPortalWarperFX_P",1)
stop
}
}

actor BlackHoleBombPewPew : ProjSpawnFuncActor
{
PROJECTILE
damagetype "GalaxyM_Shot"
Obituary "$OB_BLACKHOLEPEW"
+THRUSPECIES
+FORCEXYBILLBOARD
+BRIGHT
Species "DumbBlackHole"
Damage (130)
radius 10
height 15
Speed 27
scale 1.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56)
S1:
XH0Q AABBCCDD 1 A_SpawnItemEx("BlackHoleBombPew1",0,0,6,random(-1,-4),random(2,-2),random(2,-2),0,1)
loop
S2:
XH0Q HHIIJJKK 1 A_SpawnItemEx("BlackHoleBombPew2",0,0,6,random(-1,-4),random(2,-2),random(2,-2),0,1)
loop
S3:
XH0Q OOPPQQRR 1 A_SpawnItemEx("BlackHoleBombPew3",0,0,6,random(-1,-4),random(2,-2),random(2,-2),0,1)
loop
S4:
XH0Q VVWWXXYY 1 A_SpawnItemEx("BlackHoleBombPew4",0,0,6,random(-1,-4),random(2,-2),random(2,-2),0,1)
loop
S5:
XH0R HHIIJJKK 1 A_SpawnItemEx("BlackHoleBombPew5",0,0,6,random(-1,-4),random(2,-2),random(2,-2),0,1)
loop
S6:
XH0R OOPPQQRR 1 A_SpawnItemEx("BlackHoleBombPew6",0,0,6,random(-1,-4),random(2,-2),random(2,-2),0,1)
loop
S7:
XH0R VVWWXXYY 1 A_SpawnItemEx("BlackHoleBombPew7",0,0,6,random(-1,-4),random(2,-2),random(2,-2),0,1)
loop
}
}
actor BlackHoleBombPew : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
Scale 1.5
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_SetScale(ScaleX+0.25-random(0,5)*0.05)
TNT1 AA 1 A_Jump(256,"FX")
stop
}
}
actor BlackHoleBombPew1 : BlackHoleBombPew{States{FX:XH0Q EFG random(2,3) A_ScaleVelocity(1.25)stop}}
actor BlackHoleBombPew2 : BlackHoleBombPew{States{FX:XH0Q LMN random(2,3) A_ScaleVelocity(1.25)stop}}
actor BlackHoleBombPew3 : BlackHoleBombPew{States{FX:XH0Q STU random(2,3) A_ScaleVelocity(1.25)stop}}
actor BlackHoleBombPew4 : BlackHoleBombPew{States{FX:XH0Q "Z[]" random(2,3) A_ScaleVelocity(1.25)stop}}
actor BlackHoleBombPew5 : BlackHoleBombPew{States{FX:XH0R LMN random(2,3) A_ScaleVelocity(1.25)stop}}
actor BlackHoleBombPew6 : BlackHoleBombPew{States{FX:XH0R STU random(2,3) A_ScaleVelocity(1.25)stop}}
actor BlackHoleBombPew7 : BlackHoleBombPew{States{FX:XH0R "Z[]" random(2,3) A_ScaleVelocity(1.25)stop}}


actor BlackHoleBombX : ProjSpawnFuncActor
{
var int user_S;
DeathSound "weapon/blackholebombdetonateC"
PROJECTILE
Obituary "$OB_BLACKHOLEBOMB"
damagetype "GalaxyM_BHB"
+NOTARGETSWITCH
+FORCEXYBILLBOARD
+BRIGHT
+SKYEXPLODE
+EXPLODEONWATER
+RIPPER
+DONTBLAST
+THRUSPECIES
+DONTREFLECT
Species "DumbBlackHole"
damage (0)
Radius 15
Height 8
speed 11
scale 2.5
States
{
Spawn:
Q_9H B 0
Q_9H B 0 //ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H B 0 A_PlaySoundEx("weapon/blackholebombC","Voice",1)
Spawn2:
Q_9H BB 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
Q_9H B 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H B 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
Q_9H BB 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
Q_9H B 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H B 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)

Q_9H CC 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
Q_9H C 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H C 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
Q_9H CC 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
Q_9H C 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H C 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
Q_9H C 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")

Q_9H DD 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
Q_9H B 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H B 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
Q_9H DD 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
Q_9H B 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H B 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)

Q_9H EE 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
Q_9H E 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H E 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
Q_9H EE 1 A_JumpIfInTargetInventory("BlackHoleFlagD",1,"Next")
Q_9H E 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
Q_9H E 0 A_ChangeVelocity(cos(-pitch)*11,0,sin(-pitch)*11,3)
Q_9H E 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"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("MissingGalaxyBHB",999)
TNT1 A 0 A_TakeFromTarget("BlackHoleFlagD",999)
TNT1 A 0 A_TakeFromTarget("BlackHoleFlag",999)
//TNT1 A 1 A_StopSound(4)
stop
}
}

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

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 GalaxyM_BHB_EscapeHastenGiver : PowerApropGiver {}
actor GalaxyM_BHB_EscapeHasten : Powerup//PowerSpeed
{
//Speed 2.1
powerup.duration 8
//+POWERSPEED.NOTRAIL
}

actor BlackHoleX : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_BLACKHOLEBOMB"
damagetype "GalaxyM_BHB"
+NOINTERACTION
+FORCEXYBILLBOARD
+BRIGHT
+THRUACTORS
+NOTARGETSWITCH
+THRUSPECIES
+DONTREFLECT
Species "DumbBlackHole"
reactiontime 5
damage (0)
Radius 2
Height 2
Scale 3.0
States
{
Spawn:
TNT1 A 0
Q_9H F 0 A_TakeFromTarget("MissingGalaxyBHB",999)
Q_9H F 0 A_TakeFromTarget("BlackHoleFlag",999)
Q_9H F 0 A_TakeFromTarget("BlackHoleFlagD",999)
Q_9H F 0 A_GiveToTarget("BlackHoleBombCooldown",1)
Q_9H F 0 A_PlaySound("weapon/blackholebombdetonateC",2,1,1)
Spawn2:
Q_9H F 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
Q_9H FFGG 1 A_GiveInventory("BlackHoleX_Pickup",1)
Q_9H H 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
Q_9H H 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
Q_9H HHII 1 A_GiveInventory("BlackHoleX_Pickup",1)
Q_9H J 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
Q_9H J 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
Q_9H JJKK 1 A_GiveInventory("BlackHoleX_Pickup",1)
Q_9H L 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
Q_9H L 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
Q_9H LLMM 1 A_GiveInventory("BlackHoleX_Pickup",1)
Q_9H N 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
Q_9H N 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
Q_9H NNOO 1 A_GiveInventory("BlackHoleX_Pickup",1)
Q_9H P 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
Q_9H P 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
Q_9H PPQQ 1 A_GiveInventory("BlackHoleX_Pickup",1)
Q_9H F 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
Q_9H 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)
Q_9H X 3
TNT1 A 1
Q_9H Y 3
TNT1 A 1 A_StopSound(2)
Q_9H Z 3
TNT1 A 1
Q_9H X 2
TNT1 A 1
Q_9H Y 2
TNT1 A 1
Q_9H Z 2
TNT1 A 1
Q_9H X 1
TNT1 A 1
Q_9H Y 1
TNT1 A 1
Q_9H Z 1
TNT1 A 1
stop
}
}

actor BlackHoleXPlayerEnd_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("cbm_GetPointerButtonInput",0,false) & BT_JUMP,"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 : BasicImplosion
{
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 : BasicGraphicEffect
{
States
{
SpawnFrame:
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),1+512)
TNT1 AA 0 A_SpawnItemEx("BlackHoleBombXFX1",Cos(pitch)*224,0,-sin(pitch)*224,0,0,0,random(0,359),1+512)
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),1+512)
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),1+512)
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),1+512)
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),1+512)
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),1+512)
TNT1 A 1
stop
}
}

actor BlackHoleBombXFX : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
States
{
SpawnFrame:
Q_9H TS 3
Q_9H S 0 A_ChangeVelocity(-16,0,0,3)
Q_9H RRRRRRRRRRRR 1 A_SpawnItemEx("BlackHoleBombXFX2",0,0,0,momx/1.5,momy/1.5,0,0,1+8)
stop
}
}

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

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

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

actor GalaxyRam : BasicImplosion
{
damagetype "GalaxyM_Ram"
Obituary "$OB_GALAXYRAM"
States
{
Spawn:
TNT1 A 0 
TNT1 A 1 A_Explode(40+CallACS("core_checkrune",RUNE_SPREAD,2)*80,84,0,0,24)
stop
}
}


//actor Galaxyman_W_NormalBar : NormalBar {Args 59,62}
actor Galaxyman_W_ScriptBar : ScriptBar {}
actor Galaxyman_W2_ScriptBar : ScriptBar {}