diff --git a/OWGSets.py b/OWGSets.py index a1fdc93beb..cb445d2a46 100644 --- a/OWGSets.py +++ b/OWGSets.py @@ -176,4 +176,5 @@ def get_invalid_bunny_revival_dungeons(): return [ 'Tower of Hera (Bottom)', 'Swamp Palace (Entrance)', + 'Turtle Rock (Entrance)', ] \ No newline at end of file diff --git a/Rules.py b/Rules.py index 2a2ef1dfc1..ac36781ee6 100644 --- a/Rules.py +++ b/Rules.py @@ -1340,13 +1340,13 @@ def set_bunny_rules(world, player): return lambda state: any(rule(state) for rule in options) def get_rule_to_add(region, location = None, connecting_entrance = None): - if world.logic[player] == '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(): + # In OWG, a location can potentially be superbunny-mirror accessible or + # bunny revival accessible. + if world.logic[player] == '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: @@ -1437,13 +1437,13 @@ def set_inverted_bunny_rules(world, player): return lambda state: any(rule(state) for rule in options) def get_rule_to_add(region, location = None, connecting_entrance = None): - if world.logic[player] == '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(): + # In OWG, a location can potentially be superbunny-mirror accessible or + # bunny revival accessible. + if world.logic[player] == '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: