The Messenger: Fix items accessibility region rule (#2263)

This commit is contained in:
Aaron Wagener 2023-10-04 11:23:29 -05:00 committed by GitHub
parent 78057476f3
commit f6e92a18de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -263,5 +263,6 @@ def set_self_locking_items(multiworld: MultiWorld, player: int) -> None:
allow_self_locking_items(multiworld.get_location("Elemental Skylands Seal - Water", player), "Currents Master") allow_self_locking_items(multiworld.get_location("Elemental Skylands Seal - Water", player), "Currents Master")
# add these locations when seals and shards aren't shuffled # add these locations when seals and shards aren't shuffled
elif not multiworld.shuffle_shards[player]: elif not multiworld.shuffle_shards[player]:
allow_self_locking_items(multiworld.get_region("Cloud Ruins Right", player), "Ruxxtin's Amulet") for entrance in multiworld.get_region("Cloud Ruins", player).entrances:
entrance.access_rule = lambda state: state.has("Wingsuit", player) or state.has("Rope Dart", player)
allow_self_locking_items(multiworld.get_region("Forlorn Temple", player), *PHOBEKINS) allow_self_locking_items(multiworld.get_region("Forlorn Temple", player), *PHOBEKINS)

View File

@ -163,6 +163,8 @@ class ItemsAccessTest(MessengerTestBase):
"Forlorn Temple - Demon King": PHOBEKINS "Forlorn Temple - Demon King": PHOBEKINS
} }
self.multiworld.state = self.multiworld.get_all_state(True)
self.remove_by_name(location_lock_pairs.values())
for loc in location_lock_pairs: for loc in location_lock_pairs:
for item_name in location_lock_pairs[loc]: for item_name in location_lock_pairs[loc]:
item = self.get_item_by_name(item_name) item = self.get_item_by_name(item_name)