From 95ec860330699139a8da1494626879549d9dc75a Mon Sep 17 00:00:00 2001 From: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:30:50 -0400 Subject: [PATCH] Fix region rule bug with Punch for Klaww. --- worlds/jakanddaxter/regs/MountainPassRegions.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/worlds/jakanddaxter/regs/MountainPassRegions.py b/worlds/jakanddaxter/regs/MountainPassRegions.py index 0e45bf7451..1f919629bd 100644 --- a/worlds/jakanddaxter/regs/MountainPassRegions.py +++ b/worlds/jakanddaxter/regs/MountainPassRegions.py @@ -31,9 +31,15 @@ def build_regions(level_name: str, world: JakAndDaxterWorld) -> List[JakAndDaxte shortcut = JakAndDaxterRegion("Shortcut", player, multiworld, level_name, 0) shortcut.add_cell_locations([110]) - main_area.connect(race) + # Of course, in order to make it to the race region, you must defeat Klaww. He's not optional. + # So we need to set up this inter-region rule as well (or make it free if the setting is off). + if world.options.require_punch_for_klaww: + main_area.connect(race, rule=lambda state: state.has("Punch", player)) + else: + main_area.connect(race) - # You cannot go backwards from Klaww. + # You actually can go backwards from the race back to Klaww's area. + race.connect(main_area) race.connect(shortcut, rule=lambda state: state.has("Yellow Eco Switch", player)) shortcut.connect(race)