Reduce mandatory exits for OWG logic to only those that cannot be reached by glitches
This commit is contained in:
parent
2199f18f16
commit
ca1740121e
|
@ -1910,9 +1910,7 @@ 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[player] == 'inverted':
|
||||
invalid_connections = Inverted_Must_Exit_Invalid_Connections.copy()
|
||||
|
@ -1920,6 +1918,18 @@ def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
|||
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[player] == 'inverted':
|
||||
for entrance in invalid_connections:
|
||||
|
|
|
@ -92,6 +92,37 @@ def get_superbunny_accessible_locations():
|
|||
yield location
|
||||
|
||||
|
||||
def get_non_mandatory_exits(inverted):
|
||||
"""
|
||||
Entrances that can be reached with full equipment using overworld glitches and don't need to be an exit.
|
||||
The following are still be mandatory exits:
|
||||
|
||||
Open:
|
||||
Turtle Rock Isolated Ledge Entrance
|
||||
Skull Woods Second Section Door (West) (or Skull Woods Final Section)
|
||||
|
||||
Inverted:
|
||||
Two Brothers House (West)
|
||||
Desert Palace Entrance (East)
|
||||
"""
|
||||
|
||||
yield 'Bumper Cave (Top)'
|
||||
yield 'Death Mountain Return Cave (West)'
|
||||
yield 'Hookshot Cave Back Entrance'
|
||||
|
||||
if inverted:
|
||||
yield 'Desert Palace Entrance (North)'
|
||||
yield 'Desert Palace Entrance (West)'
|
||||
yield 'Inverted Ganons Tower'
|
||||
yield 'Hyrule Castle Entrance (West)'
|
||||
yield 'Hyrule Castle Entrance (East)'
|
||||
else:
|
||||
yield 'Dark Death Mountain Ledge (West)'
|
||||
yield 'Dark Death Mountain Ledge (East)'
|
||||
yield 'Mimic Cave'
|
||||
yield 'Desert Palace Entrance (East)'
|
||||
|
||||
|
||||
def get_boots_clip_exits_lw(inverted = False):
|
||||
"""
|
||||
Special Light World region exits that require boots clips.
|
||||
|
|
Loading…
Reference in New Issue