From edc5f9e8a4815620c39468b9370411fd128751e3 Mon Sep 17 00:00:00 2001 From: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> Date: Sun, 16 Feb 2025 12:19:49 -0500 Subject: [PATCH] Quick fixes for beta 0.5.0 release: template options and LPC logic. --- worlds/jakanddaxter/__init__.py | 5 +++-- .../jakanddaxter/regs/LostPrecursorCityRegions.py | 14 ++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/worlds/jakanddaxter/__init__.py b/worlds/jakanddaxter/__init__.py index 8299ee507e..141ec03dbe 100644 --- a/worlds/jakanddaxter/__init__.py +++ b/worlds/jakanddaxter/__init__.py @@ -69,8 +69,9 @@ class JakAndDaxterSettings(settings.Group): root_directory: RootDirectory = RootDirectory( "%programfiles%/OpenGOAL-Launcher/features/jak1/mods/JakMods/archipelagoal") - auto_detect_root_directory: AutoDetectRootDirectory | bool = True - enforce_friendly_options: EnforceFriendlyOptions | bool = True + # Don't ever change these type hints again. + auto_detect_root_directory: typing.Union[AutoDetectRootDirectory, bool] = True + enforce_friendly_options: typing.Union[EnforceFriendlyOptions, bool] = True class JakAndDaxterWebWorld(WebWorld): diff --git a/worlds/jakanddaxter/regs/LostPrecursorCityRegions.py b/worlds/jakanddaxter/regs/LostPrecursorCityRegions.py index d519472f6d..0ad248b156 100644 --- a/worlds/jakanddaxter/regs/LostPrecursorCityRegions.py +++ b/worlds/jakanddaxter/regs/LostPrecursorCityRegions.py @@ -64,12 +64,16 @@ def build_regions(level_name: str, world: JakAndDaxterWorld) -> list[JakAndDaxte or state.has_all({"Punch", "Punch Uppercut"}, player))) capsule_room.add_fly_locations([327729]) + # You can slide to the bottom of the city, but if you spawn down there, you have no momentum from the slide. + # So you need some kind of jump to reach this cell. second_slide = JakAndDaxterRegion("Second Slide", player, multiworld, level_name, 31) + second_slide.add_cell_locations([46], access_rule=lambda state: + state.has_any({"Double Jump", "Jump Kick"}, player) + or state.has_all({"Punch", "Punch Uppercut"}, player)) + # If you can enter the helix room, you can jump or fight your way to the top. But you need some kind of movement + # to enter it in the first place. helix_room = JakAndDaxterRegion("Helix Chamber", player, multiworld, level_name, 30) - helix_room.add_cell_locations([46], access_rule=lambda state: - state.has_any({"Double Jump", "Jump Kick"}, player) - or state.has_all({"Punch", "Punch Uppercut"}, player)) helix_room.add_cell_locations([50], access_rule=lambda state: state.has("Double Jump", player) or can_fight(state, player)) @@ -109,7 +113,9 @@ def build_regions(level_name: str, world: JakAndDaxterWorld) -> list[JakAndDaxte capsule_room.connect(main_area, rule=lambda state: # Chamber goes back to surface. state.has("Jump Dive", player)) # (Assume one-way for sanity.) - second_slide.connect(helix_room) # Slide. + second_slide.connect(helix_room, rule=lambda state: # As stated above, you need to jump + state.has_any({"Double Jump", "Jump Kick"}, player) # across the dark eco pool before + or state.has_all({"Punch", "Punch Uppercut"}, player)) # you can climb the helix room. helix_room.connect(quick_platforms, rule=lambda state: # Escape to get back to here. state.has("Double Jump", player) # Capsule is a convenient exit to the level.