From 7e7efb053388845f8f5a2ab290dd557b31bf3d9d Mon Sep 17 00:00:00 2001 From: codemann8 Date: Thu, 3 Feb 2022 00:25:13 -0600 Subject: [PATCH] Changed GT/AT swap in Mixed OW to prioritize leaving AT vanilla unless GT is the only one in the starting world --- Rules.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Rules.py b/Rules.py index 21a0ffc6..ecff7ba4 100644 --- a/Rules.py +++ b/Rules.py @@ -854,12 +854,13 @@ def default_rules(world, player): def ow_rules(world, player): - if world.mode[player] != 'inverted': + if (0x03 in world.owswaps[player][0]) == (0x1b in world.owswaps[player][0]) and \ + (0x03 not in world.owswaps[player][0]) == world.mode[player] == 'inverted': + set_rule(world.get_entrance('Agahnims Tower', player), lambda state: state.has_crystals(world.crystals_needed_for_gt[player], player)) + else: set_rule(world.get_entrance('Agahnims Tower', player), lambda state: state.has('Cape', player) or state.has_beam_sword(player) or state.has('Beat Agahnim 1', player)) # barrier gets removed after killing agahnim, relevant for entrance shuffle set_rule(world.get_entrance('GT Entry Approach', player), lambda state: state.has_crystals(world.crystals_needed_for_gt[player], player)) set_rule(world.get_entrance('GT Entry Leave', player), lambda state: state.has_crystals(world.crystals_needed_for_gt[player], player) or state.world.shuffle[player] in ('restricted', 'full', 'lite', 'lean', 'crossed', 'insanity')) - else: - set_rule(world.get_entrance('Agahnims Tower', player), lambda state: state.has_crystals(world.crystals_needed_for_gt[player], player)) if not world.is_tile_swapped(0x00, player): set_rule(world.get_entrance('Lost Woods East Mirror Spot', player), lambda state: state.has_Mirror(player)) @@ -1524,7 +1525,8 @@ def swordless_rules(world, player): set_rule(world.get_location('Ganon', player), lambda state: state.has('Hammer', player) and state.has_fire_source(player) and state.has('Silver Arrows', player) and state.can_shoot_arrows(player) and state.has_crystals(world.crystals_needed_for_ganon[player], player)) set_rule(world.get_entrance('Ganon Drop', player), lambda state: state.has('Hammer', player)) # need to damage ganon to get tiles to drop - if world.mode[player] != 'inverted': + if not ((0x03 in world.owswaps[player][0]) == (0x1b in world.owswaps[player][0]) and \ + (0x03 not in world.owswaps[player][0]) == world.mode[player] == 'inverted'): set_rule(world.get_entrance('Agahnims Tower', player), lambda state: state.has('Cape', player) or state.has('Hammer', player) or state.has('Beat Agahnim 1', player)) # barrier gets removed after killing agahnim, relevant for entrance shuffle set_rule(world.get_entrance('Misery Mire', player), lambda state: state.has_misery_mire_medallion(player)) # sword not required to use medallion for opening in swordless (!)