make world-local items available as a general option

This commit is contained in:
Fabian Dill
2020-06-03 22:13:58 +02:00
parent 38cbcc662f
commit e55726efca
7 changed files with 53 additions and 7 deletions

View File

@@ -138,9 +138,12 @@ def global_rules(world, player):
# ganon can only carry triforce
add_item_rule(world.get_location('Ganon', player), lambda item: item.name == 'Triforce' and item.player == player)
if world.goal[player] == "localtriforcehunt":
world.local_items[player].add('Triforce Piece')
if world.local_items[player]:
for location in world.get_locations():
if location.player != player:
forbid_item(location, 'Triforce Piece', player)
for item in world.local_items[player]:
forbid_item(location, item, player)
# determines which S&Q locations are available - hide from paths since it isn't an in-game location
world.get_region('Menu', player).can_reach_private = lambda state: True
for exit in world.get_region('Menu', player).exits: