diff --git a/EntranceShuffle.py b/EntranceShuffle.py index 50c9a0f6..1e93eebd 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -2957,6 +2957,7 @@ mandatory_connections = [('Lake Hylia Central Island Pier', 'Lake Hylia Central ('Cave 45 Mirror Spot', 'Cave 45 Ledge'), ('Bombos Tablet Mirror Spot', 'Bombos Tablet Ledge'), ('Graveyard Ledge Mirror Spot', 'Graveyard Ledge'), + ('Superbunny Cave Climb', 'Superbunny Cave (Top)'), ('Swamp Palace Moat', 'Swamp Palace (First Room)'), ('Swamp Palace Small Key Door', 'Swamp Palace (Starting Area)'), @@ -3132,6 +3133,7 @@ inverted_mandatory_connections = [('Lake Hylia Central Island Pier', 'Lake Hylia ('Fairy Ascension Cave Pots', 'Fairy Ascension Cave (Bottom)'), ('Fairy Ascension Cave Drop', 'Fairy Ascension Cave (Drop)'), ('Dark Death Mountain Drop (East)', 'Dark Death Mountain (East Bottom)'), + ('Superbunny Cave Climb', 'Superbunny Cave (Top)'), ('Swamp Palace Moat', 'Swamp Palace (First Room)'), ('Swamp Palace Small Key Door', 'Swamp Palace (Starting Area)'), ('Swamp Palace (Center)', 'Swamp Palace (Center)'), @@ -3431,10 +3433,10 @@ default_connections = [('Waterfall of Wishing', 'Waterfall of Wishing'), ('Dark Desert Fairy', 'Dark Desert Healer Fairy'), ('Spike Cave', 'Spike Cave'), ('Hookshot Cave', 'Hookshot Cave'), - ('Superbunny Cave (Top)', 'Superbunny Cave'), + ('Superbunny Cave (Top)', 'Superbunny Cave (Top)'), ('Cave Shop (Dark Death Mountain)', 'Cave Shop (Dark Death Mountain)'), ('Dark Death Mountain Fairy', 'Dark Death Mountain Healer Fairy'), - ('Superbunny Cave (Bottom)', 'Superbunny Cave'), + ('Superbunny Cave (Bottom)', 'Superbunny Cave (Bottom)'), ('Superbunny Cave Exit (Top)', 'Dark Death Mountain (Top)'), ('Superbunny Cave Exit (Bottom)', 'Dark Death Mountain (East Bottom)'), ('Hookshot Cave Exit (South)', 'Dark Death Mountain (Top)'), @@ -3565,9 +3567,9 @@ inverted_default_connections = [('Waterfall of Wishing', 'Waterfall of Wishing' ('Dark Desert Fairy', 'Dark Desert Healer Fairy'), ('Spike Cave', 'Spike Cave'), ('Hookshot Cave', 'Hookshot Cave'), - ('Superbunny Cave (Top)', 'Superbunny Cave'), + ('Superbunny Cave (Top)', 'Superbunny Cave (Top)'), ('Cave Shop (Dark Death Mountain)', 'Cave Shop (Dark Death Mountain)'), - ('Superbunny Cave (Bottom)', 'Superbunny Cave'), + ('Superbunny Cave (Bottom)', 'Superbunny Cave (Bottom)'), ('Superbunny Cave Exit (Bottom)', 'Dark Death Mountain (East Bottom)'), ('Hookshot Cave Exit (North)', 'Death Mountain Floating Island (Dark World)'), ('Hookshot Cave Back Entrance', 'Hookshot Cave'), diff --git a/InvertedRegions.py b/InvertedRegions.py index 4bd6b454..dcadc38f 100644 --- a/InvertedRegions.py +++ b/InvertedRegions.py @@ -214,8 +214,8 @@ def create_inverted_regions(world, player): create_dw_region(player, 'Turtle Rock (Top)', None, ['Dark Death Mountain Teleporter (East)', 'Turtle Rock Drop']), create_dw_region(player, 'Dark Death Mountain Isolated Ledge', None, ['Turtle Rock Isolated Ledge Entrance']), create_dw_region(player, 'Dark Death Mountain (East Bottom)', None, ['Superbunny Cave (Bottom)', 'Cave Shop (Dark Death Mountain)', 'Dark Death Mountain Teleporter (East Bottom)', 'EDDM Flute']), - create_cave_region(player, 'Superbunny Cave', 'a connector', ['Superbunny Cave - Top', 'Superbunny Cave - Bottom'], - ['Superbunny Cave Exit (Top)', 'Superbunny Cave Exit (Bottom)']), + create_cave_region(player, 'Superbunny Cave (Top)', 'a connector', ['Superbunny Cave - Top', 'Superbunny Cave - Bottom'], ['Superbunny Cave Exit (Top)']), + create_cave_region(player, 'Superbunny Cave (Bottom)', 'a connector', None, ['Superbunny Cave Climb', 'Superbunny Cave Exit (Bottom)']), create_cave_region(player, 'Spike Cave', 'Spike Cave', ['Spike Cave']), create_cave_region(player, 'Hookshot Cave', 'a connector', ['Hookshot Cave - Top Right', 'Hookshot Cave - Top Left', 'Hookshot Cave - Bottom Right', 'Hookshot Cave - Bottom Left'], ['Hookshot Cave Exit (South)', 'Hookshot Cave Exit (North)']), diff --git a/Regions.py b/Regions.py index 6ce865ca..3d3d67ae 100644 --- a/Regions.py +++ b/Regions.py @@ -202,8 +202,8 @@ def create_regions(world, player): create_dw_region(player, 'Dark Death Mountain Ledge', None, ['Dark Death Mountain Ledge (East)', 'Dark Death Mountain Ledge (West)', 'Mimic Cave Mirror Spot', 'Spiral Cave Mirror Spot']), create_dw_region(player, 'Dark Death Mountain Isolated Ledge', None, ['Isolated Ledge Mirror Spot', 'Turtle Rock Isolated Ledge Entrance']), create_dw_region(player, 'Dark Death Mountain (East Bottom)', None, ['Superbunny Cave (Bottom)', 'Cave Shop (Dark Death Mountain)', 'Fairy Ascension Mirror Spot']), - create_cave_region(player, 'Superbunny Cave', 'a connector', ['Superbunny Cave - Top', 'Superbunny Cave - Bottom'], - ['Superbunny Cave Exit (Top)', 'Superbunny Cave Exit (Bottom)']), + create_cave_region(player, 'Superbunny Cave (Top)', 'a connector', ['Superbunny Cave - Top', 'Superbunny Cave - Bottom'], ['Superbunny Cave Exit (Top)']), + create_cave_region(player, 'Superbunny Cave (Bottom)', 'a connector', None, ['Superbunny Cave Climb', 'Superbunny Cave Exit (Bottom)']), create_cave_region(player, 'Spike Cave', 'Spike Cave', ['Spike Cave']), create_cave_region(player, 'Hookshot Cave', 'a connector', ['Hookshot Cave - Top Right', 'Hookshot Cave - Top Left', 'Hookshot Cave - Bottom Right', 'Hookshot Cave - Bottom Left'], ['Hookshot Cave Exit (South)', 'Hookshot Cave Exit (North)']), diff --git a/Rules.py b/Rules.py index 404e4332..bbef4f9f 100644 --- a/Rules.py +++ b/Rules.py @@ -56,6 +56,8 @@ def set_rules(world, player): if world.mode != 'inverted': set_big_bomb_rules(world, player) + if world.logic == 'owglitches': + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_reach('Dark Death Mountain (West Bottom)', 'Region', player) and state.has_Mirror(player), 'or') else: set_inverted_big_bomb_rules(world, player) @@ -253,7 +255,6 @@ def global_rules(world, player): set_rule(world.get_entrance('Spiral Cave Mirror Spot', player), lambda state: state.has_Mirror(player)) set_rule(world.get_entrance('Fairy Ascension Mirror Spot', player), lambda state: state.has_Mirror(player) and state.has_Pearl(player)) # need to lift flowers set_rule(world.get_entrance('Isolated Ledge Mirror Spot', player), lambda state: state.has_Mirror(player)) - set_rule(world.get_entrance('Superbunny Cave Exit (Bottom)', player), lambda state: False) # Cannot get to bottom exit from top. Just exists for shuffling set_rule(world.get_location('Spike Cave', player), lambda state: state.has('Hammer', player) and state.can_lift_rocks(player) and @@ -606,7 +607,6 @@ def inverted_rules(world, player): set_rule(world.get_entrance('Dark Death Mountain Ledge Mirror Spot (East)', player), lambda state: state.has_Mirror(player)) set_rule(world.get_entrance('Dark Death Mountain Ledge Mirror Spot (West)', player), lambda state: state.has_Mirror(player)) set_rule(world.get_entrance('Laser Bridge Mirror Spot', player), lambda state: state.has_Mirror(player)) - set_rule(world.get_entrance('Superbunny Cave Exit (Bottom)', player), lambda state: False) # Cannot get to bottom exit from top. Just exists for shuffling set_rule(world.get_location('Spike Cave', player), lambda state: state.has('Hammer', player) and state.can_lift_rocks(player) and @@ -988,11 +988,10 @@ def overworld_glitches_rules(world, player): # Regions that require the boots and some other stuff. if world.mode != 'inverted': - set_rule(world.get_entrance('Dark Desert Teleporter', player), lambda state: (state.has('Ocarina', player) or state.can_boots_clip_dw(player)) and state.can_lift_heavy_rocks(player)) - set_rule(world.get_entrance('Turtle Rock Teleporter', player), lambda state: (state.can_boots_clip_dw(player) or state.can_lift_heavy_rocks(player)) and state.has('Hammer', player)) + set_rule(world.get_entrance('Dark Desert Teleporter', player), lambda state: (state.has('Ocarina', player) or state.can_boots_clip_lw(player)) and state.can_lift_heavy_rocks(player)) + set_rule(world.get_entrance('Turtle Rock Teleporter', player), lambda state: (state.can_boots_clip_lw(player) or state.can_lift_heavy_rocks(player)) and state.has('Hammer', player)) add_rule(world.get_entrance('Catfish Exit Rock', player), lambda state: state.can_boots_clip_dw(player), 'or') add_rule(world.get_entrance('East Dark World Broken Bridge Pass', player), lambda state: state.can_boots_clip_dw(player), 'or') - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_reach('Dark Death Mountain (West Bottom)', 'Region', player) and state.has_Mirror(player)) else: add_rule(world.get_entrance('South Dark World Teleporter', player), lambda state: state.has_Boots(player) and state.can_lift_rocks(player), 'or') @@ -1562,7 +1561,6 @@ def set_bunny_rules(world, player): bunny_accessible_locations = ['Link\'s Uncle', 'Sahasrahla', 'Sick Kid', 'Lost Woods Hideout', 'Lumberjack Tree', 'Checkerboard Cave', 'Potion Shop', 'Spectacle Rock Cave', 'Pyramid', 'Hype Cave - Generous Guy', 'Peg Cave', 'Bumper Cave Ledge', 'Dark Blacksmith Ruins'] - def path_to_access_rule(path, entrance): return lambda state: state.can_reach(entrance) and all(rule(state) for rule in path) @@ -1610,11 +1608,15 @@ def set_bunny_rules(world, player): if world.logic == 'owglitches' and entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_dw(): if new_region.name == 'Two Brothers House': possible_options.append(lambda state: path_to_access_rule(new_path, entrance) and state.has_Mirror(player) and state.has_Boots(player)) - for location in entrance.connected_region.locations: - if location.name in OWGSets.get_superbunny_accessible_locations(): + if location is not None and location.name in OWGSets.get_superbunny_accessible_locations(): + if new_region.name == 'Superbunny Cave (Bottom)': + possible_options.append(lambda state: path_to_access_rule(new_path, entrance)) + else: possible_options.append(lambda state: path_to_access_rule(new_path, entrance) and state.has_Mirror(player)) - continue - continue + if new_region.type != RegionType.Cave: + continue + else: + continue if new_region.is_dark_world: queue.append((new_region, new_path)) else: @@ -1711,11 +1713,15 @@ def set_inverted_bunny_rules(world, player): if world.logic == 'owglitches' and entrance.name not in OWGSets.get_invalid_mirror_bunny_entrances_lw(): if new_region.name == 'Two Brothers House': possible_options.append(lambda state: path_to_access_rule(new_path, entrance) and state.has_Mirror(player) and state.has_Boots(player)) - for location in entrance.connected_region.locations: - if location.name in OWGSets.get_superbunny_accessible_locations(): + if location is not None and location.name in OWGSets.get_superbunny_accessible_locations(): + if new_region.name == 'Superbunny Cave (Bottom)': + possible_options.append(lambda state: path_to_access_rule(new_path, entrance)) + else: possible_options.append(lambda state: path_to_access_rule(new_path, entrance) and state.has_Mirror(player)) - continue - continue + if new_region.type != RegionType.Cave: + continue + else: + continue if new_region.is_light_world: queue.append((new_region, new_path)) else: