From 2936dfcd9370feb6f8fa32371663ef64c08e1edc Mon Sep 17 00:00:00 2001 From: qadan Date: Wed, 19 Feb 2020 19:00:31 -0400 Subject: [PATCH] fix mirror bunny stuff --- OWGSets.py | 1 + Rules.py | 16 ++++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/OWGSets.py b/OWGSets.py index 9b481bb7..16207ca7 100644 --- a/OWGSets.py +++ b/OWGSets.py @@ -174,4 +174,5 @@ def get_invalid_bunny_revival_dungeons(): return [ 'Tower of Hera (Bottom)', 'Swamp Palace (Entrance)', + 'Turtle Rock (Entrance)', ] diff --git a/Rules.py b/Rules.py index a5e8c1ae..8fcd00d6 100644 --- a/Rules.py +++ b/Rules.py @@ -1575,13 +1575,11 @@ def set_bunny_rules(world, player): def get_rule_to_add(region, location = None, connecting_entrance = None): # In OWG, a location can potentially be superbunny-mirror accessible or # bunny revival accessible. - if world.logic == 'owglitches' and connecting_entrance != None: - if region.name == 'Tower of Hera (Bottom)' and connecting_entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(): - return lambda state: state.can_superbunny_mirror_with_sword(player) or state.has_Pearl(player) - if region.name == 'Turtle Rock (Entrance)' and connecting_entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(): + if world.logic == 'owglitches': + if region.name in OWGSets.get_invalid_bunny_revival_dungeons(): return lambda state: state.has_Mirror(player) or state.has_Pearl(player) if not any([ - location != None and location.name in OWGSets.get_superbunny_accessible_locations() and connecting_entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(), + None not in [location, connecting_entrance] and location.name in OWGSets.get_superbunny_accessible_locations() and connecting_entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(), not region.is_light_world]): return lambda state: state.has_Pearl(player) else: @@ -1675,13 +1673,11 @@ def set_inverted_bunny_rules(world, player): def get_rule_to_add(region, location = None, connecting_entrance = None): # In OWG, a location can potentially be superbunny-mirror accessible or # bunny revival accessible. - if world.logic == 'owglitches' and connecting_entrance != None: - if region.name == 'Tower of Hera (Bottom)' and connecting_entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_lw(): - return lambda state: state.can_superbunny_mirror_with_sword(player) or state.has_Pearl(player) - if region.name == 'Turtle Rock (Entrance)' and connecting_entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_lw(): + if world.logic == 'owglitches': + if region.name in OWGSets.get_invalid_bunny_revival_dungeons(): return lambda state: state.has_Mirror(player) or state.has_Pearl(player) if not any([ - location != None and location.name in OWGSets.get_superbunny_accessible_locations() and connecting_entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(), + None not in [location, connecting_entrance] and location.name in OWGSets.get_superbunny_accessible_locations() and connecting_entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_lw(), not region.is_dark_world]): return lambda state: state.has_Pearl(player) else: