Support bunny pocket for SW back and voo hammer house
This commit is contained in:
35
Rules.py
35
Rules.py
@@ -1902,6 +1902,34 @@ def set_bunny_rules(world, player, inverted):
|
||||
return region.is_dark_world
|
||||
else:
|
||||
return region.is_light_world
|
||||
|
||||
# Is it possible to do bunny pocket here
|
||||
def can_bunny_pocket_skull_woods(world, player):
|
||||
# return world.get_entrance(
|
||||
# "Skull Woods Second Section Door (West)", player
|
||||
# ).connected_region.type != RegionType.Dungeon and (
|
||||
# not world.state.can_reach_from("Skull Woods Forest (West)", "Light World", 1)
|
||||
# or not world.state.can_reach_from("Light World", "Skull Woods Forest (West)", 1)
|
||||
# )
|
||||
return world.get_entrance(
|
||||
"Skull Woods Second Section Door (West)", player
|
||||
).connected_region.type == RegionType.Dungeon or (
|
||||
world.state.can_reach_from("Skull Woods Forest (West)", "Light World", 1)
|
||||
and world.state.can_reach_from("Light World", "Skull Woods Forest (West)", 1)
|
||||
)
|
||||
|
||||
def can_bunny_pocket_voo_shop(world, player):
|
||||
# return world.get_entrance(
|
||||
# "Dark World Shop", player
|
||||
# ).connected_region.type != RegionType.Dungeon and (
|
||||
# not world.state.can_reach_from("West Dark World", "Light World", 1)
|
||||
# or not world.state.can_reach_from("Light World", "West Dark World", 1)
|
||||
# )
|
||||
return (
|
||||
world.state.can_reach_from("West Dark World", "Light World", 1)
|
||||
and world.state.can_reach_from("Light World", "West Dark World", 1)
|
||||
)
|
||||
|
||||
|
||||
def get_rule_to_add(region, location=None, connecting_entrance=None):
|
||||
# In OWG, a location can potentially be superbunny-mirror accessible or
|
||||
@@ -1940,6 +1968,10 @@ def set_bunny_rules(world, player, inverted):
|
||||
if region.type == RegionType.Dungeon and new_region.type != RegionType.Dungeon:
|
||||
if entrance.name in OverworldGlitchRules.invalid_mirror_bunny_entrances:
|
||||
continue
|
||||
# Is this a bunny pocketable entrance?
|
||||
if entrance.name == 'Skull Woods Final Section' and not can_bunny_pocket_skull_woods(world, player) or \
|
||||
entrance.name == 'Dark World Shop' and not can_bunny_pocket_voo_shop(world, player):
|
||||
continue
|
||||
if entrance.name in drop_dungeon_entrances:
|
||||
lobby = entrance.connected_region
|
||||
else:
|
||||
@@ -1954,6 +1986,9 @@ def set_bunny_rules(world, player, inverted):
|
||||
elif region.type == RegionType.Cave and new_region.type != RegionType.Cave:
|
||||
if entrance.name in OverworldGlitchRules.invalid_mirror_bunny_entrances:
|
||||
continue
|
||||
if entrance.name == 'Skull Woods Final Section' and not can_bunny_pocket_skull_woods(world, player) or \
|
||||
entrance.name == 'Dark World Shop' and not can_bunny_pocket_voo_shop(world, player):
|
||||
continue
|
||||
if region.name in OverworldGlitchRules.sword_required_superbunny_mirror_regions:
|
||||
possible_options.append(path_to_access_rule(new_path + [lambda state: state.has_Mirror(player) and state.has_sword(player)], entrance))
|
||||
elif region.name in OverworldGlitchRules.boots_required_superbunny_mirror_regions:
|
||||
|
||||
Reference in New Issue
Block a user