Fixed various Flute logic issues and improved logic efficiency

This commit is contained in:
codemann8
2023-04-01 07:59:13 -05:00
parent d216cb337b
commit 3eeeda363b
5 changed files with 27 additions and 8 deletions

View File

@@ -70,6 +70,13 @@ 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 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 Area', player)
# add_rule(world.get_location('Flute Activation', player), lambda state: state.has('Ocarina', player) and state.is_not_bunny(kak_region, player))
add_rule(world.get_location('Flute Activation', player), lambda state: state.has('Ocarina', player))
# if swamp and dam have not been moved we require mirror for swamp palace
if not world.swamp_patch_required[player]:
add_rule(world.get_entrance('Swamp Lobby Moat', player), lambda state: state.has_Mirror(player))