From 70e1e7a28be3e02f026249d9cdfca1b01bd0c23d Mon Sep 17 00:00:00 2001 From: codemann8 Date: Thu, 17 Aug 2023 07:05:38 -0500 Subject: [PATCH] Fixed Swapped ER so that remaining cave placements in mandatory exits cannot choose vanilla --- docs/presets/Swapkeys.yaml | 22 ++++++++++++++++++++++ docs/presets/swapkeys.yml | 17 +++++++++++++++++ docs/vanilla_multi_lobbies.yaml | 28 ++++++++++++++++++++++++++++ source/overworld/EntranceShuffle2.py | 9 ++++++--- 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 docs/presets/Swapkeys.yaml create mode 100644 docs/presets/swapkeys.yml create mode 100644 docs/vanilla_multi_lobbies.yaml diff --git a/docs/presets/Swapkeys.yaml b/docs/presets/Swapkeys.yaml new file mode 100644 index 00000000..20b7e88b --- /dev/null +++ b/docs/presets/Swapkeys.yaml @@ -0,0 +1,22 @@ +meta: + branch: OWR + seed_name: Swapkeys + seed_notes: Crosskeys but Swapped ER +settings: + 1: + mode: open + logic: noglitches + goal: crystals + crystals_gt: "7" + crystals_ganon: "7" + accessibility: locations + mapshuffle: 1 + compassshuffle: 1 + keyshuffle: wild + bigkeyshuffle: 1 + shuffle: swapped + shuffleganon: 1 + shufflelinks: 0 + shuffletavern: 1 + experimental: 0 + hints: 0 diff --git a/docs/presets/swapkeys.yml b/docs/presets/swapkeys.yml new file mode 100644 index 00000000..e71e4521 --- /dev/null +++ b/docs/presets/swapkeys.yml @@ -0,0 +1,17 @@ +settings: + 1: + description: Swapkeys + glitches_required: none + mode: open + goal: crystals + crystals_gt: "7" + crystals_ganon: "7" + weapons: randomized + accessibility: locations + entrance_shuffle: swapped + shufflelinks: off + shuffletavern: on + mapshuffle: on + compassshuffle: on + keyshuffle: wild + bigkeyshuffle: on diff --git a/docs/vanilla_multi_lobbies.yaml b/docs/vanilla_multi_lobbies.yaml new file mode 100644 index 00000000..06eaf835 --- /dev/null +++ b/docs/vanilla_multi_lobbies.yaml @@ -0,0 +1,28 @@ +doors: + 1: + lobbies: + #Agahnims Tower: Tower Lobby S + Desert Back: Desert Back Lobby S + Desert East: Desert East Lobby S + Desert South: Desert Main Lobby S + Desert West: Desert West S + #Eastern: Eastern Lobby S + #Ganons Tower: GT Lobby S + #Hera: Hera Lobby S + Hyrule Castle East: Hyrule Castle East Lobby S + Hyrule Castle South: Hyrule Castle Lobby S + Hyrule Castle West: Hyrule Castle West Lobby S + #Ice: Ice Lobby SE + #Mire: Mire Lobby S + #Palace of Darkness: PoD Lobby S + #Sanctuary: Sanctuary S + #Skull 1: Skull 1 Lobby S + #Skull 2 East: Skull 2 East Lobby SW + #Skull 2 West: Skull 2 West Lobby S + #Skull 3: Skull 3 Lobby SW + #Swamp: Swamp Lobby S + #Thieves Town: Thieves Lobby S + Turtle Rock Chest: TR Big Chest Entrance SE + Turtle Rock Eye Bridge: TR Eye Bridge SW + Turtle Rock Lazy Eyes: TR Lazy Eyes SE + Turtle Rock Main: TR Main Lobby SE diff --git a/source/overworld/EntranceShuffle2.py b/source/overworld/EntranceShuffle2.py index 6ab63f0c..87bcdf1d 100644 --- a/source/overworld/EntranceShuffle2.py +++ b/source/overworld/EntranceShuffle2.py @@ -1379,7 +1379,8 @@ def do_mandatory_connections(avail, entrances, cave_options, must_exit): entrances.remove(swap_ent) if len(cave) == 2: entrance = next(e for e in entrances[::-1] if e not in invalid_connections[exit] - and e not in invalid_cave_connections[tuple(cave)] and e not in must_exit) + and e not in invalid_cave_connections[tuple(cave)] and e not in must_exit + and (not avail.swapped or rnd_cave[0] != combine_map[e])) entrances.remove(entrance) connect_two_way(entrance, rnd_cave[0], avail) if avail.swapped and combine_map[entrance] != rnd_cave[0]: @@ -1398,7 +1399,8 @@ def do_mandatory_connections(avail, entrances, cave_options, must_exit): entrance = avail.world.get_entrance(cave_exit, avail.player).parent_region.entrances[0].name cave_entrances.append(entrance) else: - entrance = next(e for e in entrances[::-1] if e not in invalid_connections[exit] and e not in must_exit) + entrance = next(e for e in entrances[::-1] if e not in invalid_connections[exit] and e not in must_exit + and (not avail.swapped or cave_exit != combine_map[e])) cave_entrances.append(entrance) entrances.remove(entrance) connect_two_way(entrance, cave_exit, avail) @@ -1428,7 +1430,8 @@ def do_mandatory_connections(avail, entrances, cave_options, must_exit): if avail.swapped and cave_exit not in avail.exits: continue else: - entrance = next(e for e in entrances[::-1] if e not in invalid_cave_connections[tuple(cave)]) + entrance = next(e for e in entrances[::-1] if e not in invalid_cave_connections[tuple(cave)] + and (not avail.swapped or cave_exit != combine_map[e])) invalid_cave_connections[tuple(cave)] = set() entrances.remove(entrance) connect_two_way(entrance, cave_exit, avail)