From 1b5ec76c8dd08438ab2120bd727e724468120cb5 Mon Sep 17 00:00:00 2001 From: AmazingAmpharos Date: Fri, 10 Nov 2017 04:10:30 -0600 Subject: [PATCH] A few softlock preventions -KevinCathcart's PoD small key fix for the back -Per KevinCathcart, swordless mode now inherits open mode specific restrictions (per me, fixes a rare Hyrule Castle softlock scenario) --- Rules.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Rules.py b/Rules.py index 8ded2bb7..b285f64f 100644 --- a/Rules.py +++ b/Rules.py @@ -304,10 +304,12 @@ def global_rules(world): if world.keysanity: set_rule(world.get_entrance('Palace of Darkness Spike Statue Room Door'), lambda state: state.has('Small Key (Palace of Darkness)', 6) or (state.world.get_location('Palace of Darkness - Harmless Hellway').item is not None and (state.world.get_location('Palace of Darkness - Harmless Hellway').item.name in ['Small Key (Palace of Darkness)']))) + set_rule(world.get_entrance('Palace of Darkness Big Key Chest Staircase'), lambda state: state.has('Small Key (Palace of Darkness)', 6) or (state.world.get_location('Palace of Darkness - Big Key Chest').item is not None and (state.world.get_location('Palace of Darkness - Big Key Chest').item.name in ['Small Key (Palace of Darkness)']))) set_rule(world.get_entrance('Palace of Darkness Maze Door'), lambda state: state.has('Small Key (Palace of Darkness)', 6)) else: set_rule(world.get_entrance('Palace of Darkness Spike Statue Room Door'), lambda state: state.has('Small Key (Palace of Darkness)', 5) or (state.world.get_location('Palace of Darkness - Harmless Hellway').item is not None and (state.world.get_location('Palace of Darkness - Harmless Hellway').item.name in ['Small Key (Palace of Darkness)']))) - set_rule(world.get_entrance('Palace of Darkness Maze Door'), lambda state: state.has('Small Key (Palace of Darkness)', 6)) + set_rule(world.get_entrance('Palace of Darkness Big Key Chest Staircase'), lambda state: state.has('Small Key (Palace of Darkness)', 5) or (state.world.get_location('Palace of Darkness - Big Key Chest').item is not None and (state.world.get_location('Palace of Darkness - Big Key Chest').item.name in ['Small Key (Palace of Darkness)']))) + set_rule(world.get_entrance('Palace of Darkness Maze Door'), lambda state: state.has('Small Key (Palace of Darkness)', 5)) for location in ['Palace of Darkness - Big Chest', 'Palace of Darkness - Helmasaur']: forbid_item(world.get_location(location), 'Big Key (Palace of Darkness)') @@ -436,6 +438,12 @@ def open_rules(world): def swordless_rules(world): + + # for the time being swordless mode just inhierits all fixes from open mode. + # should there ever be fixes that apply to open mode but not swordless, this + # can be revisited. + open_rules(world) + set_rule(world.get_entrance('Agahnims Tower'), lambda state: state.has('Cape') or state.has('Hammer') or state.has('Beat Agahnim 1')) # barrier gets removed after killing agahnim, relevant for entrance shuffle set_rule(world.get_entrance('Agahnim 1'), lambda state: state.has('Hammer') or state.has('Bug Catching Net') and state.has('Small Key (Agahnims Tower)', 2)) set_rule(world.get_location('Ether Tablet'), lambda state: state.has('Book of Mudora') and state.has('Hammer'))