From 67a0afc6fadf19def0fa8e55a31428897f181d62 Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Sun, 26 Apr 2020 22:52:04 +1000 Subject: [PATCH] More moon pearl / superbunny fixes Use the Catfish region properly, so Catfish Descent works. # Conflicts: # InvertedRegions.py --- EntranceShuffle.py | 2 +- InvertedRegions.py | 6 +++--- OWGSets.py | 15 +++++++++++---- Rules.py | 14 +++++--------- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/EntranceShuffle.py b/EntranceShuffle.py index 1e93eebd..d08cb42d 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -3245,7 +3245,7 @@ inverted_mandatory_connections = [('Lake Hylia Central Island Pier', 'Lake Hylia ('West Dark World Mirror Spot', 'West Dark World'), ('South Dark World Mirror Spot', 'South Dark World'), ('Potion Shop Mirror Spot', 'Northeast Dark World'), - ('Northeast Dark World Mirror Spot', 'Northeast Dark World'), + ('Catfish Mirror Spot', 'Catfish'), ('Shopping Mall Mirror Spot', 'Dark Lake Hylia Ledge'), ('Skull Woods Mirror Spot', 'Skull Woods Forest (West)'), ('DDM Flute', 'The Sky'), diff --git a/InvertedRegions.py b/InvertedRegions.py index dcadc38f..47975e89 100644 --- a/InvertedRegions.py +++ b/InvertedRegions.py @@ -29,7 +29,7 @@ def create_inverted_regions(world, player): "Blind\'s Hideout - Right", "Blind\'s Hideout - Far Left", "Blind\'s Hideout - Far Right"]), - create_lw_region(player, 'Northeast Light World', None, ['Zoras River', 'Waterfall of Wishing', 'Potion Shop Outer Rock', 'Northeast Dark World Mirror Spot']), + create_lw_region(player, 'Northeast Light World', None, ['Zoras River', 'Waterfall of Wishing', 'Potion Shop Outer Rock', 'Catfish Mirror Spot']), create_lw_region(player, 'Potion Shop Area', None, ['Potion Shop', 'Potion Shop Inner Bushes', 'Potion Shop Inner Rock', 'Potion Shop Mirror Spot', 'Potion Shop River Drop']), create_lw_region(player, 'Graveyard Cave Area', None, ['Graveyard Cave', 'Graveyard Cave Inner Bushes', 'Graveyard Cave Mirror Spot']), create_lw_region(player, 'River', None, ['Light World Pier', 'Potion Shop Pier']), @@ -165,13 +165,13 @@ def create_inverted_regions(world, player): create_dw_region(player, 'East Dark World', ['Pyramid'], ['Pyramid Fairy', 'South Dark World Bridge', 'Palace of Darkness', 'Dark Lake Hylia Drop (East)', 'Dark Lake Hylia Fairy', 'Palace of Darkness Hint', 'East Dark World Hint', 'Northeast Dark World Broken Bridge Pass', 'East Dark World Teleporter', 'EDW Flute', - 'Hammer Pegs River Clip Spot', 'Dark Lake Hylia Ledge Clip Spot', 'Dark Desert Cliffs Clip Spot']), + 'Hammer Pegs River Clip Spot', 'Dark Lake Hylia Ledge Clip Spot']), create_dw_region(player, 'Catfish', ['Catfish'], ['Catfish Exit Rock']), create_dw_region(player, 'Northeast Dark World', None, ['West Dark World Gap', 'Dark World Potion Shop', 'East Dark World Broken Bridge Pass', 'NEDW Flute', 'Dark Lake Hylia Teleporter', 'Catfish Entrance Rock']), create_cave_region(player, 'Palace of Darkness Hint', 'a storyteller'), create_cave_region(player, 'East Dark World Hint', 'a storyteller'), create_dw_region(player, 'South Dark World', ['Stumpy', 'Digging Game'], ['Dark Lake Hylia Drop (South)', 'Hype Cave', 'Swamp Palace', 'Village of Outcasts Heavy Rock', 'East Dark World Bridge', 'Inverted Links House', 'Archery Game', 'Bonk Fairy (Dark)', - 'Dark Lake Hylia Shop', 'South Dark World Teleporter', 'Post Aga Teleporter', 'SDW Flute']), + 'Dark Lake Hylia Shop', 'South Dark World Teleporter', 'Post Aga Teleporter', 'SDW Flute', 'Dark Desert Cliffs Clip Spot']), create_cave_region(player, 'Inverted Big Bomb Shop', 'the bomb shop'), create_cave_region(player, 'Archery Game', 'a game of skill'), create_dw_region(player, 'Dark Lake Hylia', None, ['East Dark World Pier', 'Dark Lake Hylia Ledge Pier', 'Ice Palace', 'Dark Lake Hylia Central Island Teleporter']), diff --git a/OWGSets.py b/OWGSets.py index 43a13141..5e414221 100644 --- a/OWGSets.py +++ b/OWGSets.py @@ -47,9 +47,6 @@ def get_invalid_mirror_bunny_entrances_dw(): def get_invalid_mirror_bunny_entrances_lw(): ''' Light World entrances that can't be superbunny-mirrored into. - A couple of these, like Blind's Hideout, are odd cases where the pixel - leading into the entrance prevents mirror superbunnying - generally due to - there being stairs there. ''' return [ 'Bonk Rock Cave', @@ -62,9 +59,10 @@ def get_invalid_mirror_bunny_entrances_lw(): 'Light World Bomb Hut', 'Mini Moldorm Cave', 'Ice Rod Cave', - 'Hyrule Castle Secret Entrance Stairs', 'Sanctuary Grave', 'Kings Grave', + #todo: you can for insanity shuffle + 'Hyrule Castle Secret Entrance Stairs', 'Tower of Hera', ] @@ -91,6 +89,15 @@ def get_superbunny_accessible_locations(): 'Pyramid Fairy - Right', 'Superbunny Cave - Top', 'Superbunny Cave - Bottom', + 'Blind\'s Hideout - Left', + 'Blind\'s Hideout - Right', + 'Blind\'s Hideout - Far Left', + 'Blind\'s Hideout - Far Right', + 'Kakariko Well - Left', + 'Kakariko Well - Middle', + 'Kakariko Well - Right', + 'Kakariko Well - Bottom', + 'Library' ] diff --git a/Rules.py b/Rules.py index 81f98dc8..09f03c2b 100644 --- a/Rules.py +++ b/Rules.py @@ -570,7 +570,7 @@ def inverted_rules(world, player): set_rule(world.get_location('Ether Tablet', player), lambda state: state.has('Book of Mudora', player) and state.has_beam_sword(player)) set_rule(world.get_entrance('East Death Mountain (Top)', player), lambda state: state.has('Hammer', player) and state.has_Pearl(player)) # bunny can not use hammer - set_rule(world.get_location('Catfish', player), lambda state: state.can_lift_rocks(player) or (state.has('Flippers', player) and state.has_Mirror(player) and state.has_Pearl(player) and state.can_reach('Light World', 'Region', player))) + set_rule(world.get_entrance('Catfish Entrance Rock', player), lambda state: state.can_lift_rocks(player)) set_rule(world.get_entrance('Northeast Dark World Broken Bridge Pass', player), lambda state: ((state.can_lift_rocks(player) or state.has('Hammer', player)) or state.has('Flippers', player))) set_rule(world.get_entrance('East Dark World Broken Bridge Pass', player), lambda state: (state.can_lift_rocks(player) or state.has('Hammer', player))) set_rule(world.get_entrance('South Dark World Bridge', player), lambda state: state.has('Hammer', player)) @@ -634,7 +634,7 @@ def inverted_rules(world, player): set_rule(world.get_entrance('East Dark World Mirror Spot', player), lambda state: state.has_Mirror(player)) set_rule(world.get_entrance('West Dark World Mirror Spot', player), lambda state: state.has_Mirror(player)) set_rule(world.get_entrance('South Dark World Mirror Spot', player), lambda state: state.has_Mirror(player)) - set_rule(world.get_entrance('Northeast Dark World Mirror Spot', player), lambda state: state.has_Mirror(player)) + set_rule(world.get_entrance('Catfish Mirror Spot', player), lambda state: state.has_Mirror(player)) set_rule(world.get_entrance('Potion Shop Mirror Spot', player), lambda state: state.has_Mirror(player)) set_rule(world.get_entrance('Shopping Mall Mirror Spot', player), lambda state: state.has_Mirror(player)) set_rule(world.get_entrance('Maze Race Mirror Spot', player), lambda state: state.has_Mirror(player)) @@ -1613,7 +1613,7 @@ def set_bunny_rules(world, player): 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)) if location is not None and location.name in OWGSets.get_superbunny_accessible_locations(): - if new_region.name == 'Superbunny Cave (Bottom)': + if new_region.name == 'Superbunny Cave (Bottom)' or region.name == 'Kakariko Well (top)': 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)) @@ -1650,8 +1650,6 @@ def set_bunny_rules(world, player): continue if entrance.connected_region.name == 'Turtle Rock (Entrance)': add_rule(world.get_entrance('Turtle Rock Entrance Gap', player), get_rule_to_add(entrance.connected_region, None, entrance)) - if entrance.name in OWGSets.get_invalid_mirror_bunny_entrances_dw(): - continue for location in entrance.connected_region.locations: if world.logic == 'owglitches' and entrance.name in OWGSets.get_invalid_mirror_bunny_entrances_dw(): add_rule(location, get_rule_to_add(entrance.connected_region, location, entrance)) @@ -1667,7 +1665,7 @@ def set_inverted_bunny_rules(world, player): bunny_impassable_caves = ['Bumper Cave', 'Two Brothers House', 'Hookshot Cave', 'Skull Woods First Section (Right)', 'Skull Woods First Section (Left)', 'Skull Woods First Section (Top)', 'Turtle Rock (Entrance)', 'Turtle Rock (Second Section)', 'Turtle Rock (Big Chest)', 'Skull Woods Second Section (Drop)', 'Turtle Rock (Eye Bridge)', 'Sewers', 'Pyramid', 'Spiral Cave (Top)', 'Desert Palace Main (Inner)', 'Fairy Ascension Cave (Drop)', 'The Sky'] - 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', 'Spectacle Rock', 'Bombos Tablet', 'Ether Tablet', 'Purple Chest', 'Blacksmith', 'Missing Smith', 'Master Sword Pedestal', 'Bottle Merchant'] + 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', 'Spectacle Rock', 'Bombos Tablet', 'Ether Tablet', 'Purple Chest', 'Blacksmith', 'Missing Smith', 'Master Sword Pedestal', 'Bottle Merchant', 'Sunken Treasure', 'Desert Ledge'] def path_to_access_rule(path, entrance): @@ -1720,7 +1718,7 @@ def set_inverted_bunny_rules(world, player): 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)) if location is not None and location.name in OWGSets.get_superbunny_accessible_locations(): - if new_region.name == 'Superbunny Cave (Bottom)': + if new_region.name == 'Superbunny Cave (Bottom)' or region.name == 'Kakariko Well (top)': 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)) @@ -1758,8 +1756,6 @@ def set_inverted_bunny_rules(world, player): continue if entrance.connected_region.name == 'Turtle Rock (Entrance)': add_rule(world.get_entrance('Turtle Rock Entrance Gap', player), get_rule_to_add(entrance.connected_region, None, entrance)) - if entrance.name in OWGSets.get_invalid_mirror_bunny_entrances_lw(): - continue for location in entrance.connected_region.locations: if world.logic == 'owglitches' and entrance.name in OWGSets.get_invalid_mirror_bunny_entrances_lw(): add_rule(location, get_rule_to_add(entrance.connected_region, location, entrance))