From ed525d09f88883fe783217c6fcabc21f1e67b9c2 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sun, 21 Apr 2024 11:00:16 -0400 Subject: [PATCH] TUNIC: Fix minimal Heir access in ladder shuffle (#3189) --- worlds/tunic/er_rules.py | 2 +- worlds/tunic/er_scripts.py | 10 ++++++++-- worlds/tunic/rules.py | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index 3c0b9b47d08..dde142c88ab 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -986,7 +986,7 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re connecting_region=regions["Spirit Arena Victory"], rule=lambda state: (state.has(gold_hexagon, player, world.options.hexagon_goal.value) if world.options.hexagon_quest else - state.has_all({red_hexagon, green_hexagon, blue_hexagon}, player))) + state.has_all({red_hexagon, green_hexagon, blue_hexagon, "Unseal the Heir"}, player))) # connecting the regions portals are in to other portals you can access via ladder storage # using has_stick instead of can_ladder_storage since it's already checking the logic rules diff --git a/worlds/tunic/er_scripts.py b/worlds/tunic/er_scripts.py index ffd3ae30de4..3f70af83c0c 100644 --- a/worlds/tunic/er_scripts.py +++ b/worlds/tunic/er_scripts.py @@ -69,7 +69,8 @@ def create_er_regions(world: "TunicWorld") -> Dict[Portal, Portal]: "Quarry Fuse": "Quarry", "Ziggurat Fuse": "Rooted Ziggurat Lower Back", "West Garden Fuse": "West Garden", - "Library Fuse": "Library Lab" + "Library Fuse": "Library Lab", + "Place Questagons": "Sealed Temple", } @@ -77,7 +78,12 @@ def place_event_items(world: "TunicWorld", regions: Dict[str, Region]) -> None: for event_name, region_name in tunic_events.items(): region = regions[region_name] location = TunicERLocation(world.player, event_name, None, region) - if event_name.endswith("Bell"): + if event_name == "Place Questagons": + if world.options.hexagon_quest: + continue + location.place_locked_item( + TunicERItem("Unseal the Heir", ItemClassification.progression, None, world.player)) + elif event_name.endswith("Bell"): location.place_locked_item( TunicERItem("Ring " + event_name, ItemClassification.progression, None, world.player)) else: diff --git a/worlds/tunic/rules.py b/worlds/tunic/rules.py index a9e5fa0f358..12810cfa267 100644 --- a/worlds/tunic/rules.py +++ b/worlds/tunic/rules.py @@ -129,7 +129,8 @@ def set_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) -> No multiworld.get_entrance("Overworld -> Spirit Arena", player).access_rule = \ lambda state: (state.has(gold_hexagon, player, options.hexagon_goal.value) if options.hexagon_quest.value else state.has_all({red_hexagon, green_hexagon, blue_hexagon}, player)) and \ - has_ability(state, player, prayer, options, ability_unlocks) and has_sword(state, player) + has_ability(state, player, prayer, options, ability_unlocks) and has_sword(state, player) and \ + state.has_any({lantern, laurels}, player) def set_location_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) -> None: