actor BlackHoleBombBoss : BaseMM8BDMWep_CBM
{
dropitem "RainbowGalaxyWepCDropped"
Weapon.AmmoUse 0
Weapon.AmmoGive 56
Weapon.SlotNumber 5
Obituary "$OB_BLACKHOLEBOMB"
Inventory.Pickupmessage " "
weapon.ammotype "BlackHoleBombBossAmmo"
States
{
Spawn:
//C_09 H 1
C_09 RSTUVWX 4
loop

//GALH DGJMPSV 4 A_WeaponReady
//GALH EHKNQTW 4 A_WeaponReady
//GALH FILORUX 4 A_WeaponReady

Ready:
GALH A 0 ACS_ExecuteAlways(998,0,887)
GALH A 0 A_GunFlash
GALH A 0 A_GiveInventory("SpawningMisfire",1)
GALH A 0 A_GiveInventory("GalaxyHudFlag",14)
goto Ready1
Ready1:
GALH A 2 A_WeaponReady
GALH A 0 A_TakeInventory("SpawningMisfire",1)
Goto Ready2
SpawnProtect:
GALH A 1
Goto Ready1

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

GALH D 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Ready3")//7
GALH D 4 A_WeaponReady(8)//WRF_NOSECONDARY
GALH D 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH D 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH D 0 A_TakeInventory("GalaxyHudFlag",1)

GALH G 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Ready3")//6
GALH G 4 A_WeaponReady(8)
GALH G 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH G 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH G 0 A_TakeInventory("GalaxyHudFlag",1)

GALH J 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Ready3")//5
GALH J 4 A_WeaponReady(8)
GALH J 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH J 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH J 0 A_TakeInventory("GalaxyHudFlag",1)

GALH M 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Ready3")//4
GALH M 4 A_WeaponReady(8)
GALH M 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH M 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH M 0 A_TakeInventory("GalaxyHudFlag",1)

GALH P 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Ready3")//3
GALH P 4 A_WeaponReady(8)
GALH P 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH P 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH P 0 A_TakeInventory("GalaxyHudFlag",1)

GALH S 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Ready3")//2
GALH S 4 A_WeaponReady(8)
GALH S 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH S 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH S 0 A_TakeInventory("GalaxyHudFlag",1)

GALH V 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Ready3")//1
GALH V 4 A_WeaponReady(8)
GALH V 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH V 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH V 0 A_GiveInventory("GalaxyHudFlag",7)

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

GALH D 4 A_WeaponReady
GALH D 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH D 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH D 0 A_TakeInventory("GalaxyHudFlag",1)

GALH G 4 A_WeaponReady
GALH G 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH G 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH G 0 A_TakeInventory("GalaxyHudFlag",1)

GALH J 4 A_WeaponReady
GALH J 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH J 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH J 0 A_TakeInventory("GalaxyHudFlag",1)

GALH M 4 A_WeaponReady
GALH M 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH M 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH M 0 A_TakeInventory("GalaxyHudFlag",1)

GALH P 4 A_WeaponReady
GALH P 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH P 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH P 0 A_TakeInventory("GalaxyHudFlag",1)

GALH S 4 A_WeaponReady
GALH S 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH S 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH S 0 A_TakeInventory("GalaxyHudFlag",1)

GALH V 4 A_WeaponReady
GALH V 0 A_JumpIfInventory("GalaxyPortFlag",1,2)
GALH V 0 A_GiveInventory("BlackHoleBombBossAmmo",1)
GALH V 0 A_GiveInventory("GalaxyHudFlag",7)
loop

Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 4 ACS_ExecuteAlways(991,0,890)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 4 ACS_ExecuteAlways(991,0,896)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 4 ACS_ExecuteAlways(991,0,895)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 4 ACS_ExecuteAlways(991,0,894)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 4 ACS_ExecuteAlways(991,0,893)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 4 ACS_ExecuteAlways(991,0,892)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 4 ACS_ExecuteAlways(991,0,891)
loop

Deselect:
GALH A 0 A_GiveInventory("BlackHoleFlagD",1)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
GALH A 1 A_Lower
Goto Deselect+1
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
GALH A 1 A_Raise
Loop

Fire:
GALH A 0 A_JumpIfInventory("SpawningMisfire",1,"SpawnProtect")
GALH A 0 A_JumpIfInventory("GalaxyAltFlag",1,"Fire_A")
GALH A 0 A_JumpIfInventory("BlackHoleFlag",1,"Fire2")
GALH A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,"FirePew")

GALH A 0 A_GiveInventory("GalaxymanMain_CI",1)
GALH A 0 A_GiveInventory("BlackHoleFlag",1)

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

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



Fire2:
GALH A 0 A_GiveInventory("BlackHoleFlagD",1)
GALH A 0 A_JumpIfInventory("IsBot",1,"FirePew")

GALH A 0 A_JumpIfInventory("GalaxyHudFlag",7,"Fire2_1")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",6,"Fire2_2")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",5,"Fire2_3")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",4,"Fire2_4")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",3,"Fire2_5")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",2,"Fire2_6")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",1,"Fire2_7")
goto Fire2_0
Fire2_0:
GALH A 1 A_RailWait
GALH A 0 A_Refire("Fire2_0")
Goto Ready2

Fire2_1:
GALH D 1 A_RailWait
GALH D 0 A_Refire(1)
Goto Ready2
GALH D 1 A_RailWait
GALH D 0 A_Refire(1)
Goto Ready2
GALH D 1 A_RailWait
GALH D 0 A_Refire(1)
Goto Ready2
GALH D 1 A_TakeInventory("GalaxyHudFlag",1)
GALH D 0 A_Refire("Fire2_2")
Goto Ready2
Fire2_2:
GALH G 1 A_RailWait GALH G 0 A_Refire(1)Goto Ready2
GALH G 1 A_RailWait GALH G 0 A_Refire(1)Goto Ready2
GALH G 1 A_RailWait GALH G 0 A_Refire(1)Goto Ready2
GALH G 1 A_TakeInventory("GalaxyHudFlag",1)GALH G 0 A_Refire("Fire2_3")Goto Ready2
Fire2_3:
GALH J 1 A_RailWait GALH J 0 A_Refire(1)Goto Ready2
GALH J 1 A_RailWait GALH J 0 A_Refire(1)Goto Ready2
GALH J 1 A_RailWait GALH J 0 A_Refire(1)Goto Ready2
GALH J 1 A_TakeInventory("GalaxyHudFlag",1)GALH J 0 A_Refire("Fire2_4")Goto Ready2
Fire2_4:
GALH M 1 A_RailWait GALH M 0 A_Refire(1)Goto Ready2
GALH M 1 A_RailWait GALH M 0 A_Refire(1)Goto Ready2
GALH M 1 A_RailWait GALH M 0 A_Refire(1)Goto Ready2
GALH M 1 A_TakeInventory("GalaxyHudFlag",1)GALH M 0 A_Refire("Fire2_5")Goto Ready2
Fire2_5:
GALH P 1 A_RailWait GALH P 0 A_Refire(1)Goto Ready2
GALH P 1 A_RailWait GALH P 0 A_Refire(1)Goto Ready2
GALH P 1 A_RailWait GALH P 0 A_Refire(1)Goto Ready2
GALH P 1 A_TakeInventory("GalaxyHudFlag",1)GALH P 0 A_Refire("Fire2_6")Goto Ready2
Fire2_6:
GALH S 1 A_RailWait GALH S 0 A_Refire(1)Goto Ready2
GALH S 1 A_RailWait GALH S 0 A_Refire(1)Goto Ready2
GALH S 1 A_RailWait GALH S 0 A_Refire(1)Goto Ready2
GALH S 1 A_TakeInventory("GalaxyHudFlag",1)GALH S 0 A_Refire("Fire2_7")Goto Ready2
Fire2_7:
GALH V 1 A_RailWait GALH V 0 A_Refire(1)Goto Ready2
GALH V 1 A_RailWait GALH V 0 A_Refire(1)Goto Ready2
GALH V 1 A_RailWait GALH V 0 A_Refire(1)Goto Ready2
GALH V 1 A_GiveInventory("GalaxyHudFlag",7)GALH V 0 A_Refire("Fire2_1")Goto Ready2

FirePew:
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",7,"FirePew_1")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",6,"FirePew_2")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",5,"FirePew_3")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",4,"FirePew_4")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",3,"FirePew_5")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",2,"FirePew_6")
GALH A 0 A_JumpIfInventory("GalaxyHudFlag",1,"FirePew_7")
goto FirePew_0
FirePew_0:
GALH A 0 A_JumpIfInventory("IsBot",1,"BotFirePew")
GALH BC 2
GALH C 2 offset(50,-7)
GALH C 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
GALH C 2 A_GiveInventory("GalaxymanMain2_CI",1)
GALH C 0 A_WeaponReady(14)
GALH CBAA 2
GALH A 0 A_Refire("FirePew_0")
Goto Ready2

BotFirePew:
GALH A 0 A_JumpIfInventory("BlackHoleBombCooldown",1,2)
GALH A 0 A_GiveInventory("BlackHoleBombBossAmmo",7)
Goto Ready2
GALH A 0
goto FirePew_0+1

FirePew_1:
GALH E 0 A_TakeInventory("GalaxyHudFlag",9)
GALH EF 2
GALH I 2 offset(50,-7)
GALH I 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
GALH I 2 A_GiveInventory("GalaxymanMain2_CI",1)
GALH L 0 A_WeaponReady(14)
GALH LKMM 2
GALH P 0 A_Refire("FirePew_5")
GALH P 0 A_GiveInventory("GalaxyHudFlag",3)
Goto Ready2
FirePew_2:
GALH H 0 A_TakeInventory("GalaxyHudFlag",9)
GALH HI 2
GALH L 2 offset(50,-7)
GALH L 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
GALH L 2 A_GiveInventory("GalaxymanMain2_CI",1)
GALH O 0 A_WeaponReady(14)
GALH ONPP 2
GALH S 0 A_Refire("FirePew_6")
GALH S 0 A_GiveInventory("GalaxyHudFlag",2)
Goto Ready2
FirePew_3:
GALH K 0 A_TakeInventory("GalaxyHudFlag",9)
GALH KL 2
GALH O 2 offset(50,-7)
GALH O 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
GALH O 2 A_GiveInventory("GalaxymanMain2_CI",1)
GALH R 0 A_WeaponReady(14)
GALH RQSS 2
GALH V 0 A_Refire("FirePew_7")
GALH V 0 A_GiveInventory("GalaxyHudFlag",1)
Goto Ready2
FirePew_4:
GALH N 0 A_TakeInventory("GalaxyHudFlag",9)
GALH NO 2
GALH R 2 offset(50,-7)
GALH R 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
GALH R 2 A_GiveInventory("GalaxymanMain2_CI",1)
GALH U 0 A_WeaponReady(14)
GALH UTVV 2
GALH D 0 A_Refire("FirePew_1")
GALH D 0 A_GiveInventory("GalaxyHudFlag",7)
Goto Ready2
FirePew_5:
GALH Q 0 A_TakeInventory("GalaxyHudFlag",9)
GALH QR 2
GALH U 2 offset(50,-7)
GALH U 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
GALH U 2 A_GiveInventory("GalaxymanMain2_CI",1)
GALH X 0 A_WeaponReady(14)
GALH XWDD 2
GALH G 0 A_Refire("FirePew_2")
GALH G 0 A_GiveInventory("GalaxyHudFlag",6)
Goto Ready2
FirePew_6:
GALH T 0 A_TakeInventory("GalaxyHudFlag",9)
GALH TU 2
GALH X 2 offset(50,-7)
GALH X 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
GALH X 2 A_GiveInventory("GalaxymanMain2_CI",1)
GALH F 0 A_WeaponReady(14)
GALH FEGG 2
GALH J 0 A_Refire("FirePew_3")
GALH J 0 A_GiveInventory("GalaxyHudFlag",5)
Goto Ready2
FirePew_7:
GALH W 0 A_TakeInventory("GalaxyHudFlag",9)
GALH WX 2
GALH F 2 offset(50,-7)
GALH F 0 A_PlaySoundEx("weapon/blackholebombC","Weapon")
GALH F 2 A_GiveInventory("GalaxymanMain2_CI",1)
GALH I 0 A_WeaponReady(14)
GALH IHJJ 2
GALH M 0 A_Refire("FirePew_4")
GALH M 0 A_GiveInventory("GalaxyHudFlag",4)
Goto Ready2



