Adding Flute Activation only if an activated flute cannot be found elsewhere

This commit is contained in:
codemann8
2023-07-17 01:37:55 -05:00
parent fce629b95f
commit a987e58fc9
2 changed files with 4 additions and 2 deletions

View File

@@ -212,7 +212,8 @@ def generate_itempool(world, player):
loc.locked = True
loc.forced_item = loc.item
if not world.is_tile_swapped(0x18, player):
if (world.flute_mode[player] != 'active' and not world.is_tile_swapped(0x18, player)
and 'Ocarina (Activated)' not in list(map(str, [i for i in world.precollected_items if i.player == player]))):
region = world.get_region('Kakariko Village',player)
loc = Location(player, "Flute Activation", parent=region)

View File

@@ -69,7 +69,8 @@ def set_rules(world, player):
elif world.goal[player] == 'completionist':
add_rule(world.get_location('Ganon', player), lambda state: state.everything(player))
if not world.is_tile_swapped(0x18, player):
if (world.flute_mode[player] != 'active' and not world.is_tile_swapped(0x18, player)
and 'Ocarina (Activated)' not in list(map(str, [i for i in world.precollected_items if i.player == player]))):
if not world.is_copied_world:
# Commented out below, this would be needed for rando implementations where Inverted requires flute activation in bunny territory
# kak_region = self.world.get_region('Kakariko Village', player)