Fixed issues with generating Inverted and Insanity seeds

This commit is contained in:
codemann8
2021-05-28 20:58:16 -05:00
parent 4e3d506d4c
commit 1123d686d5
3 changed files with 9 additions and 11 deletions

View File

@@ -260,7 +260,7 @@ def link_entrances(world, player):
bomb_shop_doors = [door for door in bomb_shop_doors[:]] bomb_shop_doors = [door for door in bomb_shop_doors[:]]
random.shuffle(bomb_shop_doors) random.shuffle(bomb_shop_doors)
bomb_shop = bomb_shop_doors.pop() bomb_shop = bomb_shop_doors.pop()
connect_entrance(world, bomb_shop, 'Big Bomb Shop' if not invFlag else 'Links House', player) connect_entrance(world, bomb_shop, 'Big Bomb Shop', player)
single_doors.extend(bomb_shop_doors) single_doors.extend(bomb_shop_doors)
# tavern back door cannot be shuffled yet # tavern back door cannot be shuffled yet
@@ -350,7 +350,7 @@ def link_entrances(world, player):
bomb_shop_doors = [door for door in bomb_shop_doors if door in all_entrances] bomb_shop_doors = [door for door in bomb_shop_doors if door in all_entrances]
random.shuffle(bomb_shop_doors) random.shuffle(bomb_shop_doors)
bomb_shop = bomb_shop_doors.pop() bomb_shop = bomb_shop_doors.pop()
connect_entrance(world, bomb_shop, 'Big Bomb Shop' if not invFlag else 'Links House', player) connect_entrance(world, bomb_shop, 'Big Bomb Shop', player)
if bomb_shop in lw_entrances: if bomb_shop in lw_entrances:
lw_entrances.remove(bomb_shop) lw_entrances.remove(bomb_shop)
if bomb_shop in dw_entrances: if bomb_shop in dw_entrances:
@@ -613,7 +613,7 @@ def link_entrances(world, player):
bomb_shop_doors = [door for door in bomb_shop_doors if door in all_entrances] bomb_shop_doors = [door for door in bomb_shop_doors if door in all_entrances]
random.shuffle(bomb_shop_doors) random.shuffle(bomb_shop_doors)
bomb_shop = bomb_shop_doors.pop() bomb_shop = bomb_shop_doors.pop()
connect_entrance(world, bomb_shop, 'Big Bomb Shop' if not invFlag else 'Links House', player) connect_entrance(world, bomb_shop, 'Big Bomb Shop', player)
if bomb_shop in lw_entrances: if bomb_shop in lw_entrances:
lw_entrances.remove(bomb_shop) lw_entrances.remove(bomb_shop)
if bomb_shop in dw_entrances: if bomb_shop in dw_entrances:
@@ -763,7 +763,7 @@ def link_entrances(world, player):
bomb_shop_doors = [door for door in bomb_shop_doors if door in entrances] bomb_shop_doors = [door for door in bomb_shop_doors if door in entrances]
random.shuffle(bomb_shop_doors) random.shuffle(bomb_shop_doors)
bomb_shop = bomb_shop_doors.pop() bomb_shop = bomb_shop_doors.pop()
connect_entrance(world, bomb_shop, 'Big Bomb Shop' if not invFlag else 'Links House', player) connect_entrance(world, bomb_shop, 'Big Bomb Shop', player)
entrances.remove(bomb_shop) entrances.remove(bomb_shop)
# place the old man cave's entrance somewhere # place the old man cave's entrance somewhere
@@ -1293,7 +1293,7 @@ def link_entrances(world, player):
bomb_shop_doors = [door for door in bomb_shop_doors if door in doors] bomb_shop_doors = [door for door in bomb_shop_doors if door in doors]
random.shuffle(bomb_shop_doors) random.shuffle(bomb_shop_doors)
bomb_shop = bomb_shop_doors.pop() bomb_shop = bomb_shop_doors.pop()
connect_entrance(world, bomb_shop, 'Big Bomb Shop' if not invFlag else 'Links House', player) connect_entrance(world, bomb_shop, 'Big Bomb Shop', player)
exit_pool.remove(bomb_shop) exit_pool.remove(bomb_shop)
doors.remove(bomb_shop) doors.remove(bomb_shop)
@@ -2668,7 +2668,8 @@ open_mandatory_connections = [('Sanctuary S&Q', 'Sanctuary'),
('Other World S&Q', 'Pyramid Area')] ('Other World S&Q', 'Pyramid Area')]
inverted_mandatory_connections = [('Sanctuary S&Q', 'Dark Sanctuary Hint'), inverted_mandatory_connections = [('Sanctuary S&Q', 'Dark Sanctuary Hint'),
('Other World S&Q', 'Hyrule Castle Ledge')] ('Other World S&Q', 'Hyrule Castle Ledge'),
('Dark Sanctuary Hint Exit', 'Dark Chapel Area')]
# non-shuffled entrance links # non-shuffled entrance links
default_connections = [('Waterfall of Wishing', 'Waterfall of Wishing'), default_connections = [('Waterfall of Wishing', 'Waterfall of Wishing'),

View File

@@ -628,10 +628,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}) 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).items(): for _, path in dict(old_world.spoiler.paths).items():
if any(exit == 'Pyramid Fairy' for (_, exit) in path): 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))
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))
# we can finally output our playthrough # we can finally output our playthrough
old_world.spoiler.playthrough = OrderedDict([("0", [str(item) for item in world.precollected_items if item.advancement])]) old_world.spoiler.playthrough = OrderedDict([("0", [str(item) for item in world.precollected_items if item.advancement])])

