From f5a8b563d9510f0777a890c0aad10018b845d55e Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 7 Jan 2025 14:45:02 -0700 Subject: [PATCH] fix: key logic issue with decoupled doors --- CHANGELOG.md | 17 +++++++++++++++++ KeyDoorShuffle.py | 7 ++++++- Main.py | 2 +- RELEASENOTES.md | 19 ++----------------- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1bd83c8..3c9f2520 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,23 @@ Changelog archive +* 1.4.7.2 + - Fixed an issue with shuffle_ganon/fix_gtower_exit causing a generation failure + - More HMG fixes by Muffins +* 1.4.7.1 + - Fixed an issue with the repaired "beemizer" setting not being backwards compatible +* 1.4.7 + - Fixed generation error with Big Key in starting inventory (thanks Cody!) + - HMG/NL logic fixes by Muffins + - Enemizer: Disabled Walking Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway) + - Enemizer: Fixed an issue with enemizer bush sprites + - Enemizer: Banned new Mimics from being the randomized bush sprite due to crash + - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons (was intended, bug prevented the logic skip) + - Logic error with enemizer and standard should use new enemy logic rules + - Fixed a bug with the inconsistent treatment of the beemizer setting + - Fixed an issue with returning Blacksmith in Simple shuffle (when blacksmith is at Link's House) + - Fixed an issue with dark sanctuary spawn at tavern north door (thanks Codemann!) + - Various enemy bans for the last few months * 1.4.6 - Restores original Sanc & Quit behavior, if Aga1 is not dead, then no quick pyramid warp - Fixed problem with Lite/Lean shuffling some fairy caves unnecessarily diff --git a/KeyDoorShuffle.py b/KeyDoorShuffle.py index 5331ad4c..0508e35d 100644 --- a/KeyDoorShuffle.py +++ b/KeyDoorShuffle.py @@ -814,7 +814,12 @@ def key_wasted(new_door, old_door, old_counter, new_counter, key_layout, world, def find_next_counter(new_door, old_counter, key_layout, prize_flag=None): - proposed_doors = {**old_counter.open_doors, **dict.fromkeys([new_door, new_door.dest])} + prop_doors = next((item_or_tuple for item_or_tuple in key_layout.proposal + if new_door == item_or_tuple or (isinstance(item_or_tuple, tuple) and new_door in item_or_tuple)), None) + if prop_doors: + proposed_doors = {**old_counter.open_doors, **dict.fromkeys([prop_doors])} + else: + proposed_doors = {**old_counter.open_doors} bk_open = old_counter.big_key_opened or new_door.bigKey prize_flag = prize_flag if prize_flag else old_counter.prize_doors_opened return find_counter(proposed_doors, bk_open, key_layout, prize_flag) diff --git a/Main.py b/Main.py index a36d34e7..3614c00b 100644 --- a/Main.py +++ b/Main.py @@ -38,7 +38,7 @@ from source.enemizer.DamageTables import DamageTable from source.enemizer.Enemizer import randomize_enemies from source.rom.DataTables import init_data_tables -version_number = '1.4.7.2' +version_number = '1.4.8' version_branch = '-u' __version__ = f'{version_number}{version_branch}' diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 602fb94d..b800687c 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,19 +1,4 @@ # Patch Notes -* 1.4.7.2 - - Fixed an issue with shuffle_ganon/fix_gtower_exit causing a generation failure - - More HMG fixes by Muffins -* 1.4.7.1 - - Fixed an issue with the repaired "beemizer" setting not being backwards compatible -* 1.4.7 - - Fixed generation error with Big Key in starting inventory (thanks Cody!) - - HMG/NL logic fixes by Muffins - - Enemizer: Disabled Walking Zora in the UW due to crash with Swamola (they ignore a lot of collison anyway) - - Enemizer: Fixed an issue with enemizer bush sprites - - Enemizer: Banned new Mimics from being the randomized bush sprite due to crash - - "Beatable" or "accessibility: none" can now use randomized trap doors to seal off entire parts of dungeons (was intended, bug prevented the logic skip) - - Logic error with enemizer and standard should use new enemy logic rules - - Fixed a bug with the inconsistent treatment of the beemizer setting - - Fixed an issue with returning Blacksmith in Simple shuffle (when blacksmith is at Link's House) - - Fixed an issue with dark sanctuary spawn at tavern north door (thanks Codemann!) - - Various enemy bans for the last few months +* 1.4.8 + - Fixed a key logic bug with decoupled doors when a big key door leads to a small key door (the small key door was missing appropriate logic)