Altfire:
GALH A 0 A_JumpIfInventory("GalaxyAltFlag",1,"AltfireEnd")
GALH A 0 A_JumpIfInventory("GalaxyPortFlag",1,"GalaxyTeleport")
GALH A 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Altfire2")
GALH A 1
Goto Ready2

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

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

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

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

Altfire2_1:
GALH E 3
GALH F 1
GALH I 2
GALH I 2 offset(50,-7)
GALH L 1
goto Altfire2End
Altfire2_2:
GALH H 3
GALH I 1
GALH L 2
GALH L 2 offset(50,-7)
GALH O 1
goto Altfire2End
Altfire2_3:
GALH K 3
GALH L 1
GALH O 2
GALH O 2 offset(50,-7)
GALH R 1
goto Altfire2End
Altfire2_4:
GALH N 3
GALH O 1
GALH R 2
GALH R 2 offset(50,-7)
GALH U 1
goto Altfire2End
Altfire2_5:
GALH Q 3
GALH R 1
GALH U 2
GALH U 2 offset(50,-7)
GALH X 1
goto Altfire2End
Altfire2_6:
GALH T 3
GALH U 1
GALH X 2
GALH X 2 offset(50,-7)
GALH F 1
goto Altfire2End
Altfire2_7:
GALH W 3
GALH X 1
GALH F 2
GALH F 2 offset(50,-7)
GALH 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("BlackHoleBombBossAmmo",2)
TNT1 A 0 A_PlaySoundEx("weapon/RamFlight","Weapon")
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,12,momx,momy,momz,0,8)
TNT1 A 6 A_WeaponReady(2)
TNT1 A 0 A_JumpIfInventory("BlackHoleBombBossAmmo",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("BlackHoleBombBossAmmo",2)
TNT1 A 0 A_PlaySoundEx("weapon/RamFlight","Weapon")
TNT1 A 0 A_SpawnItemEX("GalaxyRam",0,0,12,momx,momy,momz,0,8)
TNT1 A 6 A_WeaponReady(4)
TNT1 A 0 A_JumpIfInventory("BlackHoleBombBossAmmo",1,"Altfire4")
goto AltfireEnd

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

GALH C 0 A_GiveInventory("GalaxyHudFlag",random(1,7))

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

GalaxyTeleport:
GALH A 0 A_PlaySound("classes/GalaxyTeleport",1,0.5)

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


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

}
}

actor BlackHoleBombBossAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 56
+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 PortalItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "GalCon"
inventory.pickupmessage "Now you're thinking with Portals!"
scale 2.0
+INVBAR
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","SoundSlot6")
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
No:
TNT1 A 0
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("BlackHoleBombBossAmmo",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("BlackHoleBombBossAmmo",2)
TNT1 A 0 A_TakeInventory("WeaponCharge",999)
TNT1 A 0 A_JumpIfInTargetInventory("BlackHoleBombBossAmmo",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
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","SoundSlot6")
stop
}
}

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

