From 2891d575f01400cf6f96dff58e7fef9b8b8ff484 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Tue, 5 Jan 2021 09:56:20 -0800 Subject: [PATCH] Fix bug where you can force non-local triforce pieces on a local triforce hunt. --- Main.py | 5 +++++ Rules.py | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Main.py b/Main.py index ffa6670c..5d6577bc 100644 --- a/Main.py +++ b/Main.py @@ -119,6 +119,11 @@ def main(args, seed=None): item.strip() in item_table} world.non_local_items[player] = {item.strip() for item in args.non_local_items[player].split(',') if item.strip() in item_table} + + # enforce pre-defined local items. + if world.goal[player] in ["localtriforcehunt", "localganontriforcehunt"]: + world.local_items[player].add('Triforce Piece') + # items can't be both local and non-local, prefer local world.non_local_items[player] -= world.local_items[player] diff --git a/Rules.py b/Rules.py index cd6b7884..02bd8545 100644 --- a/Rules.py +++ b/Rules.py @@ -173,8 +173,6 @@ def item_name(state, location, player): def locality_rules(world, player): - if world.goal[player] in ["localtriforcehunt", "localganontriforcehunt"]: - world.local_items[player].add('Triforce Piece') if world.local_items[player]: for location in world.get_locations(): if location.player != player: