split building owg connections and setting the rules for those connections

This commit is contained in:
espeon65536
2021-08-31 14:47:57 -05:00
committed by Fabian Dill
parent 138c884684
commit 7972aa6320
3 changed files with 36 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
# ToDo: With shuffle_ganon option, prevent gtower from linking to an exit only location through a 2 entrance cave.
from collections import defaultdict
from worlds.alttp.OverworldGlitchRules import overworld_glitch_connections
from worlds.alttp.UnderworldGlitchRules import underworld_glitch_connections
def link_entrances(world, player):
@@ -1066,9 +1067,11 @@ def link_entrances(world, player):
raise NotImplementedError(
f'{world.shuffle[player]} Shuffling not supported yet. Player {world.get_player_name(player)}')
# mandatory hybrid major glitches connections
if world.logic[player] in ['hybridglitches', 'nologic']:
underworld_glitch_connections(world, player)
if world.logic[player] in ['owglitches', 'hybridglitches', 'nologic']:
overworld_glitch_connections(world, player)
# mandatory hybrid major glitches connections
if world.logic[player] in ['hybridglitches', 'nologic']:
underworld_glitch_connections(world, player)
# 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 Palace (Entrance)':