From 7de6948cebed6155460343a7207405e3ef548231 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Wed, 8 Nov 2017 22:45:43 -0500 Subject: [PATCH] Prevent Hyrule Castle key-lock in key-sanity --- Rules.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Rules.py b/Rules.py index 6abc85a6..bd73ca65 100644 --- a/Rules.py +++ b/Rules.py @@ -427,6 +427,12 @@ def open_rules(world): # softlock protection as you can reach the sewers small key door with a guard drop key forbid_item(world.get_location('Hyrule Castle - Boomerang Chest'), 'Small Key (Escape)') forbid_item(world.get_location('Hyrule Castle - Zelda\'s Chest'), 'Small Key (Escape)') + + # to prevent key-lock in keysanity we need to prevent these chests from having an item that + # blocks the small key + if (world.keysanity): + set_rule(world.get_entrance('Hyrule Castle - Boomerang Chest'), lambda state: state.has('Small Key (Escape)')) + set_rule(world.get_entrance('Hyrule Castle - Zelda\'s Chest'), lambda state: state.has('Small Key (Escape)')) def swordless_rules(world):