Consolidated some logic for Vanilla/Dungeon ER

This commit is contained in:
codemann8
2021-07-11 14:45:27 -05:00
parent ab0625e413
commit 8ca7189dc1

View File

@@ -28,45 +28,29 @@ def link_entrances(world, player):
connect_custom(world, player) connect_custom(world, player)
# if we do not shuffle, set default connections # if we do not shuffle, set default connections
if world.shuffle[player] == 'vanilla': if world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
for exitname, regionname in default_connections: for exitname, regionname in default_connections:
connect_simple(world, exitname, regionname, player) connect_simple(world, exitname, regionname, player)
if world.shuffle[player] == 'vanilla':
for exitname, regionname in default_dungeon_connections: for exitname, regionname in default_dungeon_connections:
connect_simple(world, exitname, regionname, player) connect_simple(world, exitname, regionname, player)
if not invFlag: if not invFlag:
for exitname, regionname in open_default_connections: for exitname, regionname in open_default_connections:
connect_simple(world, exitname, regionname, player) connect_simple(world, exitname, regionname, player)
if world.shuffle[player] == 'vanilla':
for exitname, regionname in open_default_dungeon_connections: for exitname, regionname in open_default_dungeon_connections:
connect_simple(world, exitname, regionname, player) connect_simple(world, exitname, regionname, player)
else: else:
for exitname, regionname in inverted_default_connections: for exitname, regionname in inverted_default_connections:
connect_simple(world, exitname, regionname, player) connect_simple(world, exitname, regionname, player)
if world.shuffle[player] == 'vanilla':
for exitname, regionname in inverted_default_dungeon_connections: for exitname, regionname in inverted_default_dungeon_connections:
connect_simple(world, exitname, regionname, player) connect_simple(world, exitname, regionname, player)
elif world.shuffle[player] == 'dungeonssimple':
for exitname, regionname in default_connections:
connect_simple(world, exitname, regionname, player)
if not invFlag:
for exitname, regionname in open_default_connections:
connect_simple(world, exitname, regionname, player)
else:
for exitname, regionname in inverted_default_connections:
connect_simple(world, exitname, regionname, player)
if world.shuffle[player] == 'dungeonssimple':
simple_shuffle_dungeons(world, player) simple_shuffle_dungeons(world, player)
elif world.shuffle[player] == 'dungeonsfull': elif world.shuffle[player] == 'dungeonsfull':
for exitname, regionname in default_connections:
connect_simple(world, exitname, regionname, player)
if not invFlag:
for exitname, regionname in open_default_connections:
connect_simple(world, exitname, regionname, player)
else:
for exitname, regionname in inverted_default_connections:
connect_simple(world, exitname, regionname, player)
skull_woods_shuffle(world, player) skull_woods_shuffle(world, player)
dungeon_exits = list(Dungeon_Exits) dungeon_exits = list(Dungeon_Exits)