The Messenger: fix items accessibility reachability bug due to new rules (#2937)
This commit is contained in:
parent
a7384b4b63
commit
6d3f7865ff
|
@ -523,7 +523,7 @@ class MessengerOOBRules(MessengerRules):
|
|||
|
||||
def set_self_locking_items(world: "MessengerWorld", player: int) -> None:
|
||||
# locations where these placements are always valid
|
||||
allow_self_locking_items(world.get_location("Searing Crags - Key of Strength"), "Power Thistle")
|
||||
allow_self_locking_items(world.get_location("Searing Crags - Key of Strength").parent_region, "Power Thistle")
|
||||
allow_self_locking_items(world.get_location("Sunken Shrine - Key of Love"), "Sun Crest", "Moon Crest")
|
||||
allow_self_locking_items(world.get_location("Corrupted Future - Key of Courage"), "Demon King Crown")
|
||||
allow_self_locking_items(world.get_location("Corrupted Future - Key of Courage").parent_region, "Demon King Crown")
|
||||
allow_self_locking_items(world.get_location("Elemental Skylands Seal - Water"), "Currents Master")
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import typing
|
||||
|
||||
from . import MessengerTestBase
|
||||
from ..constants import NOTES, PHOBEKINS
|
||||
|
||||
|
@ -208,5 +210,8 @@ class ItemsAccessTest(MessengerTestBase):
|
|||
for item_name in location_lock_pairs[loc]:
|
||||
item = self.get_item_by_name(item_name)
|
||||
with self.subTest("Fulfills Accessibility", location=loc, item=item_name):
|
||||
self.assertTrue(self.multiworld.get_location(loc, self.player).can_fill(self.multiworld.state, item,
|
||||
True))
|
||||
location = self.multiworld.get_location(loc, self.player)
|
||||
self.assertTrue(location.can_fill(self.multiworld.state, item, True))
|
||||
location.item = item
|
||||
self.multiworld.state.update_reachable_regions(self.player)
|
||||
self.assertTrue(self.can_reach_location(loc))
|
||||
|
|
Loading…
Reference in New Issue