From e62d095d28dae77b3c48b7e96ab8fc99a14de504 Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Wed, 29 Jul 2020 18:05:47 +1000 Subject: [PATCH] Connect hyrule_castle_exits to light world exits in standard dungeonsfull shuffle when there are no mandatory exits. Fix GT key logic to only allow placing a small key in the map room when the playthrough algorithm can reach it (due to limitations of the key logic). --- EntranceShuffle.py | 4 +++- Rules.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/EntranceShuffle.py b/EntranceShuffle.py index a43b3cc7..893c9eaf 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -55,7 +55,9 @@ def link_entrances(world, player): if world.mode == 'standard': # rest of hyrule castle must be in light world, so it has to be the one connected to east exit of desert - connect_mandatory_exits(world, lw_entrances, [('Hyrule Castle Exit (West)', 'Hyrule Castle Exit (East)')], list(LW_Dungeon_Entrances_Must_Exit), player) + hyrule_castle_exits = [('Hyrule Castle Exit (West)', 'Hyrule Castle Exit (East)')] + connect_mandatory_exits(world, lw_entrances, hyrule_castle_exits, list(LW_Dungeon_Entrances_Must_Exit), player) + connect_caves(world, lw_entrances, [], hyrule_castle_exits, player) else: connect_mandatory_exits(world, lw_entrances, dungeon_exits, list(LW_Dungeon_Entrances_Must_Exit), player) connect_mandatory_exits(world, dw_entrances, dungeon_exits, list(DW_Dungeon_Entrances_Must_Exit), player) diff --git a/Rules.py b/Rules.py index 1879ad1f..90854781 100644 --- a/Rules.py +++ b/Rules.py @@ -452,7 +452,7 @@ def global_rules(world, player): set_rule(world.get_entrance('Ganons Tower (Map Room)', player), lambda state: state.has_key('Small Key (Ganons Tower)', player, 4) or (item_name(state, 'Ganons Tower - Map Chest', player) in [('Big Key (Ganons Tower)', player), ('Small Key (Ganons Tower)', player)] and state.has_key('Small Key (Ganons Tower)', player, 3))) if world.accessibility != 'locations': - set_always_allow(world.get_location('Ganons Tower - Map Chest', player), lambda state, item: item.name == 'Small Key (Ganons Tower)' and item.player == player and state.has_key('Small Key (Ganons Tower)', player, 3)) + set_always_allow(world.get_location('Ganons Tower - Map Chest', player), lambda state, item: item.name == 'Small Key (Ganons Tower)' and item.player == player and state.has_key('Small Key (Ganons Tower)', player, 3) and state.can_reach('Ganons Tower (Hookshot Room)', 'region', player)) else: forbid_item(world.get_location('Ganons Tower - Map Chest', player), 'Small Key (Ganons Tower)', player)