actor BlackHoleBombPewPew
{
Translation "198:198=62:62", "192:192=59:59"
PROJECTILE
damagetype "BlackHoleBomb"
Obituary "$OB_BLACKHOLEPEW"
+FORCEXYBILLBOARD
+THRUSPECIES
Species "DumbBlackHole"
Damage (13)
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 "198:198=205:205", "192:192=206:206"}
actor BlackHoleBombPewPew2 : BlackHoleBombPewPew{Translation "198:198=58:58", "192:192=60:60"}
actor BlackHoleBombPewPew3 : BlackHoleBombPewPew{Translation "198:198=39:39", "192:192=40:40"}
actor BlackHoleBombPewPew4 : BlackHoleBombPewPew{Translation "198:198=225:225", "192:192=227:227"}
actor BlackHoleBombPewPew5 : BlackHoleBombPewPew{Translation "198:198=229:229", "192:192=230:230"}
actor BlackHoleBombPewPew6 : BlackHoleBombPewPew{Translation "198:198=104:104", "192:192=111:111"}
actor BlackHoleBombPewPew7 : BlackHoleBombPewPew{Translation "198:198=103:103", "192:192=116:116"}

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

actor BlackHoleBombX
{
Translation "198:198=62:62", "192:192=59:59"
PROJECTILE
+NOTARGETSWITCH
+FORCEXYBILLBOARD
+SKYEXPLODE
+RIPPER
+DONTBLAST
+THRUSPECIES
Radius 15
Height 8
scale 2.5
damage (0)
Species "DumbBlackHole"
Obituary "$OB_BLACKHOLEBOMB"
damagetype "BlackHoleBombB"
speed 11
States
{
Spawn:
BLKH B 0

BLKH B 0 A_PlaySoundEx("weapon/blackholebombC","Body",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 1
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 BlackHoleX
{
PROJECTILE
Obituary "$OB_BLACKHOLEBOMB"
damagetype "BlackHoleBombB"
+NOINTERACTION
+FORCEXYBILLBOARD
+RIPPER
+NOTARGETSWITCH
+THRUSPECIES
Species "DumbBlackHole"
reactiontime 5
damage (0)
Radius 1
Height 1
Scale 3.0
States
{
Spawn:
BLKH F 0
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_PlaySoundEx("weapon/blackholebombdetonateC","Body",1)
Spawn2:
BLKH F 0 A_SpawnItemEx("BlackHoleXHelperFX",0,0,0,0,0,0,0,1)
BLKH F 0 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH FFGG 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 H 0 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH HHII 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 J 0 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH JJKK 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 L 0 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH LLMM 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 N 0 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH NNOO 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 P 0 A_GiveInventory("BlackHoleX_Pickup",1)
BLKH PPQQ 1
BLKH F 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
BLKH F 0 A_CountDown
loop
Death:
TNT1 A 0
TNT1 A 1 A_StopSound(4)
TNT1 A 1
stop
}
}

actor BlackHoleX_Pickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_Explode(4,128,0,0,16)
TNT1 A 0 ACS_ExecuteAlways(247,0,7,256)
stop
}
}

actor BlackHoleXHelperFX : BasicClientSide
{
States
{
Spawn:
TNT1 A 0
TNT1 AA 0 A_SpawnItemEx("BlackHoleBombXFX",256,0,0,0,0,0,random(0,359),1)
TNT1 A 1
TNT1 AA 0 A_SpawnItemEx("BlackHoleBombXFX",256,0,0,0,0,0,random(0,359),1)
TNT1 A 1
TNT1 AA 0 A_SpawnItemEx("BlackHoleBombXFX",256,0,0,0,0,0,random(0,359),1)
TNT1 A 1
TNT1 AA 0 A_SpawnItemEx("BlackHoleBombXFX",256,0,0,0,0,0,random(0,359),1)
TNT1 A 1
stop
}
}

actor BlackHoleBombXFX : BasicClientSide
{
+FORCEXYBILLBOARD
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 BlackHoleBombXFX2 : BlackHoleBombXFX
{
States
{
Spawn:
BLKH R 5
stop
}
}

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

actor GalaxyRam : BasicExplosion
{
damagetype "BlackHoleBombB"
Obituary "$OB_GALAXYRAM"
States
{
Spawn:
TNT1 A 0 
TNT1 A 1 A_Explode(12,84,0)
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 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
}
}