Skip to content

Commit

Permalink
TUNIC: Fix minimal Heir access in ladder shuffle (ArchipelagoMW#3189)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScipioWright authored and qwint committed Jun 24, 2024
1 parent f38f5fc commit ed525d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion worlds/tunic/er_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions worlds/tunic/er_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,21 @@ 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",
}


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:
Expand Down
3 changes: 2 additions & 1 deletion worlds/tunic/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ed525d0

Please sign in to comment.