Skip to content

Commit

Permalink
New region for Original PB, various cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
NoiseCrush committed Aug 21, 2024
1 parent b5ed615 commit b807f87
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 23 deletions.
5 changes: 2 additions & 3 deletions locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def __init__(self, reg, id):

# Location numbers/order and some names from Biospark's MZM Randomizer.
# Events in any region must be at the end of its table for the client to work correctly
# TODO: Double check that these are all correctly assigned to their right regions

brinstar_location_table = {
"Brinstar Morph Ball": LocationData("Brinstar Start", AP_MZM_ID_BASE + 0),
Expand Down Expand Up @@ -131,8 +130,8 @@ def __init__(self, reg, id):
"Chozodia Triple Crawling Pirates": LocationData("Chozodia Ruins", AP_MZM_ID_BASE + 88), #TODO renamed
"Chozodia Left of Glass Tube": LocationData("Chozodia Under Tube", AP_MZM_ID_BASE + 89), #TODO renamed
"Chozodia Lava Dive": LocationData("Chozodia Ruins Test Area", AP_MZM_ID_BASE + 90), #TODO Renamed
"Chozodia Original Power Bomb": LocationData("Chozodia Mothership Cockpit", AP_MZM_ID_BASE + 91),
"Chozodia Next to Original Power Bomb": LocationData("Chozodia Mothership Cockpit", AP_MZM_ID_BASE + 92),
"Chozodia Original Power Bomb": LocationData("Chozodia Original Power Bomb Room", AP_MZM_ID_BASE + 91),
"Chozodia Next to Original Power Bomb": LocationData("Chozodia Original Power Bomb Room", AP_MZM_ID_BASE + 92),
"Chozodia Right of Glass Tube": LocationData("Chozodia Under Tube", AP_MZM_ID_BASE + 93), #TODO Renamed
"Chozodia Chozo Ghost Area Long Shinespark": LocationData("Chozodia Ruins Test Area", AP_MZM_ID_BASE + 94),
"Chozodia Pirate Pitfall Trap": LocationData("Chozodia Mothership Central", AP_MZM_ID_BASE + 95), #TODO renamed
Expand Down
36 changes: 29 additions & 7 deletions logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def any(*args: Requirement):
Requirement.setting_atleast("ibj_in_logic", 2)
)
CanWallJump = Requirement.setting_atleast("walljumps_in_logic", 1)
#CanAdvancedWallJump = Requirement.setting_atleast("walljumps_in_logic", 2) #TODO
CanTrickySparks = all(
Requirement.setting_enabled("tricky_shinesparks"),
SpeedBooster,
Expand Down Expand Up @@ -356,7 +355,6 @@ def norfair_upper_right_shaft():
)


# used for one item and the ridley shortcut
def norfair_behind_ice_beam():
return all(
any(
Expand Down Expand Up @@ -572,9 +570,6 @@ def bottom_norfair_to_screw():
)


# LN elevator to the bottom long hall
# connects to right shaft with no extra req's
# this happens to cover the reqs for left pillar, fake floor, long room, and the ability to get to right shaft
def ridley_main_to_left_shaft():
return all(
SuperMissiles,
Expand Down Expand Up @@ -631,6 +626,7 @@ def ridley_left_shaft_to_sw_puzzle():
)


# The alcove to the right of the right shaft
def ridley_speed_puzzles_access():
return all(
SpeedBooster,
Expand Down Expand Up @@ -722,7 +718,8 @@ def chozo_ruins_to_chozodia_tube():
CanFly
)

# Relevant for region/elevator rando

# Specifically getting to the room with Crateria Upper Door location. Might need another empty region for region rando
def chozodia_tube_to_chozo_ruins():
return all(
any(
Expand Down Expand Up @@ -819,7 +816,32 @@ def mothership_central_to_cockpit():
)


# From cockpit to Mecha Ridley hallway
def cockpit_to_original_pb():
return all(
any(
CanWallJump,
HiJump,
PowerGrip,
SpaceJump
), # cannot IBJ to escape to cockpit
any(
CanIBJ,
all(
PowerGrip,
any(
CanFlyWall,
HiJump
)
),
all(
AdvancedLogic,
IceBeam,
CanBallJump
)
)
)


# This one stupid room is so randomly complicated lol
def cockpit_to_mecha_ridley():
return all(
Expand Down
4 changes: 2 additions & 2 deletions regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def connect(world: MultiWorld, player: int, entrance_name: str, source: str, tar


def create_regions_and_connections(world: MZMWorld):
# create all regions and populate with locations
player = world.player
multiworld = world.multiworld

Expand Down Expand Up @@ -67,6 +66,7 @@ def create_regions_and_connections(world: MZMWorld):
create_region(multiworld, player, "Chozodia Under Tube")
create_region(multiworld, player, "Chozodia Mothership Central")
create_region(multiworld, player, "Chozodia Mothership Cockpit")
create_region(multiworld, player, "Chozodia Original Power Bomb Room")
create_region(multiworld, player, "Chozodia Mecha Ridley Hallway")
create_region(multiworld, player, "Mission Accomplished!")

Expand All @@ -77,7 +77,6 @@ def create_regions_and_connections(world: MZMWorld):
connect(multiworld, player, "Brinstar Past Hives -> Top", "Brinstar Past Hives", "Brinstar Top", brinstar_pasthives_to_brinstar_top().create_rule(world))
connect(multiworld, player, "Brinstar Top -> Past Hives", "Brinstar Top", "Brinstar Past Hives", CanEnterMediumMorphTunnel.create_rule(world))
connect(multiworld, player, "Brinstar -> Kraid Elevator", "Brinstar Start", "Kraid Main", CanSingleBombBlock.create_rule(world))
#TODO: account for layout patches in Brinstar -> Norfair elevator
connect(multiworld, player, "Brinstar -> Norfair Elevator", "Brinstar Main", "Norfair Main", CanBombTunnelBlock.create_rule(world))
connect(multiworld, player, "Brinstar -> Tourian Elevator", "Brinstar Main", "Tourian", all(MorphBall, KraidBoss, RidleyBoss).create_rule(world))
connect(multiworld, player, "Brinstar -> Crateria Ballcannon", "Brinstar Start", "Upper Crateria", brinstar_crateria_ballcannon().create_rule(world))
Expand Down Expand Up @@ -119,4 +118,5 @@ def create_regions_and_connections(world: MZMWorld):
connect(multiworld, player, "Chozodia Glass Tube -> Chozo Ruins", "Chozodia Glass Tube", "Chozodia Ruins", chozodia_tube_to_chozo_ruins().create_rule(world))
connect(multiworld, player, "Chozozia Glass Tube -> Mothership Central", "Chozodia Glass Tube", "Chozodia Mothership Central", chozodia_tube_to_mothership_central().create_rule(world))
connect(multiworld, player, "Chozodia Mothership -> Cockpit", "Chozodia Mothership Central", "Chozodia Mothership Cockpit", mothership_central_to_cockpit().create_rule(world))
connect(multiworld, player, "Chozodia Cockpit -> Original PB", "Chozodia Mothership Cockpit", "Chozodia Original Power Bomb Room", cockpit_to_original_pb().create_rule(world))
connect(multiworld, player, "Chozodia Cockpit -> Mecha Ridley", "Chozodia Mothership Cockpit", "Chozodia Mecha Ridley Hallway", cockpit_to_mecha_ridley().create_rule(world))
15 changes: 4 additions & 11 deletions rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@
)
}

# obviously, requires speed booster
ridley_right_speed_puzzles = {
"Ridley Bomb Puzzle": all(
Bomb,
Expand Down Expand Up @@ -757,17 +756,11 @@
"Chozodia Southeast Corner In Hull": PowerBombs
}

chozodia_cockpit = {
"Chozodia Original Power Bomb": any(
CanWallJump,
HiJump,
PowerGrip,
SpaceJump
), # cannot IBJ to escape
chozodia_pb_area = {
"Chozodia Original Power Bomb": None,
"Chozodia Next to Original Power Bomb": all(
PowerBombs,
CanFly,
CanReachLocation("Chozodia Original Power Bomb")
CanFly
)
}

Expand Down Expand Up @@ -823,7 +816,7 @@
**chozodia_ruins_test,
**chozodia_under_tube,
**chozodia_mothership,
**chozodia_cockpit,
**chozodia_pb_area,
**chozodia_mecha_ridley_hall
}

Expand Down

0 comments on commit b807f87

Please sign in to comment.