From 0924a2461a8b2a0b10e14919b3d855392afd44a2 Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Wed, 29 Apr 2020 18:11:58 +1000 Subject: [PATCH] dungeonsfull logic fix - prevent the desert prize from being required to reach desert main (unless keysanity allows access to the keys). --- Rules.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Rules.py b/Rules.py index 17609030..fd968465 100644 --- a/Rules.py +++ b/Rules.py @@ -183,6 +183,10 @@ def global_rules(world, player): for location in ['Desert Palace - Boss', 'Desert Palace - Big Key Chest', 'Desert Palace - Compass Chest']: forbid_item(world.get_location(location, player), 'Small Key (Desert Palace)', player) + # logic patch to prevent placing a crystal in Desert that's required to reach the required keys + if not (world.keyshuffle[player] and world.bigkeyshuffle[player]): + add_rule(world.get_location('Desert Palace - Prize', player), lambda state: state.world.get_region('Desert Palace Main (Outer)', 1).can_reach(state)) + set_rule(world.get_entrance('Tower of Hera Small Key Door', player), lambda state: state.has_key('Small Key (Tower of Hera)', player) or item_name(state, 'Tower of Hera - Big Key Chest', player) == ('Small Key (Tower of Hera)', player)) set_rule(world.get_entrance('Tower of Hera Big Key Door', player), lambda state: state.has('Big Key (Tower of Hera)', player)) set_rule(world.get_location('Tower of Hera - Big Chest', player), lambda state: state.has('Big Key (Tower of Hera)', player))