View File

@@ -303,7 +303,7 @@ def create_regions(world, player):
create_cave_region(player, 'Cave Shop (Dark Death Mountain)', 'a common shop', ['Dark Death Mountain Shop - Left', 'Dark Death Mountain Shop - Middle', 'Dark Death Mountain Shop - Right']), create_cave_region(player, 'Cave Shop (Dark Death Mountain)', 'a common shop', ['Dark Death Mountain Shop - Left', 'Dark Death Mountain Shop - Middle', 'Dark Death Mountain Shop - Right']),
create_cave_region(player, 'Bumper Cave', 'a connector', None, ['Bumper Cave Exit (Bottom)', 'Bumper Cave Exit (Top)']), create_cave_region(player, 'Bumper Cave', 'a connector', None, ['Bumper Cave Exit (Bottom)', 'Bumper Cave Exit (Top)']),
create_cave_region(player, 'Fortune Teller (Dark)', 'a fortune teller'), create_cave_region(player, 'Fortune Teller (Dark)', 'a fortune teller'),
create_cave_region(player, 'Dark Sanctuary Hint', 'a storyteller'), create_cave_region(player, 'Dark Sanctuary Hint', 'a storyteller', None, ['Dark Sanctuary Hint Exit']),
create_cave_region(player, 'Dark World Potion Shop', 'a common shop', ['Dark Potion Shop - Left', 'Dark Potion Shop - Middle', 'Dark Potion Shop - Right']), create_cave_region(player, 'Dark World Potion Shop', 'a common shop', ['Dark Potion Shop - Left', 'Dark Potion Shop - Middle', 'Dark Potion Shop - Right']),
create_cave_region(player, 'Village of Outcasts Shop', 'a common shop', ['Village of Outcasts Shop - Left', 'Village of Outcasts Shop - Middle', 'Village of Outcasts Shop - Right']), create_cave_region(player, 'Village of Outcasts Shop', 'a common shop', ['Village of Outcasts Shop - Left', 'Village of Outcasts Shop - Middle', 'Village of Outcasts Shop - Right']),
create_cave_region(player, 'Chest Game', 'a game of 16 chests', ['Chest Game']), create_cave_region(player, 'Chest Game', 'a game of 16 chests', ['Chest Game']),