From a987e58fc9079ef2d0358c2438dda1ac59df81c7 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 17 Jul 2023 01:37:55 -0500 Subject: [PATCH] Adding Flute Activation only if an activated flute cannot be found elsewhere --- ItemList.py | 3 ++- Rules.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ItemList.py b/ItemList.py index bb23ecec..7fe75e3b 100644 --- a/ItemList.py +++ b/ItemList.py @@ -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) diff --git a/Rules.py b/Rules.py index f1383ee6..024c1436 100644 --- a/Rules.py +++ b/Rules.py @@ -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)