From 02f35fcb7fe986269925da6b49bb2d67bab25acb Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Thu, 9 Jul 2020 16:36:10 +0200 Subject: [PATCH] bulk set locality for speed and recursion limit - for no_logic barrier --- Rules.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Rules.py b/Rules.py index 74d7d66d..3ea492ce 100644 --- a/Rules.py +++ b/Rules.py @@ -157,6 +157,10 @@ def locality_rules(world, player): forbid_items(location, world.local_items[player], player) +non_crossover_items = (item_name_groups["Small Keys"] | item_name_groups["Big Keys"] | progression_items) - { + "Small Key (Universal)"} + + def crossover_logic(world, player): """ Simple and not graceful solution to logic loops if you mix no logic and logic. Making it so that logical progression cannot be placed in no logic worlds.""" @@ -167,12 +171,7 @@ def crossover_logic(world, player): if no_logic_players: for location in world.get_locations(): if location.player in no_logic_players: - for item in progression_items: - forbid_item(location, item, player) - for item in item_name_groups["Small Keys"] - {"Small Key (Universal)"}: - forbid_item(location, item, player) - for item in item_name_groups["Big Keys"]: - forbid_item(location, item, player) + forbid_items(location, non_crossover_items, player) def global_rules(world, player): # ganon can only carry triforce