Merging DR v0.4 - OWG logic/keylogic//YAML
This commit is contained in:
@@ -59,7 +59,9 @@ def link_entrances(world, player):
|
||||
|
||||
if world.mode[player] == 'standard':
|
||||
# rest of hyrule castle must be in light world, so it has to be the one connected to east exit of desert
|
||||
connect_mandatory_exits(world, lw_entrances, [('Hyrule Castle Exit (West)', 'Hyrule Castle Exit (East)')], list(LW_Dungeon_Entrances_Must_Exit), player)
|
||||
hyrule_castle_exits = [('Hyrule Castle Exit (West)', 'Hyrule Castle Exit (East)')]
|
||||
connect_mandatory_exits(world, lw_entrances, hyrule_castle_exits, list(LW_Dungeon_Entrances_Must_Exit), player)
|
||||
connect_caves(world, lw_entrances, [], hyrule_castle_exits, player)
|
||||
elif world.doorShuffle[player] != 'vanilla':
|
||||
# sanc is in light world, so must all of HC if door shuffle is on
|
||||
connect_mandatory_exits(world, lw_entrances,
|
||||
@@ -1759,7 +1761,7 @@ def link_inverted_entrances(world, player):
|
||||
raise NotImplementedError('Shuffling not supported yet')
|
||||
|
||||
# check for swamp palace fix
|
||||
if world.get_entrance('Dam', player).connected_region.name != 'Dam' or world.get_entrance('Swamp Palace', player).connected_region.name != 'Swamp Lobby':
|
||||
if world.get_entrance('Dam', player).connected_region.name != 'Dam' or world.get_entrance('Swamp Palace', player).connected_region.name != 'Swamp Portal':
|
||||
world.swamp_patch_required[player] = True
|
||||
|
||||
# check for potion shop location
|
||||
@@ -1933,20 +1935,30 @@ def connect_random(world, exitlist, targetlist, player, two_way=False):
|
||||
|
||||
|
||||
def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
||||
"""This works inplace"""
|
||||
random.shuffle(entrances)
|
||||
random.shuffle(caves)
|
||||
|
||||
# Keeps track of entrances that cannot be used to access each exit / cave
|
||||
if world.mode == 'inverted':
|
||||
if world.mode[player] == 'inverted':
|
||||
invalid_connections = Inverted_Must_Exit_Invalid_Connections.copy()
|
||||
else:
|
||||
invalid_connections = Must_Exit_Invalid_Connections.copy()
|
||||
invalid_cave_connections = defaultdict(set)
|
||||
|
||||
if world.logic[player] in ['owglitches', 'nologic']:
|
||||
import OverworldGlitchRules
|
||||
for entrance in OverworldGlitchRules.get_non_mandatory_exits(world.mode[player] == 'inverted'):
|
||||
invalid_connections[entrance] = set()
|
||||
if entrance in must_be_exits:
|
||||
must_be_exits.remove(entrance)
|
||||
entrances.append(entrance)
|
||||
|
||||
"""This works inplace"""
|
||||
random.shuffle(entrances)
|
||||
random.shuffle(caves)
|
||||
|
||||
# Handle inverted Aga Tower - if it depends on connections, then so does Hyrule Castle Ledge
|
||||
if world.mode == 'inverted':
|
||||
if world.mode[player] == 'inverted':
|
||||
for entrance in invalid_connections:
|
||||
if world.get_entrance(entrance, player).connected_region == world.get_region('Inverted Agahnims Tower', player):
|
||||
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)'})
|
||||
break
|
||||
@@ -2950,6 +2962,7 @@ mandatory_connections = [('Links House S&Q', 'Links House'),
|
||||
('Fairy Ascension Cave Climb', 'Fairy Ascension Cave (Top)'),
|
||||
('Fairy Ascension Cave Pots', 'Fairy Ascension Cave (Bottom)'),
|
||||
('Fairy Ascension Cave Drop', 'Fairy Ascension Cave (Drop)'),
|
||||
('Superbunny Cave Climb', 'Superbunny Cave (Top)'),
|
||||
('Ganon Drop', 'Bottom of Pyramid')
|
||||
]
|
||||
|
||||
@@ -2962,6 +2975,8 @@ inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'),
|
||||
('Lake Hylia Warp', 'Northeast Light World'),
|
||||
('Northeast Light World Warp', 'Light World'),
|
||||
('Zoras River', 'Zoras River'),
|
||||
('Waterfall of Wishing Cave', 'Waterfall of Wishing Cave'),
|
||||
('Northeast Light World Return', 'Northeast Light World'),
|
||||
('Kings Grave Outer Rocks', 'Kings Grave Area'),
|
||||
('Kings Grave Inner Rocks', 'Light World'),
|
||||
('Kakariko Well (top to bottom)', 'Kakariko Well (bottom)'),
|
||||
@@ -2998,6 +3013,8 @@ inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'),
|
||||
('Dark Lake Hylia Teleporter', 'Dark Lake Hylia'),
|
||||
('Dark Lake Hylia Ledge Pier', 'Dark Lake Hylia Ledge'),
|
||||
('Dark Lake Hylia Ledge Drop', 'Dark Lake Hylia'),
|
||||
('Ice Palace Missing Wall', 'Dark Lake Hylia Central Island'),
|
||||
('Dark Lake Hylia Shallows', 'Dark Lake Hylia'),
|
||||
('East Dark World Pier', 'East Dark World'),
|
||||
('South Dark World Bridge', 'South Dark World'),
|
||||
('East Dark World Bridge', 'East Dark World'),
|
||||
@@ -3011,6 +3028,8 @@ inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'),
|
||||
('West Dark World Gap', 'West Dark World'),
|
||||
('East Dark World Broken Bridge Pass', 'East Dark World'),
|
||||
('Northeast Dark World Broken Bridge Pass', 'Northeast Dark World'),
|
||||
('Catfish Exit Rock', 'Northeast Dark World'),
|
||||
('Catfish Entrance Rock', 'Catfish'),
|
||||
('Bumper Cave Entrance Rock', 'Bumper Cave Entrance'),
|
||||
('Bumper Cave Entrance Drop', 'West Dark World'),
|
||||
('Bumper Cave Ledge Drop', 'West Dark World'),
|
||||
@@ -3049,6 +3068,7 @@ inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'),
|
||||
('Mimic Cave Ledge Drop', 'East Death Mountain (Bottom)'),
|
||||
('Turtle Rock Tail Drop', 'Turtle Rock (Top)'),
|
||||
('Turtle Rock Drop', 'Dark Death Mountain'),
|
||||
('Superbunny Cave Climb', 'Superbunny Cave (Top)'),
|
||||
('Desert Ledge Drop', 'Light World'),
|
||||
('Floating Island Drop', 'Dark Death Mountain'),
|
||||
('Dark Lake Hylia Central Island Teleporter', 'Lake Hylia Central Island'),
|
||||
@@ -3064,7 +3084,7 @@ inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'),
|
||||
('Desert Palace Stairs Mirror Spot', 'Dark Desert'),
|
||||
('Desert Palace North Mirror Spot', 'Dark Desert'),
|
||||
('Maze Race Mirror Spot', 'West Dark World'),
|
||||
('Lake Hylia Central Island Mirror Spot', 'Dark Lake Hylia'),
|
||||
('Lake Hylia Central Island Mirror Spot', 'Dark Lake Hylia Central Island'),
|
||||
('Hammer Peg Area Mirror Spot', 'Hammer Peg Area'),
|
||||
('Bumper Cave Ledge Mirror Spot', 'Bumper Cave Ledge'),
|
||||
('Bumper Cave Entrance Mirror Spot', 'Bumper Cave Entrance'),
|
||||
@@ -3080,7 +3100,7 @@ inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'),
|
||||
('West Dark World Mirror Spot', 'West Dark World'),
|
||||
('South Dark World Mirror Spot', 'South Dark World'),
|
||||
('Potion Shop Mirror Spot', 'Northeast Dark World'),
|
||||
('Northeast Dark World Mirror Spot', 'Northeast Dark World'),
|
||||
('Catfish Mirror Spot', 'Catfish'),
|
||||
('Shopping Mall Mirror Spot', 'Dark Lake Hylia Ledge'),
|
||||
('Skull Woods Mirror Spot', 'Skull Woods Forest (West)'),
|
||||
('DDM Flute', 'The Sky'),
|
||||
@@ -3243,10 +3263,10 @@ default_connections = [('Waterfall of Wishing', 'Waterfall of Wishing'),
|
||||
('Dark Desert Fairy', 'Dark Desert Healer Fairy'),
|
||||
('Spike Cave', 'Spike Cave'),
|
||||
('Hookshot Cave', 'Hookshot Cave'),
|
||||
('Superbunny Cave (Top)', 'Superbunny Cave'),
|
||||
('Superbunny Cave (Top)', 'Superbunny Cave (Top)'),
|
||||
('Cave Shop (Dark Death Mountain)', 'Cave Shop (Dark Death Mountain)'),
|
||||
('Dark Death Mountain Fairy', 'Dark Death Mountain Healer Fairy'),
|
||||
('Superbunny Cave (Bottom)', 'Superbunny Cave'),
|
||||
('Superbunny Cave (Bottom)', 'Superbunny Cave (Bottom)'),
|
||||
('Superbunny Cave Exit (Top)', 'Dark Death Mountain (Top East)'),
|
||||
('Superbunny Cave Exit (Bottom)', 'Dark Death Mountain (East Bottom)'),
|
||||
('Hookshot Cave Exit (South)', 'Dark Death Mountain (Top East)'),
|
||||
@@ -3377,9 +3397,9 @@ inverted_default_connections = [('Waterfall of Wishing', 'Waterfall of Wishing'
|
||||
('Dark Desert Fairy', 'Dark Desert Healer Fairy'),
|
||||
('Spike Cave', 'Spike Cave'),
|
||||
('Hookshot Cave', 'Hookshot Cave'),
|
||||
('Superbunny Cave (Top)', 'Superbunny Cave'),
|
||||
('Superbunny Cave (Top)', 'Superbunny Cave (Top)'),
|
||||
('Cave Shop (Dark Death Mountain)', 'Cave Shop (Dark Death Mountain)'),
|
||||
('Superbunny Cave (Bottom)', 'Superbunny Cave'),
|
||||
('Superbunny Cave (Bottom)', 'Superbunny Cave (Bottom)'),
|
||||
('Superbunny Cave Exit (Bottom)', 'Dark Death Mountain (East Bottom)'),
|
||||
('Hookshot Cave Exit (North)', 'Death Mountain Floating Island (Dark World)'),
|
||||
('Hookshot Cave Back Entrance', 'Hookshot Cave'),
|
||||
|
||||
Reference in New Issue
Block a user