bulk set locality for speed and recursion limit - for no_logic barrier

This commit is contained in:
Fabian Dill 2020-07-09 16:36:10 +02:00
parent 565a7deefa
commit 02f35fcb7f
1 changed files with 5 additions and 6 deletions

View File

@ -157,6 +157,10 @@ def locality_rules(world, player):
forbid_items(location, world.local_items[player], 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): def crossover_logic(world, player):
""" Simple and not graceful solution to logic loops if you mix no logic and logic. """ 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.""" 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: if no_logic_players:
for location in world.get_locations(): for location in world.get_locations():
if location.player in no_logic_players: if location.player in no_logic_players:
for item in progression_items: forbid_items(location, non_crossover_items, player)
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)
def global_rules(world, player): def global_rules(world, player):
# ganon can only carry triforce # ganon can only carry triforce