From da749e4a11ff9dbe34874a0d6faf7d86df2edafb Mon Sep 17 00:00:00 2001 From: codemann8 Date: Fri, 22 Mar 2024 05:24:10 -0500 Subject: [PATCH] Fix generation issues in HMG --- Main.py | 8 ++++---- Rules.py | 2 +- UnderworldGlitchRules.py | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Main.py b/Main.py index 010a5798..1d32b778 100644 --- a/Main.py +++ b/Main.py @@ -598,10 +598,10 @@ def copy_world(world): update_world_regions(ret, player) if world.logic[player] in ('owglitches', 'hybridglitches', 'nologic'): create_owg_connections(ret, player) - if world.logic[player] in ('nologic', 'hybridglitches'): - create_hybridmajor_connections(ret, player) create_dynamic_exits(ret, player) create_dungeon_regions(ret, player) + if world.logic[player] in ('nologic', 'hybridglitches'): + create_hybridmajor_connections(ret, player) create_owedges(ret, player) create_shops(ret, player) #create_doors(ret, player) @@ -795,10 +795,10 @@ def copy_world_premature(world, player): update_world_regions(ret, player) if world.logic[player] in ('owglitches', 'hybridglitches', 'nologic'): create_owg_connections(ret, player) - if world.logic[player] in ('nologic', 'hybridglitches'): - create_hybridmajor_connections(ret, player) create_dynamic_exits(ret, player) create_dungeon_regions(ret, player) + if world.logic[player] in ('nologic', 'hybridglitches'): + create_hybridmajor_connections(ret, player) create_owedges(ret, player) create_shops(ret, player) create_doors(ret, player) diff --git a/Rules.py b/Rules.py index 8184c3e6..c7a9d706 100644 --- a/Rules.py +++ b/Rules.py @@ -846,7 +846,7 @@ def global_rules(world, player): add_key_logic_rules(world, player) - if world.logic[player] == 'hybridglitches': + if world.logic[player] == 'hybridglitches' and not world.is_copied_world: add_hmg_key_logic_rules(world, player) # End of door rando rules. diff --git a/UnderworldGlitchRules.py b/UnderworldGlitchRules.py index c01e242f..7510b138 100644 --- a/UnderworldGlitchRules.py +++ b/UnderworldGlitchRules.py @@ -66,6 +66,7 @@ def create_hybridmajor_connectors(world, player): specrock_connectors, ]: new_connectors = [(connector[0], connector[1], world.get_entrance(connector[2], player).connected_region) for connector in connectors] + new_connectors = [c for c in new_connectors if c[2] is not None] create_no_logic_connections(player, world, new_connectors)