From 28a616dc700368a9d4ccc6301b1228d8838ea75e Mon Sep 17 00:00:00 2001 From: Pepper0ni <93387759+Pepper0ni@users.noreply.github.com> Date: Mon, 28 Jul 2025 12:12:47 +0100 Subject: [PATCH 1/2] Fix TOT_MASTER_SWORD when the master sword is stated with but not shuffled. --- soh/soh/Enhancements/randomizer/hook_handlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index bd267aebe..8db8b9d5e 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -881,7 +881,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l break; } case VB_GIVE_ITEM_MASTER_SWORD: - if (RAND_GET_OPTION(RSK_SHUFFLE_MASTER_SWORD)) { + if (RAND_GET_OPTION(RSK_SHUFFLE_MASTER_SWORD) || RAND_GET_OPTION(RSK_STARTING_MASTER_SWORD)) { *should = false; } else { *should = true; From 58a3a5d876a1a879b89616dd3903c161c36e56a2 Mon Sep 17 00:00:00 2001 From: Pepper0ni <93387759+Pepper0ni@users.noreply.github.com> Date: Mon, 28 Jul 2025 19:28:59 +0100 Subject: [PATCH 2/2] remove RC_MASTER_SWORD_PEDESTAL --- soh/soh/Enhancements/randomizer/context.cpp | 2 +- soh/soh/Enhancements/randomizer/randomizerTypes.h | 2 -- soh/soh/Enhancements/randomizer/settings.cpp | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/context.cpp b/soh/soh/Enhancements/randomizer/context.cpp index a0f7f223b..d321946ce 100644 --- a/soh/soh/Enhancements/randomizer/context.cpp +++ b/soh/soh/Enhancements/randomizer/context.cpp @@ -166,7 +166,7 @@ void Context::GenerateLocationPool() { // TODO: Exclude checks for some of the older shuffles from the pool too i.e. Frog Songs, Scrubs, etc.) if (location.GetRandomizerCheck() == RC_UNKNOWN_CHECK || location.GetRandomizerCheck() == RC_TRIFORCE_COMPLETED || // already in pool - (location.GetRandomizerCheck() == RC_MASTER_SWORD_PEDESTAL && + (location.GetRandomizerCheck() == RC_TOT_MASTER_SWORD && mOptions[RSK_SHUFFLE_MASTER_SWORD].Is(RO_GENERIC_OFF)) || (location.GetRandomizerCheck() == RC_KAK_100_GOLD_SKULLTULA_REWARD && mOptions[RSK_SHUFFLE_100_GS_REWARD].Is(RO_GENERIC_OFF)) || diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index d9eae0af8..63dbeb389 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -2609,7 +2609,6 @@ typedef enum { RC_PIERRE, RC_DELIVER_RUTOS_LETTER, - RC_MASTER_SWORD_PEDESTAL, RC_KF_DEKU_TREE_LEFT_GOSSIP_STONE, RC_KF_DEKU_TREE_RIGHT_GOSSIP_STONE, RC_KF_GOSSIP_STONE, @@ -4902,7 +4901,6 @@ typedef enum { RHT_GANONS_CASTLE_MQ_DEKU_SCRUB_RIGHT, RHT_GANONS_TOWER_BOSS_KEY_CHEST, RHT_DELIVER_RUTOS_LETTER, - RHT_MASTER_SWORD_PEDESTAL, // Beehives RHT_BEEHIVE_CHEST_GROTTO, RHT_BEEHIVE_COW_GROTTO, diff --git a/soh/soh/Enhancements/randomizer/settings.cpp b/soh/soh/Enhancements/randomizer/settings.cpp index a9f7b4e64..d2f93fe98 100644 --- a/soh/soh/Enhancements/randomizer/settings.cpp +++ b/soh/soh/Enhancements/randomizer/settings.cpp @@ -2571,7 +2571,7 @@ void Context::FinalizeSettings(const std::set& excludedLocation } if (!mOptions[RSK_SHUFFLE_MASTER_SWORD]) { if (mOptions[RSK_STARTING_MASTER_SWORD]) { - this->GetItemLocation(RC_MASTER_SWORD_PEDESTAL)->SetExcludedOption(1); + this->GetItemLocation(RC_TOT_MASTER_SWORD)->SetExcludedOption(1); } } if (!mOptions[RSK_SHUFFLE_OCARINA]) {