fixing mirror bunny stuff

This commit is contained in:
qadan 2020-02-19 19:06:48 -04:00
parent 3015133abd
commit ea4340b796
2 changed files with 11 additions and 10 deletions

View File

@ -176,4 +176,5 @@ def get_invalid_bunny_revival_dungeons():
return [
'Tower of Hera (Bottom)',
'Swamp Palace (Entrance)',
'Turtle Rock (Entrance)',
]

View File

@ -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: