From bd53400fecf73f64d0e3b7fb85bb3943f55cf882 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 6 Dec 2022 22:21:35 -0600 Subject: [PATCH] Replaced all references of Inverted-variant regions/exits --- BaseClasses.py | 5 +- DoorShuffle.py | 10 +- EntranceShuffle.py | 338 ++++++++++--------------- InvertedRegions.py | 18 +- KeyDoorShuffle.py | 16 +- Main.py | 5 +- OverworldGlitchRules.py | 2 +- Regions.py | 9 +- Rom.py | 18 +- Rules.py | 20 +- source/item/District.py | 10 - source/item/FillUtil.py | 2 +- source/overworld/EntranceShuffle2.py | 171 ++++++------- test/inverted/TestInvertedBombRules.py | 8 +- test/inverted/TestInvertedEntrances.py | 40 +-- 15 files changed, 282 insertions(+), 390 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index d7724a98..0625a3cb 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -265,6 +265,9 @@ class World(object): return portal raise RuntimeError('No such portal %s for player %d' % (portal_name, player)) + def is_atgt_swapped(self, player): + return self.mode[player] == 'inverted' + def check_for_door(self, doorname, player): if isinstance(doorname, Door): return doorname @@ -2845,8 +2848,6 @@ class Pot(object): return [self.x, high_byte, item] def get_region(self, world, player): - if world.mode[player] == 'inverted' and self.room == 'Links House': - return world.get_region('Inverted Links House', 1) return world.get_region(self.room, 1) def __eq__(self, other): diff --git a/DoorShuffle.py b/DoorShuffle.py index bab0bf56..c212e990 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -610,8 +610,6 @@ def analyze_portals(world, player): def connect_portal(portal, world, player): ent, ext, entrance_name = portal_map[portal.name] - if world.mode[player] == 'inverted' and portal.name in ['Ganons Tower', 'Agahnims Tower']: - ext = 'Inverted ' + ext portal_entrance = world.get_entrance(portal.door.entrance.name, player) # ensures I get the right one for copying target_exit = world.get_entrance(ext, player) portal_entrance.connected_region = target_exit.parent_region @@ -3192,7 +3190,7 @@ def find_inaccessible_regions(world, player): if world.mode[player] != 'inverted': start_regions = ['Links House', 'Sanctuary'] else: - start_regions = ['Inverted Links House', 'Inverted Dark Sanctuary'] + start_regions = ['Links House', 'Dark Sanctuary Hint'] regs = convert_regions(start_regions, world, player) all_regions = set([r for r in world.regions if r.player == player and r.type is not RegionType.Dungeon]) visited_regions = set() @@ -3200,7 +3198,7 @@ def find_inaccessible_regions(world, player): while len(queue) > 0: next_region = queue.popleft() visited_regions.add(next_region) - if next_region.name == 'Inverted Dark Sanctuary': # special spawn point in cave + if next_region.name == 'Dark Sanctuary Hint': # special spawn point in cave for ent in next_region.entrances: parent = ent.parent_region if parent and parent.type is not RegionType.Dungeon and parent not in queue and parent not in visited_regions: @@ -3230,9 +3228,9 @@ def find_accessible_entrances(world, player, builder): hc_std = True start_regions = ['Hyrule Castle Courtyard'] elif world.mode[player] != 'inverted': - start_regions = ['Links House', 'Sanctuary'] + start_regions = ['Links House', 'Sanctuary', 'West Dark World'] else: - start_regions = ['Inverted Links House', 'Inverted Dark Sanctuary', 'Hyrule Castle Ledge'] + start_regions = ['Links House', 'Dark Sanctuary Hint', 'Hyrule Castle Ledge'] regs = convert_regions(start_regions, world, player) visited_regions = set() visited_entrances = [] diff --git a/EntranceShuffle.py b/EntranceShuffle.py index c2806835..c373ab78 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -718,12 +718,12 @@ def link_inverted_entrances(world, player): lw_entrances.append('Hyrule Castle Entrance (South)') if not world.shuffle_ganon: - connect_two_way(world, 'Inverted Ganons Tower', 'Inverted Ganons Tower Exit', player) + connect_two_way(world, 'Agahnims Tower', 'Ganons Tower Exit', player) hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'] else: - lw_entrances.append('Inverted Ganons Tower') - dungeon_exits.append('Inverted Ganons Tower Exit') - hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Inverted Ganons Tower'] + lw_entrances.append('Agahnims Tower') + dungeon_exits.append('Ganons Tower Exit') + hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Agahnims Tower'] # shuffle aga door first. If it's on HC ledge, remaining HC ledge door must be must-exit all_entrances_aga = lw_entrances + dw_entrances @@ -745,8 +745,8 @@ def link_inverted_entrances(world, player): elif aga_door in dw_entrances: dw_entrances.remove(aga_door) - connect_two_way(world, aga_door, 'Inverted Agahnims Tower Exit', player) - dungeon_exits.remove('Inverted Agahnims Tower Exit') + connect_two_way(world, aga_door, 'Agahnims Tower Exit', player) + dungeon_exits.remove('Agahnims Tower Exit') connect_mandatory_exits(world, lw_entrances, dungeon_exits, lw_dungeon_entrances_must_exit, player) @@ -786,11 +786,11 @@ def link_inverted_entrances(world, player): # place links house if not world.shufflelinks[player]: - links_house = 'Inverted Links House' + links_house = 'Big Bomb Shop' else: links_house_doors = [i for i in DW_Single_Cave_Doors if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) - connect_two_way(world, links_house, 'Inverted Links House Exit', player) + connect_two_way(world, links_house, 'Links House Exit', player) connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should match link's house if links_house in bomb_shop_doors: bomb_shop_doors.remove(links_house) @@ -804,8 +804,8 @@ def link_inverted_entrances(world, player): sanc_door = random.choice(sanc_doors) bomb_shop_doors.remove(sanc_door) - connect_entrance(world, sanc_door, 'Inverted Dark Sanctuary', player) - world.get_entrance('Inverted Dark Sanctuary Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) + connect_entrance(world, sanc_door, 'Dark Sanctuary Hint', player) + world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) lw_dm_entrances = ['Paradox Cave (Bottom)', 'Paradox Cave (Middle)', 'Paradox Cave (Top)', 'Old Man House (Bottom)', 'Fairy Ascension Cave (Bottom)', 'Fairy Ascension Cave (Top)', 'Spiral Cave (Bottom)', 'Old Man Cave (East)', @@ -843,7 +843,7 @@ def link_inverted_entrances(world, player): bomb_shop_doors = [door for door in bomb_shop_doors[:]] random.shuffle(bomb_shop_doors) bomb_shop = bomb_shop_doors.pop() - connect_entrance(world, bomb_shop, 'Inverted Big Bomb Shop', player) + connect_entrance(world, bomb_shop, 'Big Bomb Shop', player) single_doors.extend(bomb_shop_doors) # tavern back door cannot be shuffled yet @@ -867,11 +867,11 @@ def link_inverted_entrances(world, player): # place links house if not world.shufflelinks[player]: - links_house = 'Inverted Links House' + links_house = 'Big Bomb Shop' else: links_house_doors = [i for i in dw_entrances if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) - connect_two_way(world, links_house, 'Inverted Links House Exit', player) + connect_two_way(world, links_house, 'Links House Exit', player) connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should match link's house if links_house in dw_entrances: dw_entrances.remove(links_house) @@ -880,8 +880,8 @@ def link_inverted_entrances(world, player): sanc_doors = [door for door in Inverted_Dark_Sanctuary_Doors if door in dw_entrances] sanc_door = random.choice(sanc_doors) dw_entrances.remove(sanc_door) - connect_entrance(world, sanc_door, 'Inverted Dark Sanctuary', player) - world.get_entrance('Inverted Dark Sanctuary Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) + connect_entrance(world, sanc_door, 'Dark Sanctuary Hint', player) + world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) # tavern back door cannot be shuffled yet connect_doors(world, ['Tavern North'], ['Tavern'], player) @@ -916,7 +916,7 @@ def link_inverted_entrances(world, player): bomb_shop_doors = [door for door in bomb_shop_doors if door in all_entrances] random.shuffle(bomb_shop_doors) bomb_shop = bomb_shop_doors.pop() - connect_entrance(world, bomb_shop, 'Inverted Big Bomb Shop', player) + connect_entrance(world, bomb_shop, 'Big Bomb Shop', player) if bomb_shop in lw_entrances: lw_entrances.remove(bomb_shop) if bomb_shop in dw_entrances: @@ -942,7 +942,7 @@ def link_inverted_entrances(world, player): lw_entrances = list(Inverted_LW_Entrances + Inverted_LW_Dungeon_Entrances + Inverted_LW_Single_Cave_Doors) dw_entrances = list(Inverted_DW_Entrances + Inverted_DW_Dungeon_Entrances + Inverted_DW_Single_Cave_Doors + Inverted_Old_Man_Entrances) lw_must_exits = list(Inverted_LW_Dungeon_Entrances_Must_Exit + Inverted_LW_Entrances_Must_Exit) - old_man_entrances = list(Inverted_Old_Man_Entrances + Old_Man_Entrances + ['Inverted Agahnims Tower', 'Tower of Hera']) + old_man_entrances = list(Inverted_Old_Man_Entrances + Old_Man_Entrances + ['Ganons Tower', 'Tower of Hera']) caves = list(Cave_Exits + Dungeon_Exits + Cave_Three_Exits) # don't need to consider three exit caves, have one exit caves to avoid parity issues bomb_shop_doors = list(Inverted_Bomb_Shop_Single_Cave_Doors + Inverted_Bomb_Shop_Multi_Cave_Doors) blacksmith_doors = list(Inverted_Blacksmith_Single_Cave_Doors + Inverted_Blacksmith_Multi_Cave_Doors) @@ -965,16 +965,16 @@ def link_inverted_entrances(world, player): if not world.shuffle_ganon: - connect_two_way(world, 'Inverted Ganons Tower', 'Inverted Ganons Tower Exit', player) + connect_two_way(world, 'Agahnims Tower', 'Ganons Tower Exit', player) hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'] else: - lw_entrances.append('Inverted Ganons Tower') - caves.append('Inverted Ganons Tower Exit') - hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Inverted Ganons Tower'] + lw_entrances.append('Agahnims Tower') + caves.append('Ganons Tower Exit') + hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Agahnims Tower'] # shuffle aga door first. if it's on hc ledge, then one other hc ledge door has to be must_exit all_entrances_aga = lw_entrances + dw_entrances - aga_doors = [i for i in all_entrances_aga if world.shufflelinks[player] or i != 'Inverted Links House'] + aga_doors = [i for i in all_entrances_aga if world.shufflelinks[player] or i != 'Big Bomb Shop'] random.shuffle(aga_doors) aga_door = aga_doors.pop() @@ -992,16 +992,16 @@ def link_inverted_entrances(world, player): elif aga_door in dw_entrances: dw_entrances.remove(aga_door) - connect_two_way(world, aga_door, 'Inverted Agahnims Tower Exit', player) - caves.remove('Inverted Agahnims Tower Exit') + connect_two_way(world, aga_door, 'Agahnims Tower Exit', player) + caves.remove('Agahnims Tower Exit') # place links house if not world.shufflelinks[player]: - links_house = 'Inverted Links House' + links_house = 'Big Bomb Shop' else: links_house_doors = [i for i in dw_entrances if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) - connect_two_way(world, links_house, 'Inverted Links House Exit', player) + connect_two_way(world, links_house, 'Links House Exit', player) connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should match link's house if links_house in dw_entrances: dw_entrances.remove(links_house) @@ -1010,8 +1010,8 @@ def link_inverted_entrances(world, player): sanc_doors = [door for door in Inverted_Dark_Sanctuary_Doors if door in dw_entrances] sanc_door = random.choice(sanc_doors) dw_entrances.remove(sanc_door) - connect_entrance(world, sanc_door, 'Inverted Dark Sanctuary', player) - world.get_entrance('Inverted Dark Sanctuary Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) + connect_entrance(world, sanc_door, 'Dark Sanctuary Hint', player) + world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) # place old man house # no dw must exits in inverted, but we randomize whether cave is in light or dark world @@ -1060,7 +1060,7 @@ def link_inverted_entrances(world, player): bomb_shop_doors = [door for door in bomb_shop_doors if door in all_entrances] random.shuffle(bomb_shop_doors) bomb_shop = bomb_shop_doors.pop() - connect_entrance(world, bomb_shop, 'Inverted Big Bomb Shop', player) + connect_entrance(world, bomb_shop, 'Big Bomb Shop', player) if bomb_shop in lw_entrances: lw_entrances.remove(bomb_shop) if bomb_shop in dw_entrances: @@ -1092,7 +1092,7 @@ def link_inverted_entrances(world, player): entrances = list(Inverted_LW_Entrances + Inverted_LW_Dungeon_Entrances + Inverted_LW_Single_Cave_Doors + Inverted_Old_Man_Entrances + Inverted_DW_Entrances + Inverted_DW_Dungeon_Entrances + Inverted_DW_Single_Cave_Doors) must_exits = list(Inverted_LW_Entrances_Must_Exit + Inverted_LW_Dungeon_Entrances_Must_Exit) - old_man_entrances = list(Inverted_Old_Man_Entrances + Old_Man_Entrances + ['Inverted Agahnims Tower', 'Tower of Hera']) + old_man_entrances = list(Inverted_Old_Man_Entrances + Old_Man_Entrances + ['Ganons Tower', 'Tower of Hera']) caves = list(Cave_Exits + Dungeon_Exits + Cave_Three_Exits + Old_Man_House) # don't need to consider three exit caves, have one exit caves to avoid parity issues bomb_shop_doors = list(Inverted_Bomb_Shop_Single_Cave_Doors + Inverted_Bomb_Shop_Multi_Cave_Doors) blacksmith_doors = list(Inverted_Blacksmith_Single_Cave_Doors + Inverted_Blacksmith_Multi_Cave_Doors) @@ -1110,15 +1110,15 @@ def link_inverted_entrances(world, player): entrances.append('Hyrule Castle Entrance (South)') if not world.shuffle_ganon: - connect_two_way(world, 'Inverted Ganons Tower', 'Inverted Ganons Tower Exit', player) + connect_two_way(world, 'Agahnims Tower', 'Ganons Tower Exit', player) hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'] else: - entrances.append('Inverted Ganons Tower') - caves.append('Inverted Ganons Tower Exit') - hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Inverted Ganons Tower'] + entrances.append('Agahnims Tower') + caves.append('Ganons Tower Exit') + hc_ledge_entrances = ['Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Agahnims Tower'] # shuffle aga door. if it's on hc ledge, then one other hc ledge door has to be must_exit - aga_choices = [x for x in entrances if world.shufflelinks[player] or x != 'Inverted Links House'] + aga_choices = [x for x in entrances if world.shufflelinks[player] or x != 'Big Bomb Shop'] aga_door = random.choice(aga_choices) if aga_door in hc_ledge_entrances: @@ -1130,16 +1130,16 @@ def link_inverted_entrances(world, player): must_exits.append(hc_ledge_must_exit) entrances.remove(aga_door) - connect_two_way(world, aga_door, 'Inverted Agahnims Tower Exit', player) - caves.remove('Inverted Agahnims Tower Exit') + connect_two_way(world, aga_door, 'Agahnims Tower Exit', player) + caves.remove('Agahnims Tower Exit') # place links house if not world.shufflelinks[player]: - links_house = 'Inverted Links House' + links_house = 'Big Bomb Shop' else: links_house_doors = [i for i in entrances + must_exits if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) - connect_two_way(world, links_house, 'Inverted Links House Exit', player) + connect_two_way(world, links_house, 'Links House Exit', player) connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should match link's house if links_house in entrances: entrances.remove(links_house) @@ -1150,8 +1150,8 @@ def link_inverted_entrances(world, player): sanc_doors = [door for door in Inverted_Dark_Sanctuary_Doors if door in entrances] sanc_door = random.choice(sanc_doors) entrances.remove(sanc_door) - connect_entrance(world, sanc_door, 'Inverted Dark Sanctuary', player) - world.get_entrance('Inverted Dark Sanctuary Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) + connect_entrance(world, sanc_door, 'Dark Sanctuary Hint', player) + world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) # tavern back door cannot be shuffled yet connect_doors(world, ['Tavern North'], ['Tavern'], player) @@ -1183,7 +1183,7 @@ def link_inverted_entrances(world, player): bomb_shop_doors = [door for door in bomb_shop_doors if door in entrances] random.shuffle(bomb_shop_doors) bomb_shop = bomb_shop_doors.pop() - connect_entrance(world, bomb_shop, 'Inverted Big Bomb Shop', player) + connect_entrance(world, bomb_shop, 'Big Bomb Shop', player) entrances.remove(bomb_shop) # place the old man cave's entrance somewhere @@ -1225,7 +1225,7 @@ def link_inverted_entrances(world, player): random.shuffle(doors) - old_man_entrances = list(Inverted_Old_Man_Entrances + Old_Man_Entrances) + ['Tower of Hera', 'Inverted Agahnims Tower'] + old_man_entrances = list(Inverted_Old_Man_Entrances + Old_Man_Entrances) + ['Tower of Hera', 'Ganons Tower'] caves = Cave_Exits + Dungeon_Exits + Cave_Three_Exits + ['Old Man House Exit (Bottom)', 'Old Man House Exit (Top)', 'Skull Woods First Section Exit', 'Skull Woods Second Section Exit (East)', 'Skull Woods Second Section Exit (West)', 'Kakariko Well Exit', 'Bat Cave Exit', 'North Fairy Cave Exit', 'Lost Woods Hideout Exit', 'Lumberjack Tree Exit', 'Sanctuary Exit'] @@ -1246,15 +1246,15 @@ def link_inverted_entrances(world, player): caves.append('Hyrule Castle Secret Entrance Exit') if not world.shuffle_ganon: - connect_two_way(world, 'Inverted Ganons Tower', 'Inverted Ganons Tower Exit', player) + connect_two_way(world, 'Agahnims Tower', 'Ganons Tower Exit', player) connect_two_way(world, 'Inverted Pyramid Entrance', 'Pyramid Exit', player) connect_entrance(world, 'Inverted Pyramid Hole', 'Pyramid', player) else: - caves.extend(['Inverted Ganons Tower Exit', 'Pyramid Exit']) + caves.extend(['Ganons Tower Exit', 'Pyramid Exit']) hole_entrances.append('Inverted Pyramid Hole') hole_targets.append('Pyramid') - doors.extend(['Inverted Ganons Tower', 'Inverted Pyramid Entrance']) - exit_pool.extend(['Inverted Ganons Tower', 'Inverted Pyramid Entrance']) + doors.extend(['Agahnims Tower', 'Inverted Pyramid Entrance']) + exit_pool.extend(['Agahnims Tower', 'Inverted Pyramid Entrance']) random.shuffle(hole_entrances) random.shuffle(hole_targets) @@ -1269,11 +1269,11 @@ def link_inverted_entrances(world, player): # place links house and dark sanc if not world.shufflelinks[player]: - links_house = 'Inverted Links House' + links_house = 'Big Bomb Shop' else: links_house_doors = [i for i in doors if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) - connect_two_way(world, links_house, 'Inverted Links House Exit', player) + connect_two_way(world, links_house, 'Links House Exit', player) connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should match link's house doors.remove(links_house) exit_pool.remove(links_house) @@ -1282,8 +1282,8 @@ def link_inverted_entrances(world, player): sanc_door = random.choice(sanc_doors) exit_pool.remove(sanc_door) doors.remove(sanc_door) - connect_entrance(world, sanc_door, 'Inverted Dark Sanctuary', player) - world.get_entrance('Inverted Dark Sanctuary Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) + connect_entrance(world, sanc_door, 'Dark Sanctuary Hint', player) + world.get_entrance('Dark Sanctuary Hint Exit', player).connect(world.get_entrance(sanc_door, player).parent_region) # now let's deal with mandatory reachable stuff def extract_reachable_exit(cavelist): @@ -1339,7 +1339,7 @@ def link_inverted_entrances(world, player): bomb_shop_doors = [door for door in bomb_shop_doors if door in doors] random.shuffle(bomb_shop_doors) bomb_shop = bomb_shop_doors.pop() - connect_entrance(world, bomb_shop, 'Inverted Big Bomb Shop', player) + connect_entrance(world, bomb_shop, 'Big Bomb Shop', player) doors.remove(bomb_shop) # handle remaining caves @@ -1369,7 +1369,7 @@ def link_inverted_entrances(world, player): world.ganon_at_pyramid[player] = False # check for Ganon's Tower location - if world.get_entrance('Inverted Ganons Tower', player).connected_region.name != 'GT Lobby': + if world.get_entrance('Agahnims Tower', player).connected_region.name != 'GT Lobby': world.ganonstower_vanilla[player] = False @@ -1556,7 +1556,7 @@ def connect_mandatory_exits(world, entrances, caves, must_be_exits, player): for entrance in invalid_connections: if world.get_entrance(entrance, player).connected_region == world.get_region('Agahnims Tower Portal', player): for exit in invalid_connections[entrance]: - invalid_connections[exit] = invalid_connections[exit].union({'Inverted Ganons Tower', 'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'}) + invalid_connections[exit] = invalid_connections[exit].union({'Agahnims Tower', 'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'}) break used_caves = [] @@ -1671,28 +1671,25 @@ def simple_shuffle_dungeons(world, player): dungeon_entrances = ['Eastern Palace', 'Tower of Hera', 'Thieves Town', 'Skull Woods Final Section', 'Palace of Darkness', 'Ice Palace', 'Misery Mire', 'Swamp Palace'] dungeon_exits = ['Eastern Palace Exit', 'Tower of Hera Exit', 'Thieves Town Exit', 'Skull Woods Final Section Exit', 'Palace of Darkness Exit', 'Ice Palace Exit', 'Misery Mire Exit', 'Swamp Palace Exit'] - if world.mode[player] != 'inverted': - if not world.shuffle_ganon: - connect_two_way(world, 'Ganons Tower', 'Ganons Tower Exit', player) - else: - dungeon_entrances.append('Ganons Tower') - dungeon_exits.append('Ganons Tower Exit') + # TODO: Consider letting inverted shuffle GT + if not world.is_atgt_swapped(player) and not world.shuffle_ganon: + connect_two_way(world, 'Ganons Tower', 'Ganons Tower Exit', player) else: - dungeon_entrances.append('Inverted Agahnims Tower') - dungeon_exits.append('Inverted Agahnims Tower Exit') + dungeon_entrances.append('Ganons Tower') + dungeon_exits.append('Ganons Tower Exit') # shuffle up single entrance dungeons connect_random(world, dungeon_entrances, dungeon_exits, player, True) # mix up 4 door dungeons multi_dungeons = ['Desert', 'Turtle Rock'] - if world.mode[player] == 'open' or (world.mode[player] == 'inverted' and world.shuffle_ganon): + if world.mode[player] == 'open' or (world.is_atgt_swapped(player) and world.shuffle_ganon): multi_dungeons.append('Hyrule Castle') random.shuffle(multi_dungeons) dp_target = multi_dungeons[0] tr_target = multi_dungeons[1] - if world.mode[player] not in ['open', 'inverted'] or (world.mode[player] == 'inverted' and world.shuffle_ganon is False): + if world.mode[player] not in ['open', 'inverted'] or (world.is_atgt_swapped(player) and world.shuffle_ganon is False): # place hyrule castle as intended hc_target = 'Hyrule Castle' else: @@ -1707,103 +1704,53 @@ def simple_shuffle_dungeons(world, player): hc_target, tr_target = tr_target, hc_target # ToDo improve this? + if hc_target == 'Hyrule Castle': + connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Hyrule Castle Exit (South)', player) + connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Hyrule Castle Exit (East)', player) + connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Hyrule Castle Exit (West)', player) + connect_two_way(world, 'Agahnims Tower', 'Agahnims Tower Exit', player) + elif hc_target == 'Desert': + connect_two_way(world, 'Desert Palace Entrance (South)', 'Hyrule Castle Exit (South)', player) + connect_two_way(world, 'Desert Palace Entrance (East)', 'Hyrule Castle Exit (East)', player) + connect_two_way(world, 'Desert Palace Entrance (West)', 'Hyrule Castle Exit (West)', player) + connect_two_way(world, 'Desert Palace Entrance (North)', 'Agahnims Tower Exit', player) + elif hc_target == 'Turtle Rock': + connect_two_way(world, 'Turtle Rock', 'Hyrule Castle Exit (South)', player) + connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Hyrule Castle Exit (East)', player) + connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Hyrule Castle Exit (West)', player) + connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Agahnims Tower Exit', player) - if world.mode[player] != 'inverted': - if hc_target == 'Hyrule Castle': - connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Hyrule Castle Exit (South)', player) - connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Hyrule Castle Exit (East)', player) - connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Hyrule Castle Exit (West)', player) - connect_two_way(world, 'Agahnims Tower', 'Agahnims Tower Exit', player) - elif hc_target == 'Desert': - connect_two_way(world, 'Desert Palace Entrance (South)', 'Hyrule Castle Exit (South)', player) - connect_two_way(world, 'Desert Palace Entrance (East)', 'Hyrule Castle Exit (East)', player) - connect_two_way(world, 'Desert Palace Entrance (West)', 'Hyrule Castle Exit (West)', player) - connect_two_way(world, 'Desert Palace Entrance (North)', 'Agahnims Tower Exit', player) - elif hc_target == 'Turtle Rock': - connect_two_way(world, 'Turtle Rock', 'Hyrule Castle Exit (South)', player) - connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Hyrule Castle Exit (East)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Hyrule Castle Exit (West)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Agahnims Tower Exit', player) + if dp_target == 'Hyrule Castle': + connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Desert Palace Exit (South)', player) + connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Desert Palace Exit (East)', player) + connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Desert Palace Exit (West)', player) + connect_two_way(world, 'Agahnims Tower', 'Desert Palace Exit (North)', player) + elif dp_target == 'Desert': + connect_two_way(world, 'Desert Palace Entrance (South)', 'Desert Palace Exit (South)', player) + connect_two_way(world, 'Desert Palace Entrance (East)', 'Desert Palace Exit (East)', player) + connect_two_way(world, 'Desert Palace Entrance (West)', 'Desert Palace Exit (West)', player) + connect_two_way(world, 'Desert Palace Entrance (North)', 'Desert Palace Exit (North)', player) + elif dp_target == 'Turtle Rock': + connect_two_way(world, 'Turtle Rock', 'Desert Palace Exit (South)', player) + connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Desert Palace Exit (East)', player) + connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Desert Palace Exit (West)', player) + connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Desert Palace Exit (North)', player) - if dp_target == 'Hyrule Castle': - connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Desert Palace Exit (South)', player) - connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Desert Palace Exit (East)', player) - connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Desert Palace Exit (West)', player) - connect_two_way(world, 'Agahnims Tower', 'Desert Palace Exit (North)', player) - elif dp_target == 'Desert': - connect_two_way(world, 'Desert Palace Entrance (South)', 'Desert Palace Exit (South)', player) - connect_two_way(world, 'Desert Palace Entrance (East)', 'Desert Palace Exit (East)', player) - connect_two_way(world, 'Desert Palace Entrance (West)', 'Desert Palace Exit (West)', player) - connect_two_way(world, 'Desert Palace Entrance (North)', 'Desert Palace Exit (North)', player) - elif dp_target == 'Turtle Rock': - connect_two_way(world, 'Turtle Rock', 'Desert Palace Exit (South)', player) - connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Desert Palace Exit (East)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Desert Palace Exit (West)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Desert Palace Exit (North)', player) - - if tr_target == 'Hyrule Castle': - connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Turtle Rock Exit (Front)', player) - connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Turtle Rock Ledge Exit (East)', player) - connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Turtle Rock Ledge Exit (West)', player) - connect_two_way(world, 'Agahnims Tower', 'Turtle Rock Isolated Ledge Exit', player) - elif tr_target == 'Desert': - connect_two_way(world, 'Desert Palace Entrance (South)', 'Turtle Rock Exit (Front)', player) - connect_two_way(world, 'Desert Palace Entrance (North)', 'Turtle Rock Ledge Exit (East)', player) - connect_two_way(world, 'Desert Palace Entrance (West)', 'Turtle Rock Ledge Exit (West)', player) - connect_two_way(world, 'Desert Palace Entrance (East)', 'Turtle Rock Isolated Ledge Exit', player) - elif tr_target == 'Turtle Rock': - connect_two_way(world, 'Turtle Rock', 'Turtle Rock Exit (Front)', player) - connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Turtle Rock Isolated Ledge Exit', player) - connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Turtle Rock Ledge Exit (West)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Turtle Rock Ledge Exit (East)', player) - else: - if hc_target == 'Hyrule Castle': - connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Hyrule Castle Exit (South)', player) - connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Hyrule Castle Exit (East)', player) - connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Hyrule Castle Exit (West)', player) - connect_two_way(world, 'Inverted Ganons Tower', 'Inverted Ganons Tower Exit', player) - elif hc_target == 'Desert': - connect_two_way(world, 'Desert Palace Entrance (South)', 'Hyrule Castle Exit (South)', player) - connect_two_way(world, 'Desert Palace Entrance (East)', 'Hyrule Castle Exit (East)', player) - connect_two_way(world, 'Desert Palace Entrance (West)', 'Hyrule Castle Exit (West)', player) - connect_two_way(world, 'Desert Palace Entrance (North)', 'Inverted Ganons Tower Exit', player) - elif hc_target == 'Turtle Rock': - connect_two_way(world, 'Turtle Rock', 'Hyrule Castle Exit (South)', player) - connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Inverted Ganons Tower Exit', player) - connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Hyrule Castle Exit (West)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Hyrule Castle Exit (East)', player) - - if dp_target == 'Hyrule Castle': - connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Desert Palace Exit (South)', player) - connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Desert Palace Exit (East)', player) - connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Desert Palace Exit (West)', player) - connect_two_way(world, 'Inverted Ganons Tower', 'Desert Palace Exit (North)', player) - elif dp_target == 'Desert': - connect_two_way(world, 'Desert Palace Entrance (South)', 'Desert Palace Exit (South)', player) - connect_two_way(world, 'Desert Palace Entrance (East)', 'Desert Palace Exit (East)', player) - connect_two_way(world, 'Desert Palace Entrance (West)', 'Desert Palace Exit (West)', player) - connect_two_way(world, 'Desert Palace Entrance (North)', 'Desert Palace Exit (North)', player) - elif dp_target == 'Turtle Rock': - connect_two_way(world, 'Turtle Rock', 'Desert Palace Exit (South)', player) - connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Desert Palace Exit (East)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Desert Palace Exit (West)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Desert Palace Exit (North)', player) - - if tr_target == 'Hyrule Castle': - connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Turtle Rock Exit (Front)', player) - connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Turtle Rock Ledge Exit (East)', player) - connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Turtle Rock Ledge Exit (West)', player) - connect_two_way(world, 'Inverted Ganons Tower', 'Turtle Rock Isolated Ledge Exit', player) - elif tr_target == 'Desert': - connect_two_way(world, 'Desert Palace Entrance (South)', 'Turtle Rock Exit (Front)', player) - connect_two_way(world, 'Desert Palace Entrance (North)', 'Turtle Rock Ledge Exit (East)', player) - connect_two_way(world, 'Desert Palace Entrance (West)', 'Turtle Rock Ledge Exit (West)', player) - connect_two_way(world, 'Desert Palace Entrance (East)', 'Turtle Rock Isolated Ledge Exit', player) - elif tr_target == 'Turtle Rock': - connect_two_way(world, 'Turtle Rock', 'Turtle Rock Exit (Front)', player) - connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Turtle Rock Isolated Ledge Exit', player) - connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Turtle Rock Ledge Exit (West)', player) - connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Turtle Rock Ledge Exit (East)', player) + if tr_target == 'Hyrule Castle': + connect_two_way(world, 'Hyrule Castle Entrance (South)', 'Turtle Rock Exit (Front)', player) + connect_two_way(world, 'Hyrule Castle Entrance (East)', 'Turtle Rock Ledge Exit (East)', player) + connect_two_way(world, 'Hyrule Castle Entrance (West)', 'Turtle Rock Ledge Exit (West)', player) + connect_two_way(world, 'Agahnims Tower', 'Turtle Rock Isolated Ledge Exit', player) + elif tr_target == 'Desert': + connect_two_way(world, 'Desert Palace Entrance (South)', 'Turtle Rock Exit (Front)', player) + connect_two_way(world, 'Desert Palace Entrance (North)', 'Turtle Rock Ledge Exit (East)', player) + connect_two_way(world, 'Desert Palace Entrance (West)', 'Turtle Rock Ledge Exit (West)', player) + connect_two_way(world, 'Desert Palace Entrance (East)', 'Turtle Rock Isolated Ledge Exit', player) + elif tr_target == 'Turtle Rock': + connect_two_way(world, 'Turtle Rock', 'Turtle Rock Exit (Front)', player) + connect_two_way(world, 'Turtle Rock Isolated Ledge Entrance', 'Turtle Rock Isolated Ledge Exit', player) + connect_two_way(world, 'Dark Death Mountain Ledge (West)', 'Turtle Rock Ledge Exit (West)', player) + connect_two_way(world, 'Dark Death Mountain Ledge (East)', 'Turtle Rock Ledge Exit (East)', player) def unbias_some_entrances(Dungeon_Exits, Cave_Exits, Old_Man_House, Cave_Three_Exits): def shuffle_lists_in_list(ls): @@ -2230,7 +2177,7 @@ Inverted_DW_Dungeon_Entrances = ['Thieves Town', 'Dark Death Mountain Ledge (West)', 'Dark Death Mountain Ledge (East)', 'Turtle Rock Isolated Ledge Entrance', - 'Inverted Agahnims Tower'] + 'Ganons Tower'] Inverted_LW_Dungeon_Entrances_Must_Exit = ['Desert Palace Entrance (East)'] @@ -2244,7 +2191,7 @@ Inverted_Dungeon_Exits_Base = [['Desert Palace Exit (South)', 'Desert Palace Exi 'Misery Mire Exit', 'Palace of Darkness Exit', 'Swamp Palace Exit', - 'Inverted Agahnims Tower Exit', + 'Agahnims Tower Exit', ['Turtle Rock Ledge Exit (East)', 'Turtle Rock Exit (Front)', 'Turtle Rock Ledge Exit (West)', 'Turtle Rock Isolated Ledge Exit']] @@ -2307,7 +2254,7 @@ Inverted_Bomb_Shop_Multi_Cave_Doors = ['Hyrule Castle Entrance (South)', 'Superbunny Cave (Top)', 'Superbunny Cave (Bottom)', 'Hookshot Cave', - 'Inverted Agahnims Tower', + 'Ganons Tower', 'Desert Palace Entrance (South)', 'Tower of Hera', 'Two Brothers House (West)', @@ -2327,17 +2274,17 @@ Inverted_Bomb_Shop_Multi_Cave_Doors = ['Hyrule Castle Entrance (South)', 'Palace of Darkness', 'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', - 'Inverted Ganons Tower', + 'Agahnims Tower', 'Desert Palace Entrance (West)', 'Desert Palace Entrance (North)'] Inverted_Blacksmith_Multi_Cave_Doors = Blacksmith_Multi_Cave_Doors # same as non-inverted -Inverted_LW_Single_Cave_Doors = [x for x in LW_Single_Cave_Doors if x != 'Links House'] + ['Inverted Big Bomb Shop'] +Inverted_LW_Single_Cave_Doors = [x for x in LW_Single_Cave_Doors] Inverted_DW_Single_Cave_Doors = ['Bonk Fairy (Dark)', - 'Inverted Dark Sanctuary', - 'Inverted Links House', + 'Dark Sanctuary Hint', + 'Big Bomb Shop', 'Dark Lake Hylia Fairy', 'C-Shaped House', 'Bumper Cave (Top)', @@ -2386,7 +2333,7 @@ Inverted_Bomb_Shop_Single_Cave_Doors = ['Waterfall of Wishing', 'Chest Game', 'Dark World Hammer Peg Cave', 'Red Shield Shop', - 'Inverted Dark Sanctuary', + 'Dark Sanctuary Hint', 'Fortune Teller (Dark)', 'Dark World Shop', 'Dark World Lumberjack Shop', @@ -2400,8 +2347,8 @@ Inverted_Bomb_Shop_Single_Cave_Doors = ['Waterfall of Wishing', 'Bumper Cave (Top)', 'Mimic Cave', 'Dark Lake Hylia Shop', - 'Inverted Links House', - 'Inverted Big Bomb Shop'] + 'Big Bomb Shop', + 'Links House'] Inverted_Blacksmith_Single_Cave_Doors = ['Blinds Hideout', 'Lake Hylia Fairy', @@ -2433,7 +2380,7 @@ Inverted_Blacksmith_Single_Cave_Doors = ['Blinds Hideout', 'Lumberjack House', 'Lake Hylia Fortune Teller', 'Kakariko Gamble Game', - 'Inverted Big Bomb Shop'] + 'Links House'] Inverted_Single_Cave_Targets = ['Blinds Hideout', 'Bonk Fairy (Light)', @@ -2502,7 +2449,7 @@ Inverted_Single_Cave_Targets = ['Blinds Hideout', 'Dam'] # in inverted we put dark sanctuary in west dark world for now -Inverted_Dark_Sanctuary_Doors = ['Inverted Dark Sanctuary', +Inverted_Dark_Sanctuary_Doors = ['Dark Sanctuary Hint', 'Fortune Teller (Dark)', 'Brewery', 'C-Shaped House', @@ -2538,9 +2485,9 @@ Inverted_Must_Exit_Invalid_Connections = defaultdict(set, { 'Death Mountain Return Cave (West)': {'Bumper Cave (Top)'}, 'Desert Palace Entrance (North)': {'Desert Palace Entrance (West)'}, 'Desert Palace Entrance (West)': {'Desert Palace Entrance (North)'}, - 'Inverted Ganons Tower': {'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'}, - 'Hyrule Castle Entrance (West)': {'Hyrule Castle Entrance (East)', 'Inverted Ganons Tower'}, - 'Hyrule Castle Entrance (East)': {'Hyrule Castle Entrance (West)', 'Inverted Ganons Tower'}, + 'Agahnims Tower': {'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'}, + 'Hyrule Castle Entrance (West)': {'Hyrule Castle Entrance (East)', 'Agahnims Tower'}, + 'Hyrule Castle Entrance (East)': {'Hyrule Castle Entrance (West)', 'Agahnims Tower'}, }) @@ -2549,6 +2496,7 @@ Inverted_Must_Exit_Invalid_Connections = defaultdict(set, { mandatory_connections = [('Links House S&Q', 'Links House'), ('Sanctuary S&Q', 'Sanctuary'), ('Old Man S&Q', 'Old Man House'), + ('Other World S&Q', 'East Dark World'), ('Lake Hylia Central Island Pier', 'Lake Hylia Central Island'), ('Lake Hylia Central Island Teleporter', 'Dark Lake Hylia Central Island'), ('Zoras River', 'Zoras River'), @@ -2685,10 +2633,10 @@ mandatory_connections = [('Links House S&Q', 'Links House'), ('Hyrule Castle Ledge Drop', 'Light World'), ] -inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'), - ('Dark Sanctuary S&Q', 'Inverted Dark Sanctuary'), +inverted_mandatory_connections = [('Links House S&Q', 'Links House'), + ('Sanctuary S&Q', 'Dark Sanctuary Hint'), ('Old Man S&Q', 'Old Man House'), - ('Castle Ledge S&Q', 'Hyrule Castle Ledge'), + ('Other World S&Q', 'Hyrule Castle Ledge'), ('Lake Hylia Central Island Pier', 'Lake Hylia Central Island'), ('Lake Hylia Island Pier', 'Lake Hylia Island'), ('Lake Hylia Warp', 'Northeast Light World'), @@ -3139,11 +3087,11 @@ inverted_default_connections = [('Waterfall of Wishing', 'Waterfall of Wishing' ('Hookshot Cave Back Entrance', 'Hookshot Cave (Back)'), ('Mimic Cave', 'Mimic Cave'), ('Inverted Pyramid Hole', 'Pyramid'), - ('Inverted Links House', 'Inverted Links House'), - ('Inverted Links House Exit', 'South Dark World'), - ('Inverted Big Bomb Shop', 'Inverted Big Bomb Shop'), - ('Inverted Dark Sanctuary', 'Inverted Dark Sanctuary'), - ('Inverted Dark Sanctuary Exit', 'West Dark World'), + ('Links House', 'Big Bomb Shop'), + ('Links House Exit', 'South Dark World'), + ('Big Bomb Shop', 'Links House'), + ('Dark Sanctuary Hint', 'Dark Sanctuary Hint'), + ('Dark Sanctuary Hint Exit', 'West Dark World'), ('Old Man Cave (West)', 'Bumper Cave (bottom)'), ('Old Man Cave (East)', 'Death Mountain Return Cave (left)'), ('Old Man Cave Exit (West)', 'West Dark World'), @@ -3268,10 +3216,10 @@ inverted_default_dungeon_connections = [('Desert Palace Entrance (South)', 'Dese ('Dark Death Mountain Ledge (East)', 'Turtle Rock Chest Portal'), ('Turtle Rock Isolated Ledge Exit', 'Dark Death Mountain Isolated Ledge'), ('Turtle Rock Isolated Ledge Entrance', 'Turtle Rock Eye Bridge Portal'), - ('Inverted Ganons Tower', 'Ganons Tower Portal'), - ('Inverted Ganons Tower Exit', 'Hyrule Castle Ledge'), - ('Inverted Agahnims Tower', 'Agahnims Tower Portal'), - ('Inverted Agahnims Tower Exit', 'Dark Death Mountain'), + ('Agahnims Tower', 'Ganons Tower Portal'), + ('Ganons Tower Exit', 'Hyrule Castle Ledge'), + ('Ganons Tower', 'Agahnims Tower Portal'), + ('Agahnims Tower Exit', 'Dark Death Mountain'), ('Turtle Rock Exit (Front)', 'Dark Death Mountain'), ('Ice Palace Exit', 'Dark Lake Hylia') ] @@ -3294,7 +3242,6 @@ indirect_connections = { # ToDo somehow merge this with creation of the locations door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0x0ae8, 0x08b8, 0x0b07, 0x08bf, 0x06, 0xfe, 0x0816, 0x0000)), - 'Inverted Big Bomb Shop': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0x0ae8, 0x08b8, 0x0b07, 0x08bf, 0x06, 0xfe, 0x0816, 0x0000)), 'Desert Palace Entrance (South)': (0x08, (0x0084, 0x30, 0x0314, 0x0c56, 0x00a6, 0x0ca8, 0x0128, 0x0cc3, 0x0133, 0x0a, 0xfa, 0x0000, 0x0000)), 'Desert Palace Entrance (West)': (0x0A, (0x0083, 0x30, 0x0280, 0x0c46, 0x0003, 0x0c98, 0x0088, 0x0cb3, 0x0090, 0x0a, 0xfd, 0x0000, 0x0000)), 'Desert Palace Entrance (North)': (0x0B, (0x0063, 0x30, 0x0016, 0x0c00, 0x00a2, 0x0c28, 0x0128, 0x0c6d, 0x012f, 0x00, 0x0e, 0x0000, 0x0000)), @@ -3306,7 +3253,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 'Hyrule Castle Entrance (East)': (0x04, (0x0062, 0x1b, 0x004a, 0x0600, 0x0856, 0x0604, 0x08c8, 0x066d, 0x08d3, 0x00, 0xfa, 0x0000, 0x8158)), 'Inverted Pyramid Entrance': (0x35, (0x0010, 0x1b, 0x0418, 0x0679, 0x06b4, 0x06c6, 0x0728, 0x06e6, 0x0733, 0x07, 0xf9, 0x0000, 0x0000)), 'Agahnims Tower': (0x23, (0x00e0, 0x1b, 0x0032, 0x0600, 0x0784, 0x0634, 0x07f8, 0x066d, 0x0803, 0x00, 0x0a, 0x0000, 0x82be)), - 'Inverted Ganons Tower': (0x23, (0x00e0, 0x1b, 0x0032, 0x0600, 0x0784, 0x0634, 0x07f8, 0x066d, 0x0803, 0x00, 0x0a, 0x0000, 0x82be)), 'Thieves Town': (0x33, (0x00db, 0x58, 0x0b2e, 0x075a, 0x0176, 0x07a8, 0x01f8, 0x07c7, 0x0203, 0x06, 0xfa, 0x0000, 0x0000)), 'Skull Woods First Section Door': (0x29, (0x0058, 0x40, 0x0f4c, 0x01f6, 0x0262, 0x0248, 0x02e8, 0x0263, 0x02ef, 0x0a, 0xfe, 0x0000, 0x0000)), 'Skull Woods Second Section Door (East)': (0x28, (0x0057, 0x40, 0x0eb8, 0x01e6, 0x01c2, 0x0238, 0x0248, 0x0253, 0x024f, 0x0a, 0xfe, 0x0000, 0x0000)), @@ -3354,7 +3300,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 'Hookshot Cave': (0x39, (0x003c, 0x45, 0x04da, 0x00a3, 0x0cd6, 0x0107, 0x0d48, 0x0112, 0x0d53, 0x0b, 0xfa, 0x0000, 0x0000)), 'Hookshot Cave Back Entrance': (0x3A, (0x002c, 0x45, 0x004c, 0x0000, 0x0c56, 0x0038, 0x0cc8, 0x006f, 0x0cd3, 0x00, 0x0a, 0x0000, 0x0000)), 'Ganons Tower': (0x36, (0x000c, 0x43, 0x0052, 0x0000, 0x0884, 0x0028, 0x08f8, 0x006f, 0x0903, 0x00, 0xfc, 0x0000, 0x0000)), - 'Inverted Agahnims Tower': (0x36, (0x000c, 0x43, 0x0052, 0x0000, 0x0884, 0x0028, 0x08f8, 0x006f, 0x0903, 0x00, 0xfc, 0x0000, 0x0000)), 'Pyramid Entrance': (0x35, (0x0010, 0x5b, 0x0b0e, 0x075a, 0x0674, 0x07a8, 0x06e8, 0x07c7, 0x06f3, 0x06, 0xfa, 0x0000, 0x0000)), 'Skull Woods First Section Hole (West)': ([0xDB84D, 0xDB84E], None), 'Skull Woods First Section Hole (East)': ([0xDB84F, 0xDB850], None), @@ -3421,7 +3366,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 'Dark World Hammer Peg Cave': (0x7E, (0x0127, 0x62, 0x0894, 0x091e, 0x0492, 0x09a6, 0x0508, 0x098b, 0x050f, 0x00, 0x00, 0x0000, 0x0000)), 'Red Shield Shop': (0x74, (0x0110, 0x5a, 0x079a, 0x06e8, 0x04d6, 0x0738, 0x0548, 0x0755, 0x0553, 0x08, 0xf8, 0x0AA8, 0x0000)), 'Dark Sanctuary Hint': (0x59, (0x0112, 0x53, 0x001e, 0x0400, 0x06e2, 0x0446, 0x0758, 0x046d, 0x075f, 0x00, 0x00, 0x0000, 0x0000)), - 'Inverted Dark Sanctuary': (0x59, (0x0112, 0x53, 0x001e, 0x0400, 0x06e2, 0x0446, 0x0758, 0x046d, 0x075f, 0x00, 0x00, 0x0000, 0x0000)), 'Fortune Teller (Dark)': (0x65, (0x0122, 0x51, 0x0610, 0x04b4, 0x027e, 0x0507, 0x02f8, 0x0523, 0x0303, 0x0a, 0xf6, 0x091E, 0x0000)), 'Dark World Shop': (0x5F, (0x010f, 0x58, 0x1058, 0x0814, 0x02be, 0x0868, 0x0338, 0x0883, 0x0343, 0x0a, 0xf6, 0x0000, 0x0000)), 'Dark World Lumberjack Shop': (0x56, (0x010f, 0x42, 0x041c, 0x0074, 0x04e2, 0x00c7, 0x0558, 0x00e3, 0x055f, 0x0a, 0xf6, 0x0000, 0x0000)), @@ -3435,7 +3379,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 'Dark Death Mountain Fairy': (0x6F, (0x0115, 0x43, 0x1400, 0x0294, 0x0600, 0x02e8, 0x0678, 0x0303, 0x0685, 0x0a, 0xf6, 0x0000, 0x0000)), 'Mimic Cave': (0x4E, (0x010c, 0x05, 0x07e0, 0x0103, 0x0d00, 0x0156, 0x0d78, 0x0172, 0x0d7d, 0x0b, 0xf5, 0x0000, 0x0000)), 'Big Bomb Shop': (0x52, (0x011c, 0x6c, 0x0506, 0x0a9a, 0x0832, 0x0ae7, 0x08b8, 0x0b07, 0x08bf, 0x06, 0xfa, 0x0816, 0x0000)), - 'Inverted Links House': (0x52, (0x011c, 0x6c, 0x0506, 0x0a9a, 0x0832, 0x0ae7, 0x08b8, 0x0b07, 0x08bf, 0x06, 0xfa, 0x0816, 0x0000)), 'Dark Lake Hylia Shop': (0x73, (0x010f, 0x75, 0x0380, 0x0c6a, 0x0a00, 0x0cb8, 0x0a58, 0x0cd7, 0x0a85, 0x06, 0xfa, 0x0000, 0x0000)), 'Lumberjack House': (0x75, (0x011f, 0x02, 0x049c, 0x0088, 0x04e6, 0x00d8, 0x0558, 0x00f7, 0x0563, 0x08, 0xf8, 0x07AA, 0x0000)), 'Lake Hylia Fortune Teller': (0x72, (0x0122, 0x35, 0x0380, 0x0c6a, 0x0a00, 0x0cb8, 0x0a58, 0x0cd7, 0x0a85, 0x06, 0xfa, 0x0000, 0x0000)), @@ -3446,7 +3389,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 # value = entrance # # | (entrance #, exit #) exit_ids = {'Links House Exit': (0x01, 0x00), - 'Inverted Links House Exit': (0x01, 0x00), 'Chris Houlihan Room Exit': (None, 0x3D), 'Desert Palace Exit (South)': (0x09, 0x0A), 'Desert Palace Exit (West)': (0x0B, 0x0C), @@ -3458,7 +3400,6 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'Hyrule Castle Exit (West)': (0x03, 0x02), 'Hyrule Castle Exit (East)': (0x05, 0x04), 'Agahnims Tower Exit': (0x24, 0x25), - 'Inverted Agahnims Tower Exit': (0x24, 0x25), 'Thieves Town Exit': (0x34, 0x35), 'Skull Woods First Section Exit': (0x2A, 0x2B), 'Skull Woods Second Section Exit (East)': (0x29, 0x2A), @@ -3506,7 +3447,6 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'Hookshot Cave Front Exit': (0x3A, 0x3B), 'Hookshot Cave Back Exit': (0x3B, 0x3C), 'Ganons Tower Exit': (0x37, 0x38), - 'Inverted Ganons Tower Exit': (0x37, 0x38), 'Pyramid Exit': (0x36, 0x37), 'Waterfall of Wishing': 0x5C, 'Dam': 0x4E, @@ -3558,7 +3498,6 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'East Dark World Hint': 0x69, 'Palace of Darkness Hint': 0x68, 'Big Bomb Shop': 0x53, - 'Inverted Big Bomb Shop': 0x53, 'Village of Outcasts Shop': 0x60, 'Dark Lake Hylia Shop': 0x60, 'Dark World Lumberjack Shop': 0x60, @@ -3572,7 +3511,6 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'Dark World Hammer Peg Cave': 0x83, 'Red Shield Shop': 0x57, 'Dark Sanctuary Hint': 0x5A, - 'Inverted Dark Sanctuary': 0x5A, 'Fortune Teller (Dark)': 0x66, 'Archery Game': 0x59, 'Mire Shed': 0x5F, @@ -3592,13 +3530,13 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'Skull Pot Circle': 0x76, 'Pyramid': 0x7B} -ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Inverted Big Bomb Shop': (0x8b1, 0xb2d), +ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Desert Palace Entrance (South)': (0x108, 0xd70), 'Desert Palace Entrance (West)': (0x031, 0xca0), 'Desert Palace Entrance (North)': (0x0e1, 0xba0), 'Desert Palace Entrance (East)': (0x191, 0xca0), 'Eastern Palace': (0xf31, 0x620), 'Tower of Hera': (0x8D0, 0x080), 'Hyrule Castle Entrance (South)': (0x7b0, 0x730), 'Hyrule Castle Entrance (West)': (0x700, 0x640), 'Hyrule Castle Entrance (East)': (0x8a0, 0x640), 'Inverted Pyramid Entrance': (0x720, 0x700), - 'Agahnims Tower': (0x7e0, 0x640), 'Inverted Ganons Tower': (0x7e0, 0x640), + 'Agahnims Tower': (0x7e0, 0x640), 'Thieves Town': (0x1d0, 0x780), 'Skull Woods First Section Door': (0x240, 0x280), 'Skull Woods Second Section Door (East)': (0x1a0, 0x240), 'Skull Woods Second Section Door (West)': (0x0c0, 0x1c0), 'Skull Woods Final Section': (0x082, 0x0b0), @@ -3643,7 +3581,6 @@ ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Inverted Big Bomb Shop': (0x8b 'Hookshot Cave': (0xc80, 0x0c0), 'Hookshot Cave Back Entrance': (0xcf0, 0x004), 'Ganons Tower': (0x8D0, 0x080), - 'Inverted Agahnims Tower': (0x8D0, 0x080), 'Pyramid Entrance': (0x640, 0x7c0), 'Skull Woods First Section Hole (West)': None, 'Skull Woods First Section Hole (East)': None, @@ -3707,7 +3644,6 @@ ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Inverted Big Bomb Shop': (0x8b 'Dark World Hammer Peg Cave': (0x4c0, 0x940), 'Red Shield Shop': (0x500, 0x680), 'Dark Sanctuary Hint': (0x720, 0x4a0), - 'Inverted Dark Sanctuary': (0x720, 0x4a0), 'Fortune Teller (Dark)': (0x2c0, 0x4c0), 'Dark World Shop': (0x2e0, 0x880), 'Dark World Lumberjack Shop': (0x4e0, 0x0d0), @@ -3720,7 +3656,7 @@ ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Inverted Big Bomb Shop': (0x8b 'Cave Shop (Dark Death Mountain)': (0xd80, 0x180), 'Dark Death Mountain Fairy': (0x620, 0x2c0), 'Mimic Cave': (0xc80, 0x180), - 'Big Bomb Shop': (0x8b1, 0xb2d), 'Inverted Links House': (0x8b1, 0xb2d), + 'Big Bomb Shop': (0x8b1, 0xb2d), 'Dark Lake Hylia Shop': (0xa40, 0xc40), 'Lumberjack House': (0x4e0, 0x0d0), 'Lake Hylia Fortune Teller': (0xa40, 0xc40), diff --git a/InvertedRegions.py b/InvertedRegions.py index a02bfbea..fabc4a76 100644 --- a/InvertedRegions.py +++ b/InvertedRegions.py @@ -5,10 +5,10 @@ from Regions import create_lw_region, create_dw_region, create_cave_region, crea def create_inverted_regions(world, player): world.regions += [ - create_menu_region(player, 'Menu', None, ['Links House S&Q', 'Dark Sanctuary S&Q', 'Old Man S&Q', 'Castle Ledge S&Q']), + create_menu_region(player, 'Menu', None, ['Links House S&Q', 'Sanctuary S&Q', 'Old Man S&Q', 'Other World S&Q']), create_lw_region(player, 'Light World', ['Mushroom', 'Bottle Merchant', 'Flute Spot', 'Sunken Treasure', 'Purple Chest', 'Bombos Tablet'], ["Blinds Hideout", "Hyrule Castle Secret Entrance Drop", 'Kings Grave Outer Rocks', 'Dam', - 'Inverted Big Bomb Shop', 'Tavern North', 'Chicken House', 'Aginahs Cave', 'Sahasrahlas Hut', 'Kakariko Well Drop', 'Kakariko Well Cave', + 'Links House', 'Tavern North', 'Chicken House', 'Aginahs Cave', 'Sahasrahlas Hut', 'Kakariko Well Drop', 'Kakariko Well Cave', 'Blacksmiths Hut', 'Bat Cave Drop Ledge', 'Bat Cave Cave', 'Sick Kids House', 'Hobo Bridge', 'Lost Woods Hideout Drop', 'Lost Woods Hideout Stump', 'Lumberjack Tree Tree', 'Lumberjack Tree Cave', 'Mini Moldorm Cave', 'Ice Rod Cave', 'Lake Hylia Central Island Pier', 'Lake Hylia Island Pier', 'Lake Hylia Warp', 'Bonk Rock Cave', 'Library', 'Two Brothers House (East)', 'Desert Palace Stairs', 'Eastern Palace', 'Master Sword Meadow', @@ -41,7 +41,7 @@ def create_inverted_regions(world, player): create_cave_region(player, 'Kings Grave', 'a cave with a chest', ['King\'s Tomb']), create_cave_region(player, 'North Fairy Cave', 'a drop\'s exit', None, ['North Fairy Cave Exit']), create_cave_region(player, 'Dam', 'the dam', ['Floodgate', 'Floodgate Chest']), - create_cave_region(player, 'Inverted Links House', 'your house', ['Link\'s House'], ['Inverted Links House Exit']), + create_cave_region(player, 'Links House', 'your house', ['Link\'s House'], ['Links House Exit']), create_cave_region(player, 'Chris Houlihan Room', 'I AM ERROR', None, ['Chris Houlihan Room Exit']), create_cave_region(player, 'Tavern', 'the tavern', ['Kakariko Tavern']), create_cave_region(player, 'Elder House', 'a connector', None, ['Elder House Exit (East)', 'Elder House Exit (West)']), @@ -108,7 +108,7 @@ def create_inverted_regions(world, player): create_lw_region(player, 'Desert Palace Entrance (North) Spot', None, ['Desert Palace Entrance (North)', 'Desert Ledge Return Rocks', 'Desert Palace North Mirror Spot']), create_lw_region(player, 'Master Sword Meadow', ['Master Sword Pedestal']), create_cave_region(player, 'Lost Woods Gamble', 'a game of chance'), - create_lw_region(player, 'Hyrule Castle Ledge', None, ['Hyrule Castle Entrance (East)', 'Hyrule Castle Entrance (West)', 'Inverted Ganons Tower', 'Hyrule Castle Ledge Courtyard Drop', 'Inverted Pyramid Hole']), + create_lw_region(player, 'Hyrule Castle Ledge', None, ['Hyrule Castle Entrance (East)', 'Hyrule Castle Entrance (West)', 'Agahnims Tower', 'Hyrule Castle Ledge Courtyard Drop', 'Inverted Pyramid Hole']), create_cave_region(player, 'Old Man Cave', 'a connector', ['Old Man'], ['Old Man Cave Exit (East)']), create_cave_region(player, 'Old Man Cave Ledge', 'a connector', None, ['Old Man Cave Exit (West)', 'Old Man Cave Dropdown']), create_cave_region(player, 'Old Man House', 'a connector', None, ['Old Man House Exit (Bottom)', 'Old Man House Front to Back']), @@ -155,9 +155,9 @@ def create_inverted_regions(world, player): 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)', + 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', 'Big Bomb Shop', 'Archery Game', 'Bonk Fairy (Dark)', 'Dark Lake Hylia Shop', 'South Dark World Teleporter', 'Post Aga Teleporter', 'SDW Flute']), - create_cave_region(player, 'Inverted Big Bomb Shop', 'the bomb shop'), + create_cave_region(player, '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 Missing Wall']), create_dw_region(player, 'Dark Lake Hylia Central Island', None, ['Dark Lake Hylia Shallows', 'Ice Palace', 'Dark Lake Hylia Central Island Teleporter']), @@ -167,7 +167,7 @@ def create_inverted_regions(world, player): create_cave_region(player, 'Hype Cave', 'a bounty of five items', ['Hype Cave - Top', 'Hype Cave - Middle Right', 'Hype Cave - Middle Left', 'Hype Cave - Bottom', 'Hype Cave - Generous Guy']), create_dw_region(player, 'West Dark World', ['Frog'], ['Village of Outcasts Drop', 'East Dark World River Pier', 'Brewery', 'C-Shaped House', 'Chest Game', 'Thieves Town', 'Bumper Cave Entrance Rock', - 'Skull Woods Forest', 'Village of Outcasts Pegs', 'Village of Outcasts Eastern Rocks', 'Red Shield Shop', 'Inverted Dark Sanctuary', 'Fortune Teller (Dark)', 'Dark World Lumberjack Shop', + 'Skull Woods Forest', 'Village of Outcasts Pegs', 'Village of Outcasts Eastern Rocks', 'Red Shield Shop', 'Dark Sanctuary Hint', 'Fortune Teller (Dark)', 'Dark World Lumberjack Shop', 'West Dark World Teleporter', 'WDW Flute']), create_dw_region(player, 'Dark Grassy Lawn', None, ['Grassy Lawn Pegs', 'Dark World Shop', 'Dark Grassy Lawn Flute']), create_dw_region(player, 'Hammer Peg Area', ['Dark Blacksmith Ruins'], ['Dark World Hammer Peg Cave', 'Peg Area Rocks', 'Hammer Peg Area Flute']), @@ -183,7 +183,7 @@ def create_inverted_regions(world, player): create_cave_region(player, 'C-Shaped House', 'a house with a chest', ['C-Shaped House']), create_cave_region(player, 'Chest Game', 'a game of 16 chests', ['Chest Game']), create_cave_region(player, 'Red Shield Shop', 'the rare shop', ['Red Shield Shop - Left', 'Red Shield Shop - Middle', 'Red Shield Shop - Right']), - create_cave_region(player, 'Inverted Dark Sanctuary', 'a storyteller', None, ['Inverted Dark Sanctuary Exit']), + create_cave_region(player, 'Dark Sanctuary Hint', 'a storyteller', None, ['Dark Sanctuary Hint Exit']), create_cave_region(player, 'Bumper Cave (bottom)', 'a connector', None, ['Bumper Cave Exit (Bottom)', 'Bumper Cave Bottom to Top']), create_cave_region(player, 'Bumper Cave (top)', 'a connector', None, ['Bumper Cave Exit (Top)', 'Bumper Cave Top To Bottom']), create_dw_region(player, 'Skull Woods Forest', None, ['Skull Woods First Section Hole (East)', 'Skull Woods First Section Hole (West)', 'Skull Woods First Section Hole (North)', @@ -193,7 +193,7 @@ def create_inverted_regions(world, player): create_dw_region(player, 'Dark Desert Ledge', None, ['Dark Desert Drop', 'Dark Desert Teleporter']), create_cave_region(player, 'Mire Shed', 'a cave with two chests', ['Mire Shed - Left', 'Mire Shed - Right']), create_cave_region(player, 'Dark Desert Hint', 'a storyteller'), - create_dw_region(player, 'Dark Death Mountain', None, ['Dark Death Mountain Drop (East)', 'Inverted Agahnims Tower', 'Superbunny Cave (Top)', 'Hookshot Cave', 'Turtle Rock', + create_dw_region(player, 'Dark Death Mountain', None, ['Dark Death Mountain Drop (East)', 'Ganons Tower', 'Superbunny Cave (Top)', 'Hookshot Cave', 'Turtle Rock', 'Spike Cave', 'Dark Death Mountain Fairy', 'Dark Death Mountain Teleporter (West)', 'Turtle Rock Tail Drop', 'DDM Flute']), create_dw_region(player, 'Dark Death Mountain Ledge', None, ['Dark Death Mountain Ledge (East)', 'Dark Death Mountain Ledge (West)']), create_dw_region(player, 'Turtle Rock (Top)', None, ['Dark Death Mountain Teleporter (East)', 'Turtle Rock Drop']), diff --git a/KeyDoorShuffle.py b/KeyDoorShuffle.py index 17859357..d82adbf1 100644 --- a/KeyDoorShuffle.py +++ b/KeyDoorShuffle.py @@ -1404,18 +1404,18 @@ def forced_big_key_avail(locations): return None -def prize_relevance(key_layout, dungeon_entrance): +def prize_relevance(key_layout, dungeon_entrance, is_atgt_swapped): if len(key_layout.start_regions) > 1 and dungeon_entrance and dungeon_table[key_layout.key_logic.dungeon].prize: - if dungeon_entrance.name in ['Ganons Tower', 'Inverted Ganons Tower']: + if dungeon_entrance.name == 'Agahnims Tower' if is_atgt_swapped else 'Ganons Tower': return 'GT' elif dungeon_entrance.name == 'Pyramid Fairy': return 'BigBomb' return None -def prize_relevance_sig2(start_regions, d_name, dungeon_entrance): +def prize_relevance_sig2(start_regions, d_name, dungeon_entrance, is_atgt_swapped): if len(start_regions) > 1 and dungeon_entrance and dungeon_table[d_name].prize: - if dungeon_entrance.name in ['Ganons Tower', 'Inverted Ganons Tower']: + if dungeon_entrance.name == 'Agahnims Tower' if is_atgt_swapped else 'Ganons Tower': return 'GT' elif dungeon_entrance.name == 'Pyramid Fairy': return 'BigBomb' @@ -1431,7 +1431,7 @@ def validate_bk_layout(proposal, builder, start_regions, world, player): state.big_key_special = bk_special for region in start_regions: dungeon_entrance, portal_door = find_outside_connection(region) - prize_relevant_flag = prize_relevance_sig2(start_regions, builder.name, dungeon_entrance) + prize_relevant_flag = prize_relevance_sig2(start_regions, builder.name, dungeon_entrance, world.is_atgt_swapped(player)) if prize_relevant_flag: state.append_door_to_list(portal_door, state.prize_doors) state.prize_door_set[portal_door] = dungeon_entrance @@ -1462,7 +1462,7 @@ def validate_key_layout(key_layout, world, player): state.big_key_special = check_bk_special(key_layout.sector.regions, world, player) for region in key_layout.start_regions: dungeon_entrance, portal_door = find_outside_connection(region) - prize_relevant_flag = prize_relevance(key_layout, dungeon_entrance) + prize_relevant_flag = prize_relevance(key_layout, dungeon_entrance, world.is_atgt_swapped(player)) if prize_relevant_flag: state.append_door_to_list(portal_door, state.prize_doors) state.prize_door_set[portal_door] = dungeon_entrance @@ -1593,7 +1593,7 @@ def determine_prize_lock(key_layout, world, player): prize_lock_possible = False for region in key_layout.start_regions: dungeon_entrance, portal_door = find_outside_connection(region) - prize_relevant_flag = prize_relevance(key_layout, dungeon_entrance) + prize_relevant_flag = prize_relevance(key_layout, dungeon_entrance, world.is_atgt_swapped(player)) if prize_relevant_flag: state.append_door_to_list(portal_door, state.prize_doors) state.prize_door_set[portal_door] = dungeon_entrance @@ -1664,7 +1664,7 @@ def create_key_counters(key_layout, world, player): state.big_key_special = True for region in key_layout.start_regions: dungeon_entrance, portal_door = find_outside_connection(region) - prize_relevant_flag = prize_relevance(key_layout, dungeon_entrance) + prize_relevant_flag = prize_relevance(key_layout, dungeon_entrance, world.is_atgt_swapped(player)) if prize_relevant_flag: state.append_door_to_list(portal_door, state.prize_doors) state.prize_door_set[portal_door] = dungeon_entrance diff --git a/Main.py b/Main.py index 08e29254..9c2f1441 100644 --- a/Main.py +++ b/Main.py @@ -727,10 +727,7 @@ def create_playthrough(world): old_world.spoiler.paths.update({location.gen_name(): get_path(state, location.parent_region) for sphere in collection_spheres for location in sphere if location.player == player}) for path in dict(old_world.spoiler.paths).values(): if any(exit == 'Pyramid Fairy' for (_, exit) in path): - if world.mode[player] != 'inverted': - old_world.spoiler.paths[str(world.get_region('Big Bomb Shop', player))] = get_path(state, world.get_region('Big Bomb Shop', player)) - else: - old_world.spoiler.paths[str(world.get_region('Inverted Big Bomb Shop', player))] = get_path(state, world.get_region('Inverted Big Bomb Shop', player)) + old_world.spoiler.paths[str(world.get_region('Big Bomb Shop', player))] = get_path(state, world.get_region('Big Bomb Shop', player)) # we can finally output our playthrough old_world.spoiler.playthrough = {"0": [str(item) for item in world.precollected_items if item.advancement]} diff --git a/OverworldGlitchRules.py b/OverworldGlitchRules.py index 3ec0807b..27ce257e 100644 --- a/OverworldGlitchRules.py +++ b/OverworldGlitchRules.py @@ -119,7 +119,7 @@ def get_non_mandatory_exits(inverted): if inverted: yield 'Desert Palace Entrance (North)' yield 'Desert Palace Entrance (West)' - yield 'Inverted Ganons Tower' + yield 'Agahnims Tower' yield 'Hyrule Castle Entrance (West)' yield 'Hyrule Castle Entrance (East)' else: diff --git a/Regions.py b/Regions.py index 3c307e40..f293e220 100644 --- a/Regions.py +++ b/Regions.py @@ -6,7 +6,7 @@ from PotShuffle import key_drop_data, vanilla_pots, choose_pots, PotSecretTable def create_regions(world, player): world.regions += [ - create_menu_region(player, 'Menu', None, ['Links House S&Q', 'Sanctuary S&Q', 'Old Man S&Q']), + create_menu_region(player, 'Menu', None, ['Links House S&Q', 'Sanctuary S&Q', 'Old Man S&Q', 'Other World S&Q']), create_lw_region(player, 'Light World', ['Mushroom', 'Bottle Merchant', 'Flute Spot', 'Sunken Treasure', 'Purple Chest'], ["Blinds Hideout", "Hyrule Castle Secret Entrance Drop", 'Zoras River', 'Kings Grave Outer Rocks', 'Dam', 'Links House', 'Tavern North', 'Chicken House', 'Aginahs Cave', 'Sahasrahlas Hut', 'Kakariko Well Drop', 'Kakariko Well Cave', @@ -235,7 +235,7 @@ def create_dungeon_regions(world, player): create_dungeon_region(player, 'Desert East Portal', 'Desert Palace', None, ['Desert Palace Exit (East)', 'Enter Desert (East)']), create_dungeon_region(player, 'Desert Back Portal', 'Desert Palace', None, ['Desert Palace Exit (North)', 'Enter Desert (North)']), create_dungeon_region(player, 'Hera Portal', 'Tower of Hera', None, ['Tower of Hera Exit', 'Enter Hera']), - create_dungeon_region(player, 'Agahnims Tower Portal', 'Castle Tower', None, [inv_flag and 'Inverted Agahnims Tower Exit' or 'Agahnims Tower Exit', 'Enter Agahnims Tower']), + create_dungeon_region(player, 'Agahnims Tower Portal', 'Castle Tower', None, ['Agahnims Tower Exit', 'Enter Agahnims Tower']), create_dungeon_region(player, 'Palace of Darkness Portal', 'Palace of Darkness', None, ['Palace of Darkness Exit', 'Enter Palace of Darkness']), create_dungeon_region(player, 'Swamp Portal', 'Swamp Palace', None, ['Swamp Palace Exit', 'Enter Swamp']), create_dungeon_region(player, 'Skull 1 Portal', 'Skull Woods', None, ['Skull Woods First Section Exit', 'Enter Skull Woods 1']), @@ -249,7 +249,7 @@ def create_dungeon_regions(world, player): create_dungeon_region(player, 'Turtle Rock Lazy Eyes Portal', 'Turtle Rock', None, ['Turtle Rock Ledge Exit (West)', 'Enter Turtle Rock (Lazy Eyes)']), create_dungeon_region(player, 'Turtle Rock Chest Portal', 'Turtle Rock', None, ['Turtle Rock Ledge Exit (East)', 'Enter Turtle Rock (Chest)']), create_dungeon_region(player, 'Turtle Rock Eye Bridge Portal', 'Turtle Rock', None, ['Turtle Rock Isolated Ledge Exit', 'Enter Turtle Rock (Laser Bridge)']), - create_dungeon_region(player, 'Ganons Tower Portal', "Ganon's Tower", None, [inv_flag and 'Inverted Ganons Tower Exit' or 'Ganons Tower Exit', 'Enter Ganons Tower']), + create_dungeon_region(player, 'Ganons Tower Portal', "Ganon's Tower", None, ['Ganons Tower Exit', 'Enter Ganons Tower']), create_dungeon_region(player, 'Hyrule Castle Lobby', 'Hyrule Castle', None, ['Hyrule Castle Lobby W', 'Hyrule Castle Lobby E', 'Hyrule Castle Lobby WN', 'Hyrule Castle Lobby North Stairs', 'Hyrule Castle Lobby S']), @@ -1087,9 +1087,6 @@ def create_pot_location(pot, pot_index, super_tile, world, player): and world.pottery[player] not in ['none', 'cave', 'keys', 'cavekeys']))): address = pot_address(pot_index, super_tile) region = pot.room - if world.mode[player] == 'inverted': - if region == 'Links House': - region = 'Inverted Links House' parent = world.get_region(region, player) descriptor = 'Large Block' if pot.flags & PotFlags.Block else f'Pot #{pot_index+1}' hint_text = ('under a block' if pot.flags & PotFlags.Block else 'in a pot') diff --git a/Rom.py b/Rom.py index f8b5b107..10125e66 100644 --- a/Rom.py +++ b/Rom.py @@ -783,7 +783,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): if should_be_bunny(sanc_region, world.mode[player]): rom.write_bytes(0x13fff2, [0x12, 0x00]) - lh_name = 'Links House' if world.mode[player] != 'inverted' else 'Inverted Links House' + lh_name = 'Links House' links_house = world.get_region(lh_name, player) if should_be_bunny(links_house, world.mode[player]): rom.write_bytes(0x13fff0, [0x04, 0x01]) @@ -2044,7 +2044,7 @@ def write_strings(rom, world, player, team): entrances_to_hint.update(InconvenientDungeonEntrances) if world.shuffle_ganon: if world.mode[player] == 'inverted': - entrances_to_hint.update({'Inverted Ganons Tower': 'The sealed castle door'}) + entrances_to_hint.update({'Agahnims Tower': 'The sealed castle door'}) else: entrances_to_hint.update({'Ganons Tower': 'Ganon\'s Tower'}) if world.shuffle[player] in ['simple', 'restricted']: @@ -2077,7 +2077,7 @@ def write_strings(rom, world, player, team): entrances_to_hint.update(ConnectorEntrances) entrances_to_hint.update(DungeonEntrances) if world.mode[player] == 'inverted': - entrances_to_hint.update({'Inverted Agahnims Tower': 'The dark mountain tower'}) + entrances_to_hint.update({'Ganons Tower': 'The dark mountain tower'}) else: entrances_to_hint.update({'Agahnims Tower': 'The sealed castle door'}) elif world.shuffle[player] == 'restricted': @@ -2090,17 +2090,14 @@ def write_strings(rom, world, player, team): entrances_to_hint.update(ShopEntrances) if world.shufflelinks[player] and world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull']: if world.mode[player] == 'inverted': - entrances_to_hint.update({'Inverted Links House': 'The hero\'s old residence'}) + entrances_to_hint.update({'Big Bomb Shop': 'The old hero\'s dark home'}) else: entrances_to_hint.update({'Links House': 'The hero\'s old residence'}) if world.shuffletavern[player] and world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull']: entrances_to_hint.update({'Tavern North': 'A backdoor'}) if world.mode[player] == 'inverted': - entrances_to_hint.update({'Inverted Dark Sanctuary': 'The dark sanctuary cave'}) - entrances_to_hint.update({'Inverted Big Bomb Shop': 'The old hero\'s dark home'}) - entrances_to_hint.update({'Inverted Links House': 'The old hero\'s light home'}) + entrances_to_hint.update({'Links House': 'The old hero\'s light home'}) else: - entrances_to_hint.update({'Dark Sanctuary Hint': 'The dark sanctuary cave'}) entrances_to_hint.update({'Big Bomb Shop': 'The old bomb shop'}) if world.shuffle[player] in ['insanity']: entrances_to_hint.update(InsanityEntrances) @@ -2678,7 +2675,7 @@ def set_inverted_mode(world, player, rom): rom.write_bytes(snes_to_pc(0x06B2AB), [0xF0, 0xE1, 0x05]) def patch_shuffled_dark_sanc(world, rom, player): - dark_sanc = world.get_region('Inverted Dark Sanctuary', player) + dark_sanc = world.get_region('Dark Sanctuary Hint', player) dark_sanc_entrance = str([i for i in dark_sanc.entrances if i.parent_region.name != 'Menu'][0].name) room_id, ow_area, vram_loc, scroll_y, scroll_x, link_y, link_x, camera_y, camera_x, unknown_1, unknown_2, door_1, door_2 = door_addresses[dark_sanc_entrance][1] door_index = door_addresses[str(dark_sanc_entrance)][0] @@ -2836,7 +2833,8 @@ OtherEntrances = {'Lake Hylia Fairy': 'A cave NE of Lake Hylia', 'Dark Lake Hylia Ledge Hint': 'The open cave SE dark Lake Hylia', 'Dark Desert Fairy': 'The eastern hut in the mire', 'Dark Lake Hylia Ledge Fairy': 'The sealed cave SE dark Lake Hylia', - 'Fortune Teller (Dark)': 'The building NE the Village of Outcasts' + 'Fortune Teller (Dark)': 'The building NE the Village of Outcasts', + 'Dark Sanctuary Hint': 'The dark sanctuary cave' } InsanityEntrances = {'Sanctuary': 'Sanctuary', diff --git a/Rules.py b/Rules.py index 67417aac..7c2435fe 100644 --- a/Rules.py +++ b/Rules.py @@ -771,6 +771,8 @@ def pot_rules(world, player): def default_rules(world, player): + set_rule(world.get_entrance('Other World S&Q', player), lambda state: state.has_Mirror(player) and state.has('Beat Agahnim 1', player)) + # overworld requirements set_rule(world.get_entrance('Kings Grave', player), lambda state: state.has_Boots(player)) set_rule(world.get_entrance('Kings Grave Outer Rocks', player), lambda state: state.can_lift_heavy_rocks(player)) @@ -887,7 +889,7 @@ def default_rules(world, player): def inverted_rules(world, player): # s&q regions. link's house entrance is set to true so the filler knows the chest inside can always be reached - set_rule(world.get_entrance('Castle Ledge S&Q', player), lambda state: state.has_Mirror(player) and state.has('Beat Agahnim 1', player)) + set_rule(world.get_entrance('Other World S&Q', player), lambda state: state.has_Mirror(player) and state.has('Beat Agahnim 1', player)) # overworld requirements set_rule(world.get_location('Ice Rod Cave', player), lambda state: state.has_Pearl(player)) @@ -1034,7 +1036,7 @@ def inverted_rules(world, player): if world.swords[player] == 'swordless': swordless_rules(world, player) - set_rule(world.get_entrance('Inverted Ganons Tower', player), lambda state: state.has_crystals(world.crystals_needed_for_gt[player], player)) + set_rule(world.get_entrance('Agahnims Tower', player), lambda state: state.has_crystals(world.crystals_needed_for_gt[player], player)) def no_glitches_rules(world, player): @@ -1589,7 +1591,7 @@ def set_big_bomb_rules(world, player): def set_inverted_big_bomb_rules(world, player): - bombshop_entrance = world.get_region('Inverted Big Bomb Shop', player).entrances[0] + bombshop_entrance = world.get_region('Big Bomb Shop', player).entrances[0] Normal_LW_entrances = ['Blinds Hideout', 'Bonk Fairy (Light)', 'Lake Hylia Fairy', @@ -1634,10 +1636,10 @@ def set_inverted_big_bomb_rules(world, player): 'Hyrule Castle Secret Entrance Stairs', 'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', - 'Inverted Ganons Tower', + 'Agahnims Tower', 'Cave 45', 'Checkerboard Cave', - 'Inverted Big Bomb Shop'] + 'Links House'] Isolated_LW_entrances = ['Old Man Cave (East)', 'Old Man House (Bottom)', 'Old Man House (Top)', @@ -1665,7 +1667,7 @@ def set_inverted_big_bomb_rules(world, player): 'C-Shaped House', 'Chest Game', 'Dark World Hammer Peg Cave', - 'Inverted Dark Sanctuary', + 'Dark Sanctuary Hint', 'Fortune Teller (Dark)', 'Dark World Lumberjack Shop', 'Thieves Town', @@ -1674,7 +1676,7 @@ def set_inverted_big_bomb_rules(world, player): Southern_DW_entrances = ['Hype Cave', 'Bonk Fairy (Dark)', 'Archery Game', - 'Inverted Links House', + 'Big Bomb Shop', 'Dark Lake Hylia Shop', 'Swamp Palace'] Isolated_DW_entrances = ['Spike Cave', @@ -1691,7 +1693,7 @@ def set_inverted_big_bomb_rules(world, player): 'Hookshot Cave', 'Turtle Rock Isolated Ledge Entrance', 'Hookshot Cave Back Entrance', - 'Inverted Agahnims Tower'] + 'Ganons Tower'] LW_walkable_entrances = ['Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Ledge Spike Cave', 'Dark Lake Hylia Ledge Hint', @@ -1708,7 +1710,7 @@ def set_inverted_big_bomb_rules(world, player): 'Spectacle Rock Cave (Bottom)'] set_rule(world.get_entrance('Pyramid Fairy', player), - lambda state: state.can_reach('East Dark World', 'Region', player) and state.can_reach('Inverted Big Bomb Shop', 'Region', player) and state.has('Crystal 5', player) and state.has('Crystal 6', player)) + lambda state: state.can_reach('East Dark World', 'Region', player) and state.can_reach('Big Bomb Shop', 'Region', player) and state.has('Crystal 5', player) and state.has('Crystal 6', player)) # Key for below abbreviations: # P = pearl diff --git a/source/item/District.py b/source/item/District.py index b4e2aec0..9d858ac2 100644 --- a/source/item/District.py +++ b/source/item/District.py @@ -82,16 +82,6 @@ def create_district_helper(world, player): 'Cave Shop (Dark Death Mountain)', 'Dark Death Mountain Fairy'] if inverted: - south_dw_entrances.remove('Big Bomb Shop') - central_lw_entrances.append('Inverted Big Bomb Shop') - central_lw_entrances.remove('Links House') - south_dw_entrances.append('Inverted Links House') - voo_north_entrances.remove('Dark Sanctuary Hint') - voo_north_entrances.append('Inverted Dark Sanctuary') - ddm_entrances.remove('Ganons Tower') - central_lw_entrances.append('Inverted Ganons Tower') - central_lw_entrances.remove('Agahnims Tower') - ddm_entrances.append('Inverted Agahnims Tower') east_dw_entrances.remove('Pyramid Entrance') central_lw_entrances.append('Inverted Pyramid Entrance') east_dw_entrances.remove('Pyramid Hole') diff --git a/source/item/FillUtil.py b/source/item/FillUtil.py index 6b242589..bbde4feb 100644 --- a/source/item/FillUtil.py +++ b/source/item/FillUtil.py @@ -213,7 +213,7 @@ def district_item_pool_config(world): scale_factors = defaultdict(int) scale_total = 0 for p in range(1, world.players + 1): - ent = 'Inverted Ganons Tower' if world.mode[p] == 'inverted' else 'Ganons Tower' + ent = 'Agahnims Tower' if world.is_atgt_swapped(p) else 'Ganons Tower' dungeon = world.get_entrance(ent, p).connected_region.dungeon if dungeon: scale = world.crystals_needed_for_gt[p] diff --git a/source/overworld/EntranceShuffle2.py b/source/overworld/EntranceShuffle2.py index 6760b480..a5a66c54 100644 --- a/source/overworld/EntranceShuffle2.py +++ b/source/overworld/EntranceShuffle2.py @@ -40,14 +40,12 @@ def link_entrances_new(world, player): avail_pool = EntrancePool(world, player) i_drop_map = {x: y for x, y in drop_map.items() if not x.startswith('Inverted')} i_entrance_map = {x: y for x, y in entrance_map.items() if not x.startswith('Inverted')} - i_single_ent_map = {x: y for x, y in single_entrance_map.items() if not x.startswith('Inverted')} + i_single_ent_map = {x: y for x, y in single_entrance_map.items()} avail_pool.entrances = set(i_drop_map.keys()).union(i_entrance_map.keys()).union(i_single_ent_map.keys()) avail_pool.exits = set(i_entrance_map.values()).union(i_drop_map.values()).union(i_single_ent_map.values()) avail_pool.exits.add('Chris Houlihan Room Exit') avail_pool.inverted = world.mode[player] == 'inverted' - if avail_pool.inverted: - avail_pool.exits.add('Inverted Dark Sanctuary Exit') inverted_substitution(avail_pool, avail_pool.entrances, True, True) inverted_substitution(avail_pool, avail_pool.exits, False, True) avail_pool.original_entrances.update(avail_pool.entrances) @@ -145,14 +143,14 @@ def link_entrances_new(world, player): world.ganon_at_pyramid[player] = False # check for Ganon's Tower location - gt = 'Inverted Ganons Tower' if avail_pool.inverted else 'Ganons Tower' + gt = 'Agahnims Tower' if avail_pool.world.is_atgt_swapped(avail_pool.player) else 'Ganons Tower' if world.get_entrance(gt, player).connected_region.name != 'Ganons Tower Portal': world.ganonstower_vanilla[player] = False def do_vanilla_connections(avail_pool): if 'Chris Houlihan Room Exit' in avail_pool.exits: - lh = 'Inverted Links House' if avail_pool.inverted else 'Links House' + lh = 'Big Bomb Shop' if avail_pool.inverted else 'Links House' connect_exit('Chris Houlihan Room Exit', lh, avail_pool) for ent in list(avail_pool.entrances): if ent in avail_pool.default_map and avail_pool.default_map[ent] in avail_pool.exits: @@ -173,13 +171,13 @@ def do_main_shuffle(entrances, exits, avail, mode_def): avail.decoupled_exits.extend(exits) if not avail.world.shuffle_ganon: - if avail.inverted and 'Inverted Ganons Tower' in entrances: - connect_two_way('Inverted Ganons Tower', 'Inverted Ganons Tower Exit', avail) - entrances.remove('Inverted Ganons Tower') - exits.remove('Inverted Ganons Tower Exit') + if avail.world.is_atgt_swapped(avail.player) and 'Agahnims Tower' in entrances: + connect_two_way('Agahnims Tower', 'Ganons Tower Exit', avail) + entrances.remove('Agahnims Tower') + exits.remove('Ganons Tower Exit') if not avail.coupled: - avail.decoupled_entrances.remove('Inverted Ganons Tower') - avail.decoupled_exits.remove('Inverted Ganons Tower Exit') + avail.decoupled_entrances.remove('Agahnims Tower') + avail.decoupled_exits.remove('Ganons Tower Exit') elif 'Ganons Tower' in entrances: connect_two_way('Ganons Tower', 'Ganons Tower Exit', avail) entrances.remove('Ganons Tower') @@ -200,13 +198,13 @@ def do_main_shuffle(entrances, exits, avail, mode_def): do_links_house(entrances, exits, avail, cross_world) # inverted sanc - if avail.inverted and 'Inverted Dark Sanctuary Exit' in exits: + if avail.inverted and 'Dark Sanctuary Hint' in exits: choices = [e for e in Inverted_Dark_Sanctuary_Doors if e in entrances] choice = random.choice(choices) entrances.remove(choice) - exits.remove('Inverted Dark Sanctuary Exit') - connect_entrance(choice, 'Inverted Dark Sanctuary', avail) - ext = avail.world.get_entrance('Inverted Dark Sanctuary Exit', avail.player) + exits.remove('Dark Sanctuary Hint') + connect_entrance(choice, 'Dark Sanctuary Hint', avail) + ext = avail.world.get_entrance('Dark Sanctuary Hint Exit', avail.player) ext.connect(avail.world.get_entrance(choice, avail.player).parent_region) if not avail.coupled: avail.decoupled_entrances.remove(choice) @@ -256,7 +254,7 @@ def do_main_shuffle(entrances, exits, avail, mode_def): rem_exits.remove('Blacksmiths Hut') # bomb shop - bomb_shop = 'Inverted Big Bomb Shop' if avail.inverted else 'Big Bomb Shop' + bomb_shop = 'Links House' if avail.inverted else 'Big Bomb Shop' if bomb_shop in rem_exits: bomb_shop_options = Inverted_Bomb_Shop_Options if avail.inverted else Bomb_Shop_Options bomb_shop_options = [x for x in bomb_shop_options if x in rem_entrances] @@ -417,10 +415,10 @@ def do_holes_and_linked_drops(entrances, exits, avail, cross_world, keep_togethe def do_links_house(entrances, exits, avail, cross_world): - lh_exit = 'Inverted Links House Exit' if avail.inverted else 'Links House Exit' + lh_exit = 'Links House Exit' if lh_exit in exits: if not avail.world.shufflelinks[avail.player]: - links_house = 'Inverted Links House' if avail.inverted else 'Links House' + links_house = 'Big Bomb Shop' if avail.inverted else 'Links House' else: forbidden = list(Isolated_LH_Doors_Inv + Inverted_Dark_Sanctuary_Doors if avail.inverted else Isolated_LH_Doors_Open) @@ -632,7 +630,7 @@ def do_fixed_shuffle(avail, entrance_list): if ('Hyrule Castle Entrance (South)' in entrances and avail.world.doorShuffle[avail.player] in ['basic', 'crossed']): rules.must_exit_to_lw = True - if 'Inverted Ganons Tower' in entrances and not avail.world.shuffle_ganon: + if avail.world.is_atgt_swapped(avail.player) and 'Agahnims Tower' in entrances and not avail.world.shuffle_ganon: rules.fixed = True option = (i, entrances, targets, rules) options[i] = option @@ -644,7 +642,8 @@ def do_fixed_shuffle(avail, entrance_list): elif rules.fixed: choice = choices[i] elif rules.must_exit_to_lw: - filtered_choices = {i: opt for i, opt in choices.items() if all(t in default_lw for t in opt[2])} + lw_exits = default_lw + ['Big Bomb Shop', 'Ganons Tower Exit'] if avail.inverted else ['Links House Exit', 'Agahnims Tower Exit'] + filtered_choices = {i: opt for i, opt in choices.items() if all(t in lw_exits for t in opt[2])} index, choice = random.choice(list(filtered_choices.items())) else: index, choice = random.choice(list(choices.items())) @@ -812,7 +811,7 @@ def do_mandatory_connections(avail, entrances, cave_options, must_exit): for entrance in invalid_connections: if avail.world.get_entrance(entrance, avail.player).connected_region == at: for ext in invalid_connections[entrance]: - invalid_connections[ext] = invalid_connections[ext].union({'Inverted Ganons Tower', 'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'}) + invalid_connections[ext] = invalid_connections[ext].union({'Agahnims Tower', 'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'}) break used_caves = [] @@ -955,7 +954,7 @@ def find_entrances_and_exits(avail_pool, entrance_pool): if item in avail_pool.entrances: entrances.append(item) if item in entrance_map and entrance_map[item] in avail_pool.exits: - if entrance_map[item] in ['Links House Exit', 'Inverted Links House Exit']: + if entrance_map[item] == 'Links House Exit': targets.append('Chris Houlihan Room Exit') targets.append(entrance_map[item]) elif item in single_entrance_map and single_entrance_map[item] in avail_pool.exits: @@ -964,21 +963,18 @@ def find_entrances_and_exits(avail_pool, entrance_pool): inverted_sub_table = { - 'Ganons Tower': 'Inverted Agahnims Tower', - 'Agahnims Tower': 'Inverted Ganons Tower', - 'Dark Sanctuary Hint': 'Inverted Dark Sanctuary', - 'Big Bomb Shop': 'Inverted Links House', - 'Links House': 'Inverted Big Bomb Shop', + #TODO: Confirm this is correct + #'Ganons Tower': 'Agahnims Tower', + #'Agahnims Tower': 'Ganons Tower', + #'Links House': 'Big Bomb Shop', + #'Big Bomb Shop': 'Links House', 'Pyramid Hole': 'Inverted Pyramid Hole', 'Pyramid Entrance': 'Inverted Pyramid Entrance' } inverted_exit_sub_table = { - 'Ganons Tower Exit': 'Inverted Agahnims Tower Exit', - 'Agahnims Tower Exit': 'Inverted Ganons Tower Exit', - 'Dark Sanctuary Hint': 'Inverted Dark Sanctuary Exit', - 'Big Bomb Shop': 'Inverted Links House Exit', - 'Links House Exit': 'Inverted Big Bomb Shop', + #'Ganons Tower Exit': 'Ganons Tower Exit', + #'Agahnims Tower Exit': 'Agahnims Tower Exit' } @@ -1071,10 +1067,7 @@ def connect_entrance(entrancename, exit_name, avail): entrance.connect(region, addresses, target) avail.entrances.remove(entrancename) if avail.coupled: - if exit_name == 'Inverted Dark Sanctuary': - avail.exits.remove('Inverted Dark Sanctuary Exit') - else: - avail.exits.remove(exit_name) + avail.exits.remove(exit_name) world.spoiler.set_entrance(entrance.name, exit.name if exit is not None else region.name, 'entrance', player) logging.getLogger('').debug(f'Connected (entr) {entrance.name} to {exit.name if exit is not None else region.name}') @@ -1197,7 +1190,7 @@ modes = { 'Dark Lake Hylia Shop', 'East Dark World Hint', 'Kakariko Gamble Game', 'Good Bee Cave', 'Long Fairy Cave', 'Bush Covered House', 'Fortune Teller (Light)', 'Lost Woods Gamble', 'Desert Fairy', 'Light Hype Fairy', 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy', - 'Bonk Fairy (Light)', 'Inverted Dark Sanctuary'], + 'Bonk Fairy (Light)'], }, 'fixed_shops': { 'special': 'vanilla', @@ -1221,14 +1214,13 @@ modes = { 'Ice Rod Cave', 'Dam', 'Bonk Rock Cave', 'Library', 'Potion Shop', 'Mini Moldorm Cave', 'Checkerboard Cave', 'Graveyard Cave', 'Cave 45', 'Sick Kids House', 'Blacksmiths Hut', 'Sahasrahlas Hut', 'Aginahs Cave', 'Chicken House', 'Kings Grave', 'Blinds Hideout', - 'Waterfall of Wishing', 'Inverted Bomb Shop', 'Cave Shop (Dark Death Mountain)', + 'Waterfall of Wishing', 'Cave Shop (Dark Death Mountain)', 'Dark World Potion Shop', 'Dark World Lumberjack Shop', 'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade', 'Cave Shop (Lake Hylia)', 'Lumberjack House', 'Snitch Lady (West)', 'Snitch Lady (East)', 'Tavern (Front)', 'Light World Bomb Hut', '20 Rupee Cave', '50 Rupee Cave', 'Hookshot Fairy', 'Palace of Darkness Hint', 'Dark Lake Hylia Ledge Spike Cave', - 'Dark Desert Hint', - 'Links House', 'Inverted Links House', 'Tavern North'] + 'Dark Desert Hint', 'Links House', 'Tavern North'] }, 'old_man_cave': { # have to do old man cave first so lw dungeon don't use up everything 'special': 'old_man_cave_east', @@ -1273,7 +1265,7 @@ modes = { 'Dark Lake Hylia Shop', 'East Dark World Hint', 'Kakariko Gamble Game', 'Good Bee Cave', 'Long Fairy Cave', 'Bush Covered House', 'Fortune Teller (Light)', 'Lost Woods Gamble', 'Desert Fairy', 'Light Hype Fairy', 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy', - 'Bonk Fairy (Light)', 'Inverted Dark Sanctuary'], + 'Bonk Fairy (Light)'], }, 'fixed_shops': { 'special': 'vanilla', @@ -1297,14 +1289,13 @@ modes = { 'Ice Rod Cave', 'Dam', 'Bonk Rock Cave', 'Library', 'Potion Shop', 'Mini Moldorm Cave', 'Checkerboard Cave', 'Graveyard Cave', 'Cave 45', 'Sick Kids House', 'Blacksmiths Hut', 'Sahasrahlas Hut', 'Aginahs Cave', 'Chicken House', 'Kings Grave', 'Blinds Hideout', - 'Waterfall of Wishing', 'Inverted Bomb Shop', 'Cave Shop (Dark Death Mountain)', + 'Waterfall of Wishing', 'Cave Shop (Dark Death Mountain)', 'Dark World Potion Shop', 'Dark World Lumberjack Shop', 'Dark World Shop', 'Red Shield Shop', 'Kakariko Shop', 'Capacity Upgrade', 'Cave Shop (Lake Hylia)', 'Lumberjack House', 'Snitch Lady (West)', 'Snitch Lady (East)', 'Tavern (Front)', 'Light World Bomb Hut', '20 Rupee Cave', '50 Rupee Cave', 'Hookshot Fairy', 'Palace of Darkness Hint', 'Dark Lake Hylia Ledge Spike Cave', - 'Dark Desert Hint', - 'Links House', 'Inverted Links House', 'Tavern North'] + 'Dark Desert Hint', 'Links House', 'Tavern North'] } } }, @@ -1512,7 +1503,6 @@ entrance_map = { 'Hyrule Castle Entrance (West)': 'Hyrule Castle Exit (West)', 'Hyrule Castle Entrance (East)': 'Hyrule Castle Exit (East)', 'Agahnims Tower': 'Agahnims Tower Exit', - 'Inverted Agahnims Tower': 'Inverted Agahnims Tower Exit', 'Thieves Town': 'Thieves Town Exit', 'Skull Woods First Section Door': 'Skull Woods First Section Exit', @@ -1529,10 +1519,8 @@ entrance_map = { 'Dark Death Mountain Ledge (East)': 'Turtle Rock Ledge Exit (East)', 'Turtle Rock Isolated Ledge Entrance': 'Turtle Rock Isolated Ledge Exit', 'Ganons Tower': 'Ganons Tower Exit', - 'Inverted Ganons Tower': 'Inverted Ganons Tower Exit', 'Links House': 'Links House Exit', - 'Inverted Links House': 'Inverted Links House Exit', 'Hyrule Castle Secret Entrance Stairs': 'Hyrule Castle Secret Entrance Exit', @@ -1571,7 +1559,7 @@ entrance_map = { 'Spectacle Rock Cave': 'Spectacle Rock Cave Exit (Top)', 'Paradox Cave (Bottom)': 'Paradox Cave Exit (Bottom)', 'Paradox Cave (Middle)': 'Paradox Cave Exit (Middle)', - 'Paradox Cave (Top)': 'Paradox Cave Exit (Top)', + 'Paradox Cave (Top)': 'Paradox Cave Exit (Top)' } @@ -1606,8 +1594,7 @@ single_entrance_map = { 'Kings Grave': 'Kings Grave', 'Desert Fairy': 'Desert Healer Fairy', 'Light Hype Fairy': 'Swamp Healer Fairy', 'Lake Hylia Fortune Teller': 'Lake Hylia Fortune Teller', 'Lake Hylia Fairy': 'Lake Hylia Healer Fairy', 'Bonk Fairy (Light)': 'Bonk Fairy (Light)', 'Lumberjack House': 'Lumberjack House', 'Dam': 'Dam', - 'Blinds Hideout': 'Blinds Hideout', 'Waterfall of Wishing': 'Waterfall of Wishing', - 'Inverted Bomb Shop': 'Inverted Bomb Shop', 'Inverted Dark Sanctuary': 'Inverted Dark Sanctuary', + 'Blinds Hideout': 'Blinds Hideout', 'Waterfall of Wishing': 'Waterfall of Wishing' } default_dw = { @@ -1616,21 +1603,21 @@ default_dw = { 'Palace of Darkness Exit', 'Swamp Palace Exit', 'Turtle Rock Exit (Front)', 'Turtle Rock Ledge Exit (West)', 'Turtle Rock Ledge Exit (East)', 'Turtle Rock Isolated Ledge Exit', 'Bumper Cave Exit (Top)', 'Bumper Cave Exit (Bottom)', 'Superbunny Cave Exit (Top)', 'Superbunny Cave Exit (Bottom)', - 'Hookshot Cave Front Exit', 'Hookshot Cave Back Exit', 'Ganons Tower Exit', 'Pyramid Exit', + 'Hookshot Cave Front Exit', 'Hookshot Cave Back Exit', 'Pyramid Exit', 'Dark Lake Hylia Healer Fairy', 'Dark Lake Hylia Ledge Healer Fairy', 'Dark Desert Healer Fairy', 'Dark Death Mountain Healer Fairy', 'Cave Shop (Dark Death Mountain)', 'Pyramid Fairy', 'East Dark World Hint', - 'Palace of Darkness Hint', 'Big Bomb Shop', 'Village of Outcasts Shop', 'Dark Lake Hylia Shop', + 'Palace of Darkness Hint', 'Village of Outcasts Shop', 'Dark Lake Hylia Shop', 'Dark World Lumberjack Shop', 'Dark World Potion Shop', 'Dark Lake Hylia Ledge Spike Cave', 'Dark Lake Hylia Ledge Hint', 'Hype Cave', 'Brewery', 'C-Shaped House', 'Chest Game', 'Dark World Hammer Peg Cave', 'Red Shield Shop', 'Dark Sanctuary Hint', 'Fortune Teller (Dark)', 'Archery Game', 'Mire Shed', 'Dark Desert Hint', - 'Spike Cave', 'Skull Back Drop', 'Skull Left Drop', 'Skull Pinball', 'Skull Pot Circle', 'Pyramid', - 'Inverted Agahnims Tower Exit', 'Inverted Dark Sanctuary Exit', 'Inverted Links House Exit' + 'Spike Cave', 'Skull Back Drop', 'Skull Left Drop', 'Skull Pinball', 'Skull Pot Circle', 'Pyramid' + #'Big Bomb Shop', 'Ganons Tower Exit', } default_lw = { - 'Links House Exit', 'Desert Palace Exit (South)', 'Desert Palace Exit (West)', 'Desert Palace Exit (East)', + 'Desert Palace Exit (South)', 'Desert Palace Exit (West)', 'Desert Palace Exit (East)', 'Desert Palace Exit (North)', 'Eastern Palace Exit', 'Tower of Hera Exit', 'Hyrule Castle Exit (South)', - 'Hyrule Castle Exit (West)', 'Hyrule Castle Exit (East)', 'Agahnims Tower Exit', + 'Hyrule Castle Exit (West)', 'Hyrule Castle Exit (East)', 'Hyrule Castle Secret Entrance Exit', 'Kakariko Well Exit', 'Bat Cave Exit', 'Elder House Exit (East)', 'Elder House Exit (West)', 'North Fairy Cave Exit', 'Lost Woods Hideout Exit', 'Lumberjack Tree Exit', 'Two Brothers House Exit (East)', 'Two Brothers House Exit (West)', 'Sanctuary Exit', 'Old Man Cave Exit (East)', @@ -1647,8 +1634,7 @@ default_lw = { 'Mini Moldorm Cave', 'Long Fairy Cave', 'Good Bee Cave', '20 Rupee Cave', '50 Rupee Cave', 'Ice Rod Cave', 'Bonk Rock Cave', 'Library', 'Kakariko Gamble Game', 'Potion Shop', 'Hookshot Fairy', 'Mimic Cave', 'Kakariko Well (top)', 'Hyrule Castle Secret Entrance', 'Bat Cave (right)', 'North Fairy Cave', - 'Lost Woods Hideout (top)', 'Lumberjack Tree (top)', 'Sewer Drop', 'Inverted Ganons Tower Exit', - 'Inverted Big Bomb Shop' + 'Lost Woods Hideout (top)', 'Lumberjack Tree (top)', 'Sewer Drop' } LW_Entrances = ['Elder House (East)', 'Elder House (West)', 'Two Brothers House (East)', 'Two Brothers House (West)', @@ -1669,8 +1655,7 @@ LW_Entrances = ['Elder House (East)', 'Elder House (West)', 'Two Brothers House 'Old Man House (Top)', 'Death Mountain Return Cave (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave Peak', 'Spectacle Rock Cave (Bottom)', 'Hyrule Castle Secret Entrance Stairs', 'Kakariko Well Cave', 'Bat Cave Cave', 'North Fairy Cave', 'Lost Woods Hideout Stump', - 'Lumberjack Tree Cave', 'Sanctuary', - 'Inverted Ganons Tower', 'Inverted Big Bomb Shop', 'Inverted Pyramid Entrance'] + 'Lumberjack Tree Cave', 'Sanctuary', 'Inverted Pyramid Entrance'] DW_Entrances = ['Bumper Cave (Bottom)', 'Superbunny Cave (Top)', 'Superbunny Cave (Bottom)', 'Hookshot Cave', 'Thieves Town', 'Skull Woods Final Section', 'Ice Palace', 'Misery Mire', 'Palace of Darkness', @@ -1684,8 +1669,7 @@ DW_Entrances = ['Bumper Cave (Bottom)', 'Superbunny Cave (Top)', 'Superbunny Ca 'Dark Lake Hylia Ledge Hint', 'Chest Game', 'Dark Desert Fairy', 'Dark Lake Hylia Ledge Fairy', 'Fortune Teller (Dark)', 'Dark World Hammer Peg Cave', 'Pyramid Entrance', 'Skull Woods First Section Door', 'Skull Woods Second Section Door (East)', - 'Skull Woods Second Section Door (West)', - 'Inverted Dark Sanctuary', 'Inverted Links House', 'Inverted Agahnims Tower'] + 'Skull Woods Second Section Door (West)'] LW_Must_Exit = ['Desert Palace Entrance (East)'] @@ -1696,7 +1680,7 @@ DW_Must_Exit = [('Dark Death Mountain Ledge (East)', 'Dark Death Mountain Ledge Inverted_LW_Must_Exit = [('Desert Palace Entrance (North)', 'Desert Palace Entrance (West)'), 'Desert Palace Entrance (East)', 'Death Mountain Return Cave (West)', 'Two Brothers House (West)', - ('Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Inverted Ganons Tower')] + ('Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Agahnims Tower')] Inverted_DW_Must_Exit = [] @@ -1720,7 +1704,7 @@ LH_DM_Connector_List = { 'Fairy Ascension Cave (Bottom)', 'Fairy Ascension Cave (Top)', 'Spiral Cave', 'Spiral Cave (Bottom)', 'Tower of Hera', 'Spectacle Rock Cave Peak', 'Spectacle Rock Cave (Bottom)', 'Spectacle Rock Cave', 'Paradox Cave (Bottom)', 'Paradox Cave (Middle)', 'Paradox Cave (Top)', 'Hookshot Fairy', 'Spike Cave', - 'Dark Death Mountain Fairy', 'Inverted Agahnims Tower', 'Superbunny Cave (Top)', 'Superbunny Cave (Bottom)', + 'Dark Death Mountain Fairy', 'Ganons Tower', 'Superbunny Cave (Top)', 'Superbunny Cave (Bottom)', 'Hookshot Cave', 'Cave Shop (Dark Death Mountain)', 'Turtle Rock'} LH_DM_Exit_Forbidden = { @@ -1732,7 +1716,7 @@ LH_DM_Exit_Forbidden = { # in inverted we put dark sanctuary in west dark world for now Inverted_Dark_Sanctuary_Doors = [ - 'Inverted Dark Sanctuary', 'Fortune Teller (Dark)', 'Brewery', 'C-Shaped House', 'Chest Game', + 'Dark Sanctuary Hint', 'Fortune Teller (Dark)', 'Brewery', 'C-Shaped House', 'Chest Game', 'Dark World Lumberjack Shop', 'Red Shield Shop', 'Bumper Cave (Bottom)', 'Bumper Cave (Top)', 'Thieves Town' ] @@ -1782,9 +1766,9 @@ Inverted_Must_Exit_Invalid_Connections = defaultdict(set, { 'Death Mountain Return Cave (West)': {'Bumper Cave (Top)'}, 'Desert Palace Entrance (North)': {'Desert Palace Entrance (West)'}, 'Desert Palace Entrance (West)': {'Desert Palace Entrance (North)'}, - 'Inverted Ganons Tower': {'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'}, - 'Hyrule Castle Entrance (West)': {'Hyrule Castle Entrance (East)', 'Inverted Ganons Tower'}, - 'Hyrule Castle Entrance (East)': {'Hyrule Castle Entrance (West)', 'Inverted Ganons Tower'}, + 'Agahnims Tower': {'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)'}, + 'Hyrule Castle Entrance (West)': {'Hyrule Castle Entrance (East)', 'Agahnims Tower'}, + 'Hyrule Castle Entrance (East)': {'Hyrule Castle Entrance (West)', 'Agahnims Tower'}, }) Old_Man_Entrances = ['Old Man Cave (East)', @@ -1795,7 +1779,7 @@ Old_Man_Entrances = ['Old Man Cave (East)', 'Spectacle Rock Cave (Bottom)', 'Tower of Hera'] -Inverted_Old_Man_Entrances = ['Dark Death Mountain Fairy', 'Spike Cave', 'Inverted Agahnims Tower'] +Inverted_Old_Man_Entrances = ['Dark Death Mountain Fairy', 'Spike Cave', 'Ganons Tower'] Simple_DM_Non_Connectors = {'Old Man Cave Ledge', 'Spiral Cave (Top)', 'Superbunny Cave (Bottom)', 'Spectacle Rock Cave (Peak)', 'Spectacle Rock Cave (Top)'} @@ -1808,7 +1792,7 @@ Blacksmith_Options = [ '50 Rupee Cave', 'Ice Rod Cave', 'Library', 'Potion Shop', 'Dam', 'Lumberjack House', 'Lake Hylia Fortune Teller', 'Kakariko Gamble Game', 'Eastern Palace', 'Elder House (East)', 'Elder House (West)', 'Two Brothers House (East)', 'Old Man Cave (West)', 'Sanctuary', 'Lumberjack Tree Cave', 'Lost Woods Hideout Stump', 'North Fairy Cave', - 'Bat Cave Cave', 'Kakariko Well Cave', 'Inverted Big Bomb Shop', 'Links House'] + 'Bat Cave Cave', 'Kakariko Well Cave', 'Links House'] Bomb_Shop_Options = [ 'Waterfall of Wishing', 'Capacity Upgrade', 'Bonk Rock Cave', 'Graveyard Cave', 'Checkerboard Cave', 'Cave 45', @@ -1852,8 +1836,7 @@ Inverted_Bomb_Shop_Options = [ 'Fairy Ascension Cave (Top)', 'Spiral Cave', 'Spiral Cave (Bottom)', 'Palace of Darkness', 'Hyrule Castle Entrance (West)', 'Hyrule Castle Entrance (East)', 'Desert Palace Entrance (West)', 'Desert Palace Entrance (North)', - 'Inverted Ganons Tower', 'Inverted Agahnims Tower', 'Inverted Dark Sanctuary', 'Inverted Links House', - 'Inverted Big Bomb Shop'] + Blacksmith_Options + 'Agahnims Tower', 'Ganons Tower', 'Dark Sanctuary Hint', 'Big Bomb Shop', 'Links House'] + Blacksmith_Options # these are connections that cannot be shuffled and always exist. @@ -1861,6 +1844,7 @@ Inverted_Bomb_Shop_Options = [ mandatory_connections = [('Links House S&Q', 'Links House'), ('Sanctuary S&Q', 'Sanctuary'), ('Old Man S&Q', 'Old Man House'), + ('Other World S&Q', 'East Dark World'), ('Lake Hylia Central Island Pier', 'Lake Hylia Central Island'), ('Lake Hylia Central Island Teleporter', 'Dark Lake Hylia Central Island'), ('Zoras River', 'Zoras River'), @@ -1997,10 +1981,10 @@ mandatory_connections = [('Links House S&Q', 'Links House'), ('Hyrule Castle Ledge Drop', 'Light World'), ] -inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'), - ('Dark Sanctuary S&Q', 'Inverted Dark Sanctuary'), +inverted_mandatory_connections = [('Links House S&Q', 'Links House'), + ('Sanctuary S&Q', 'Dark Sanctuary Hint'), ('Old Man S&Q', 'Old Man House'), - ('Castle Ledge S&Q', 'Hyrule Castle Ledge'), + ('Other World S&Q', 'Hyrule Castle Ledge'), ('Lake Hylia Central Island Pier', 'Lake Hylia Central Island'), ('Lake Hylia Island Pier', 'Lake Hylia Island'), ('Lake Hylia Warp', 'Northeast Light World'), @@ -2298,6 +2282,7 @@ default_connections = {'Links House': 'Links House', 'Bumper Cave (Top)': 'Bumper Cave (top)', 'Red Shield Shop': 'Red Shield Shop', 'Dark Sanctuary Hint': 'Dark Sanctuary Hint', + 'Dark Sanctuary Hint Exit': 'West Dark World', 'Fortune Teller (Dark)': 'Fortune Teller (Dark)', 'Dark World Shop': 'Village of Outcasts Shop', 'Dark World Lumberjack Shop': 'Dark World Lumberjack Shop', @@ -2451,11 +2436,11 @@ inverted_default_connections = {'Waterfall of Wishing': 'Waterfall of Wishing', 'Hookshot Cave Back Entrance': 'Hookshot Cave (Back)', 'Mimic Cave': 'Mimic Cave', 'Inverted Pyramid Hole': 'Pyramid', - 'Inverted Links House': 'Inverted Links House', - 'Inverted Links House Exit': 'South Dark World', - 'Inverted Big Bomb Shop': 'Inverted Big Bomb Shop', - 'Inverted Dark Sanctuary': 'Inverted Dark Sanctuary', - 'Inverted Dark Sanctuary Exit': 'West Dark World', + 'Links House': 'Links House', + 'Links House Exit': 'South Dark World', + 'Big Bomb Shop': 'Big Bomb Shop', + 'Dark Sanctuary Hint': 'Dark Sanctuary Hint', + 'Dark Sanctuary Hint Exit': 'West Dark World', 'Old Man Cave (West)': 'Bumper Cave (bottom)', 'Old Man Cave (East)': 'Death Mountain Return Cave (left)', 'Old Man Cave Exit (West)': 'West Dark World', @@ -2581,10 +2566,10 @@ inverted_default_dungeon_connections = [('Desert Palace Entrance (South)', 'Dese ('Dark Death Mountain Ledge (East)', 'Turtle Rock Chest Portal'), ('Turtle Rock Isolated Ledge Exit', 'Dark Death Mountain Isolated Ledge'), ('Turtle Rock Isolated Ledge Entrance', 'Turtle Rock Eye Bridge Portal'), - ('Inverted Ganons Tower', 'Ganons Tower Portal'), - ('Inverted Ganons Tower Exit', 'Hyrule Castle Ledge'), - ('Inverted Agahnims Tower', 'Agahnims Tower Portal'), - ('Inverted Agahnims Tower Exit', 'Dark Death Mountain'), + ('Agahnims Tower', 'Ganons Tower Portal'), + ('Ganons Tower Exit', 'Hyrule Castle Ledge'), + ('Ganons Tower', 'Agahnims Tower Portal'), + ('Agahnims Tower Exit', 'Dark Death Mountain'), ('Turtle Rock Exit (Front)', 'Dark Death Mountain'), ('Ice Palace Exit', 'Dark Lake Hylia') ] @@ -2607,7 +2592,6 @@ indirect_connections = { # ToDo somehow merge this with creation of the locations door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0x0ae8, 0x08b8, 0x0b07, 0x08bf, 0x06, 0xfe, 0x0816, 0x0000)), - 'Inverted Big Bomb Shop': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0x0ae8, 0x08b8, 0x0b07, 0x08bf, 0x06, 0xfe, 0x0816, 0x0000)), 'Desert Palace Entrance (South)': (0x08, (0x0084, 0x30, 0x0314, 0x0c56, 0x00a6, 0x0ca8, 0x0128, 0x0cc3, 0x0133, 0x0a, 0xfa, 0x0000, 0x0000)), 'Desert Palace Entrance (West)': (0x0A, (0x0083, 0x30, 0x0280, 0x0c46, 0x0003, 0x0c98, 0x0088, 0x0cb3, 0x0090, 0x0a, 0xfd, 0x0000, 0x0000)), 'Desert Palace Entrance (North)': (0x0B, (0x0063, 0x30, 0x0016, 0x0c00, 0x00a2, 0x0c28, 0x0128, 0x0c6d, 0x012f, 0x00, 0x0e, 0x0000, 0x0000)), @@ -2619,7 +2603,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 'Hyrule Castle Entrance (East)': (0x04, (0x0062, 0x1b, 0x004a, 0x0600, 0x0856, 0x0604, 0x08c8, 0x066d, 0x08d3, 0x00, 0xfa, 0x0000, 0x8158)), 'Inverted Pyramid Entrance': (0x35, (0x0010, 0x1b, 0x0418, 0x0679, 0x06b4, 0x06c6, 0x0728, 0x06e6, 0x0733, 0x07, 0xf9, 0x0000, 0x0000)), 'Agahnims Tower': (0x23, (0x00e0, 0x1b, 0x0032, 0x0600, 0x0784, 0x0634, 0x07f8, 0x066d, 0x0803, 0x00, 0x0a, 0x0000, 0x82be)), - 'Inverted Ganons Tower': (0x23, (0x00e0, 0x1b, 0x0032, 0x0600, 0x0784, 0x0634, 0x07f8, 0x066d, 0x0803, 0x00, 0x0a, 0x0000, 0x82be)), 'Thieves Town': (0x33, (0x00db, 0x58, 0x0b2e, 0x075a, 0x0176, 0x07a8, 0x01f8, 0x07c7, 0x0203, 0x06, 0xfa, 0x0000, 0x0000)), 'Skull Woods First Section Door': (0x29, (0x0058, 0x40, 0x0f4c, 0x01f6, 0x0262, 0x0248, 0x02e8, 0x0263, 0x02ef, 0x0a, 0xfe, 0x0000, 0x0000)), 'Skull Woods Second Section Door (East)': (0x28, (0x0057, 0x40, 0x0eb8, 0x01e6, 0x01c2, 0x0238, 0x0248, 0x0253, 0x024f, 0x0a, 0xfe, 0x0000, 0x0000)), @@ -2667,7 +2650,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 'Hookshot Cave': (0x39, (0x003c, 0x45, 0x04da, 0x00a3, 0x0cd6, 0x0107, 0x0d48, 0x0112, 0x0d53, 0x0b, 0xfa, 0x0000, 0x0000)), 'Hookshot Cave Back Entrance': (0x3A, (0x002c, 0x45, 0x004c, 0x0000, 0x0c56, 0x0038, 0x0cc8, 0x006f, 0x0cd3, 0x00, 0x0a, 0x0000, 0x0000)), 'Ganons Tower': (0x36, (0x000c, 0x43, 0x0052, 0x0000, 0x0884, 0x0028, 0x08f8, 0x006f, 0x0903, 0x00, 0xfc, 0x0000, 0x0000)), - 'Inverted Agahnims Tower': (0x36, (0x000c, 0x43, 0x0052, 0x0000, 0x0884, 0x0028, 0x08f8, 0x006f, 0x0903, 0x00, 0xfc, 0x0000, 0x0000)), 'Pyramid Entrance': (0x35, (0x0010, 0x5b, 0x0b0e, 0x075a, 0x0674, 0x07a8, 0x06e8, 0x07c7, 0x06f3, 0x06, 0xfa, 0x0000, 0x0000)), 'Skull Woods First Section Hole (West)': ([0xDB84D, 0xDB84E], None), 'Skull Woods First Section Hole (East)': ([0xDB84F, 0xDB850], None), @@ -2734,7 +2716,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 'Dark World Hammer Peg Cave': (0x7E, (0x0127, 0x62, 0x0894, 0x091e, 0x0492, 0x09a6, 0x0508, 0x098b, 0x050f, 0x00, 0x00, 0x0000, 0x0000)), 'Red Shield Shop': (0x74, (0x0110, 0x5a, 0x079a, 0x06e8, 0x04d6, 0x0738, 0x0548, 0x0755, 0x0553, 0x08, 0xf8, 0x0AA8, 0x0000)), 'Dark Sanctuary Hint': (0x59, (0x0112, 0x53, 0x001e, 0x0400, 0x06e2, 0x0446, 0x0758, 0x046d, 0x075f, 0x00, 0x00, 0x0000, 0x0000)), - 'Inverted Dark Sanctuary': (0x59, (0x0112, 0x53, 0x001e, 0x0400, 0x06e2, 0x0446, 0x0758, 0x046d, 0x075f, 0x00, 0x00, 0x0000, 0x0000)), 'Fortune Teller (Dark)': (0x65, (0x0122, 0x51, 0x0610, 0x04b4, 0x027e, 0x0507, 0x02f8, 0x0523, 0x0303, 0x0a, 0xf6, 0x091E, 0x0000)), 'Dark World Shop': (0x5F, (0x010f, 0x58, 0x1058, 0x0814, 0x02be, 0x0868, 0x0338, 0x0883, 0x0343, 0x0a, 0xf6, 0x0000, 0x0000)), 'Dark World Lumberjack Shop': (0x56, (0x010f, 0x42, 0x041c, 0x0074, 0x04e2, 0x00c7, 0x0558, 0x00e3, 0x055f, 0x0a, 0xf6, 0x0000, 0x0000)), @@ -2748,7 +2729,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 'Dark Death Mountain Fairy': (0x6F, (0x0115, 0x43, 0x1400, 0x0294, 0x0600, 0x02e8, 0x0678, 0x0303, 0x0685, 0x0a, 0xf6, 0x0000, 0x0000)), 'Mimic Cave': (0x4E, (0x010c, 0x05, 0x07e0, 0x0103, 0x0d00, 0x0156, 0x0d78, 0x0172, 0x0d7d, 0x0b, 0xf5, 0x0000, 0x0000)), 'Big Bomb Shop': (0x52, (0x011c, 0x6c, 0x0506, 0x0a9a, 0x0832, 0x0ae7, 0x08b8, 0x0b07, 0x08bf, 0x06, 0xfa, 0x0816, 0x0000)), - 'Inverted Links House': (0x52, (0x011c, 0x6c, 0x0506, 0x0a9a, 0x0832, 0x0ae7, 0x08b8, 0x0b07, 0x08bf, 0x06, 0xfa, 0x0816, 0x0000)), 'Dark Lake Hylia Shop': (0x73, (0x010f, 0x75, 0x0380, 0x0c6a, 0x0a00, 0x0cb8, 0x0a58, 0x0cd7, 0x0a85, 0x06, 0xfa, 0x0000, 0x0000)), 'Lumberjack House': (0x75, (0x011f, 0x02, 0x049c, 0x0088, 0x04e6, 0x00d8, 0x0558, 0x00f7, 0x0563, 0x08, 0xf8, 0x07AA, 0x0000)), 'Lake Hylia Fortune Teller': (0x72, (0x0122, 0x35, 0x0380, 0x0c6a, 0x0a00, 0x0cb8, 0x0a58, 0x0cd7, 0x0a85, 0x06, 0xfa, 0x0000, 0x0000)), @@ -2759,7 +2739,6 @@ door_addresses = {'Links House': (0x00, (0x0104, 0x2c, 0x0506, 0x0a9a, 0x0832, 0 # value = entrance # # | (entrance #, exit #) exit_ids = {'Links House Exit': (0x01, 0x00), - 'Inverted Links House Exit': (0x01, 0x00), 'Chris Houlihan Room Exit': (None, 0x3D), 'Desert Palace Exit (South)': (0x09, 0x0A), 'Desert Palace Exit (West)': (0x0B, 0x0C), @@ -2771,7 +2750,6 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'Hyrule Castle Exit (West)': (0x03, 0x02), 'Hyrule Castle Exit (East)': (0x05, 0x04), 'Agahnims Tower Exit': (0x24, 0x25), - 'Inverted Agahnims Tower Exit': (0x24, 0x25), 'Thieves Town Exit': (0x34, 0x35), 'Skull Woods First Section Exit': (0x2A, 0x2B), 'Skull Woods Second Section Exit (East)': (0x29, 0x2A), @@ -2819,7 +2797,6 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'Hookshot Cave Front Exit': (0x3A, 0x3B), 'Hookshot Cave Back Exit': (0x3B, 0x3C), 'Ganons Tower Exit': (0x37, 0x38), - 'Inverted Ganons Tower Exit': (0x37, 0x38), 'Pyramid Exit': (0x36, 0x37), 'Waterfall of Wishing': 0x5C, 'Dam': 0x4E, @@ -2871,7 +2848,6 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'East Dark World Hint': 0x69, 'Palace of Darkness Hint': 0x68, 'Big Bomb Shop': 0x53, - 'Inverted Big Bomb Shop': 0x53, 'Village of Outcasts Shop': 0x60, 'Dark Lake Hylia Shop': 0x60, 'Dark World Lumberjack Shop': 0x60, @@ -2885,7 +2861,6 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'Dark World Hammer Peg Cave': 0x83, 'Red Shield Shop': 0x57, 'Dark Sanctuary Hint': 0x5A, - 'Inverted Dark Sanctuary': 0x5A, 'Fortune Teller (Dark)': 0x66, 'Archery Game': 0x59, 'Mire Shed': 0x5F, @@ -2905,13 +2880,13 @@ exit_ids = {'Links House Exit': (0x01, 0x00), 'Skull Pot Circle': 0x76, 'Pyramid': 0x7B} -ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Inverted Big Bomb Shop': (0x8b1, 0xb2d), +ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Desert Palace Entrance (South)': (0x108, 0xd70), 'Desert Palace Entrance (West)': (0x031, 0xca0), 'Desert Palace Entrance (North)': (0x0e1, 0xba0), 'Desert Palace Entrance (East)': (0x191, 0xca0), 'Eastern Palace': (0xf31, 0x620), 'Tower of Hera': (0x8D0, 0x080), 'Hyrule Castle Entrance (South)': (0x7b0, 0x730), 'Hyrule Castle Entrance (West)': (0x700, 0x640), 'Hyrule Castle Entrance (East)': (0x8a0, 0x640), 'Inverted Pyramid Entrance': (0x720, 0x700), - 'Agahnims Tower': (0x7e0, 0x640), 'Inverted Ganons Tower': (0x7e0, 0x640), + 'Agahnims Tower': (0x7e0, 0x640), 'Thieves Town': (0x1d0, 0x780), 'Skull Woods First Section Door': (0x240, 0x280), 'Skull Woods Second Section Door (East)': (0x1a0, 0x240), 'Skull Woods Second Section Door (West)': (0x0c0, 0x1c0), 'Skull Woods Final Section': (0x082, 0x0b0), @@ -2956,7 +2931,6 @@ ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Inverted Big Bomb Shop': (0x8b 'Hookshot Cave': (0xc80, 0x0c0), 'Hookshot Cave Back Entrance': (0xcf0, 0x004), 'Ganons Tower': (0x8D0, 0x080), - 'Inverted Agahnims Tower': (0x8D0, 0x080), 'Pyramid Entrance': (0x640, 0x7c0), 'Skull Woods First Section Hole (West)': None, 'Skull Woods First Section Hole (East)': None, @@ -3020,7 +2994,6 @@ ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Inverted Big Bomb Shop': (0x8b 'Dark World Hammer Peg Cave': (0x4c0, 0x940), 'Red Shield Shop': (0x500, 0x680), 'Dark Sanctuary Hint': (0x720, 0x4a0), - 'Inverted Dark Sanctuary': (0x720, 0x4a0), 'Fortune Teller (Dark)': (0x2c0, 0x4c0), 'Dark World Shop': (0x2e0, 0x880), 'Dark World Lumberjack Shop': (0x4e0, 0x0d0), @@ -3033,7 +3006,7 @@ ow_prize_table = {'Links House': (0x8b1, 0xb2d), 'Inverted Big Bomb Shop': (0x8b 'Cave Shop (Dark Death Mountain)': (0xd80, 0x180), 'Dark Death Mountain Fairy': (0x620, 0x2c0), 'Mimic Cave': (0xc80, 0x180), - 'Big Bomb Shop': (0x8b1, 0xb2d), 'Inverted Links House': (0x8b1, 0xb2d), + 'Big Bomb Shop': (0x8b1, 0xb2d), 'Dark Lake Hylia Shop': (0xa40, 0xc40), 'Lumberjack House': (0x4e0, 0x0d0), 'Lake Hylia Fortune Teller': (0xa40, 0xc40), diff --git a/test/inverted/TestInvertedBombRules.py b/test/inverted/TestInvertedBombRules.py index bbcf43dd..72039712 100644 --- a/test/inverted/TestInvertedBombRules.py +++ b/test/inverted/TestInvertedBombRules.py @@ -20,8 +20,8 @@ class TestInvertedBombRules(TestInverted): if entrance_name not in ['Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)']: entrance = self.world.get_entrance(entrance_name, 1) entrance.connected_region = None - self.world.get_region('Inverted Big Bomb Shop', 1).entrances = [] - connect_entrance(self.world, entrance, 'Inverted Big Bomb Shop', 1) + self.world.get_region('Big Bomb Shop', 1).entrances = [] + connect_entrance(self.world, entrance, 'Big Bomb Shop', 1) set_inverted_big_bomb_rules(self.world, 1) entrance.connected_region.entrances.remove(entrance) entrance.connected_region = None @@ -35,8 +35,8 @@ class TestInvertedBombRules(TestInverted): def testInvalidEntrances(self): for entrance_name in ['Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)']: entrance = self.world.get_entrance(entrance_name, 1) - self.world.get_region('Inverted Big Bomb Shop', 1).entrances = [] - connect_entrance(self.world, entrance, 'Inverted Big Bomb Shop', 1) + self.world.get_region('Big Bomb Shop', 1).entrances = [] + connect_entrance(self.world, entrance, 'Big Bomb Shop', 1) with self.assertRaises(Exception): set_inverted_big_bomb_rules(self.world, 1) entrance.connected_region.entrances.remove(entrance) diff --git a/test/inverted/TestInvertedEntrances.py b/test/inverted/TestInvertedEntrances.py index 89b3e000..a4c2b1d7 100644 --- a/test/inverted/TestInvertedEntrances.py +++ b/test/inverted/TestInvertedEntrances.py @@ -49,15 +49,15 @@ class TestEntrances(TestInverted): ["Tower of Hera", True, ["Moon Pearl", "Hammer", "Hookshot", "Progressive Glove", "Ocarina"]], ["Tower of Hera", True, ["Moon Pearl", "Hammer", "Beat Agahnim 1", "Ocarina", "Hookshot"]], - ["Inverted Agahnims Tower", False, []], - ["Inverted Agahnims Tower", False, [], ["Ocarina", "Lamp"]], - ["Inverted Agahnims Tower", False, [], ["Ocarina", "Progressive Glove"]], - ["Inverted Agahnims Tower", False, [], ["Moon Pearl", "Lamp"]], - ["Inverted Agahnims Tower", False, [], ["Moon Pearl", "Progressive Glove"]], - ["Inverted Agahnims Tower", True, ["Lamp", "Progressive Glove"]], - ["Inverted Agahnims Tower", True, ["Ocarina", "Beat Agahnim 1", "Moon Pearl"]], - ["Inverted Agahnims Tower", True, ["Ocarina", "Progressive Glove", "Progressive Glove", "Moon Pearl"]], - ["Inverted Agahnims Tower", True, ["Ocarina", "Progressive Glove", "Hammer", "Moon Pearl"]], + ["Agahnims Tower", False, []], + ["Agahnims Tower", False, [], ["Ocarina", "Lamp"]], + ["Agahnims Tower", False, [], ["Ocarina", "Progressive Glove"]], + ["Agahnims Tower", False, [], ["Moon Pearl", "Lamp"]], + ["Agahnims Tower", False, [], ["Moon Pearl", "Progressive Glove"]], + ["Agahnims Tower", True, ["Lamp", "Progressive Glove"]], + ["Agahnims Tower", True, ["Ocarina", "Beat Agahnim 1", "Moon Pearl"]], + ["Agahnims Tower", True, ["Ocarina", "Progressive Glove", "Progressive Glove", "Moon Pearl"]], + ["Agahnims Tower", True, ["Ocarina", "Progressive Glove", "Hammer", "Moon Pearl"]], ["Palace of Darkness", False, []], ["Palace of Darkness", False, [], ["Hammer", "Flippers", "Magic Mirror", "Ocarina"]], @@ -104,15 +104,15 @@ class TestEntrances(TestInverted): ["Turtle Rock", True, ["Quake", "Progressive Sword", "Progressive Glove", "Hammer", "Moon Pearl", "Ocarina"]], ["Turtle Rock", True, ["Quake", "Progressive Sword", "Beat Agahnim 1", "Moon Pearl", "Ocarina"]], - ["Inverted Ganons Tower", False, []], - ["Inverted Ganons Tower", False, [], ["Crystal 1"]], - ["Inverted Ganons Tower", False, [], ["Crystal 2"]], - ["Inverted Ganons Tower", False, [], ["Crystal 3"]], - ["Inverted Ganons Tower", False, [], ["Crystal 4"]], - ["Inverted Ganons Tower", False, [], ["Crystal 5"]], - ["Inverted Ganons Tower", False, [], ["Crystal 6"]], - ["Inverted Ganons Tower", False, [], ["Crystal 7"]], - ["Inverted Ganons Tower", True, ["Beat Agahnim 1", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], - ["Inverted Ganons Tower", True, ["Moon Pearl", "Progressive Glove", "Progressive Glove", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], - ["Inverted Ganons Tower", True, ["Moon Pearl", "Hammer", "Progressive Glove", "Progressive Glove", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], + ["Ganons Tower", False, []], + ["Ganons Tower", False, [], ["Crystal 1"]], + ["Ganons Tower", False, [], ["Crystal 2"]], + ["Ganons Tower", False, [], ["Crystal 3"]], + ["Ganons Tower", False, [], ["Crystal 4"]], + ["Ganons Tower", False, [], ["Crystal 5"]], + ["Ganons Tower", False, [], ["Crystal 6"]], + ["Ganons Tower", False, [], ["Crystal 7"]], + ["Ganons Tower", True, ["Beat Agahnim 1", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], + ["Ganons Tower", True, ["Moon Pearl", "Progressive Glove", "Progressive Glove", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], + ["Ganons Tower", True, ["Moon Pearl", "Hammer", "Progressive Glove", "Progressive Glove", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], ]) \ No newline at end of file