diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index 458bfa188..289c0b157 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -564,7 +564,7 @@ const std::vector s6PresetEntries = { PRESET_ENTRY_S32("gRandomizeRainbowBridge", 3), PRESET_ENTRY_S32("gRandomizeShuffleAdultTrade", 1), PRESET_ENTRY_S32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON), - PRESET_ENTRY_S32("gRandomizeShuffleGanonBossKey", 2), + PRESET_ENTRY_S32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_STARTWITH), PRESET_ENTRY_S32("gRandomizeShuffleKokiriSword", 1), PRESET_ENTRY_S32("gRandomizeSkipChildStealth", 1), PRESET_ENTRY_S32("gRandomizeSkipChildZelda", 1), @@ -608,7 +608,7 @@ const std::vector hellModePresetEntries = { PRESET_ENTRY_S32("gRandomizeShuffleCows", 1), PRESET_ENTRY_S32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_ANYWHERE), PRESET_ENTRY_S32("gRandomizeShuffleFrogSongRupees", 1), - PRESET_ENTRY_S32("gRandomizeShuffleGanonBossKey", 10), + PRESET_ENTRY_S32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_LACS_DUNGEONS), PRESET_ENTRY_S32("gRandomizeShuffleGerudoToken", 1), PRESET_ENTRY_S32("gRandomizeShuffleKeyRings", 1), PRESET_ENTRY_S32("gRandomizeShuffleKokiriSword", 1), diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 95a148abc..d40740d5c 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -1922,7 +1922,9 @@ GetItemID Randomizer::GetItemIdFromRandomizerGet(RandomizerGet randoGet, GetItem return (GetItemID)randoGet; } case RG_GANONS_CASTLE_BOSS_KEY: - if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) < 3) { + if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_VANILLA || + GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_OWN_DUNGEON || + GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_STARTWITH) { return GI_KEY_BOSS; } else { return (GetItemID)randoGet; @@ -2133,10 +2135,12 @@ bool Randomizer::IsItemVanilla(RandomizerGet randoGet) { } return true; case RG_GANONS_CASTLE_BOSS_KEY: - if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) > 2) { - return false; + if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_VANILLA || + GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_OWN_DUNGEON || + GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_STARTWITH) { + return true; } - return true; + return false; case RG_DEKU_TREE_COMPASS: case RG_DODONGOS_CAVERN_COMPASS: case RG_JABU_JABUS_BELLY_COMPASS: @@ -2623,7 +2627,7 @@ void GenerateRandomizerImgui() { cvarSettings[RSK_KEYRINGS_GTG] = CVar_GetS32("gRandomizeShuffleKeyRingsGTG", 0); cvarSettings[RSK_KEYRINGS_GANONS_CASTLE] = CVar_GetS32("gRandomizeShuffleKeyRingsGanonsCastle", 0); cvarSettings[RSK_BOSS_KEYSANITY] = CVar_GetS32("gRandomizeBossKeysanity", 2); - cvarSettings[RSK_GANONS_BOSS_KEY] = CVar_GetS32("gRandomizeShuffleGanonBossKey", 1); + cvarSettings[RSK_GANONS_BOSS_KEY] = CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA); cvarSettings[RSK_LACS_STONE_COUNT] = CVar_GetS32("gRandomizeLacsStoneCount", 3); cvarSettings[RSK_LACS_MEDALLION_COUNT] = CVar_GetS32("gRandomizeLacsMedallionCount", 6); cvarSettings[RSK_LACS_REWARD_COUNT] = CVar_GetS32("gRandomizeLacsRewardCount", 9); @@ -3484,7 +3488,7 @@ void DrawRandoEditor(bool& open) { ); UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, 12, RO_GANON_BOSS_KEY_VANILLA); ImGui::PopItemWidth(); - switch (CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_OWN_DUNGEON)) { + switch (CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA)) { case RO_GANON_BOSS_KEY_LACS_MEDALLIONS: ImGui::Dummy(ImVec2(0.0f, 0.0f)); UIWidgets::EnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount", diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp index 482cf728d..6574ac7a4 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp @@ -917,7 +917,7 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() { ((locationIt.rcType != RCTYPE_SMALL_KEY) || CVar_GetS32("gRandomizeKeysanity", 0) != 1) && // 1 is the value for "vanilla" small keys ((locationIt.rcType != RCTYPE_GF_KEY) || CVar_GetS32("randoShuffleGerudoFortressKeys", 0) != 0) && // 0 is the value for "vanilla" gf keys ((locationIt.rcType != RCTYPE_BOSS_KEY) || CVar_GetS32("gRandomizeBossKeysanity", 0) != 1) && // 1 is the value for "vanilla" boss keys - ((locationIt.rcType != RCTYPE_GANON_BOSS_KEY) || CVar_GetS32("gRandomizeShuffleGanonBossKey", 0) != 0) // 0 is the value for "vanilla" ganon's boss key + ((locationIt.rcType != RCTYPE_GANON_BOSS_KEY) || CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_VANILLA) ); } } diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 01befbad2..a9ce0a9a5 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -1190,7 +1190,9 @@ namespace GameMenuBar { if (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_KEYSANITY) > 2 || OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GERUDO_KEYS) > 0 || OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BOSS_KEYSANITY) > 2 || - OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) > 2 || + (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_VANILLA && + OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_OWN_DUNGEON && + OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_STARTWITH) || !gSaveContext.n64ddFlag) { disableKeyColors = false; } diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 8282fef01..b08f9cee4 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -343,27 +343,27 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(PlayState* play, RandomizerCheck u8 meetsRequirements = 0; switch (Randomizer_GetSettingValue(RSK_GANONS_BOSS_KEY)) { - case 7: + case RO_GANON_BOSS_KEY_LACS_MEDALLIONS: if (CheckMedallionCount() >= Randomizer_GetSettingValue(RSK_LACS_MEDALLION_COUNT)) { meetsRequirements = true; } break; - case 8: + case RO_GANON_BOSS_KEY_LACS_STONES: if (CheckStoneCount() >= Randomizer_GetSettingValue(RSK_LACS_STONE_COUNT)) { meetsRequirements = true; } break; - case 9: + case RO_GANON_BOSS_KEY_LACS_REWARDS: if ((CheckMedallionCount() + CheckStoneCount()) >= Randomizer_GetSettingValue(RSK_LACS_REWARD_COUNT)) { meetsRequirements = true; } break; - case 10: + case RO_GANON_BOSS_KEY_LACS_DUNGEONS: if (CheckDungeonCount() >= Randomizer_GetSettingValue(RSK_LACS_DUNGEON_COUNT)) { meetsRequirements = true; } break; - case 11: + case RO_GANON_BOSS_KEY_LACS_TOKENS: if (gSaveContext.inventory.gsTokens >= Randomizer_GetSettingValue(RSK_LACS_TOKEN_COUNT)) { meetsRequirements = true; } diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index bf3718d50..a6168a957 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -503,8 +503,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { gSaveContext.inventory.dungeonItems[SCENE_HAKADAN] |= 1; // Shadow } - // "Start with" == 2 for Ganon's Boss Key - if(Randomizer_GetSettingValue(RSK_GANONS_BOSS_KEY) == 2) { + if(Randomizer_GetSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_STARTWITH) { gSaveContext.inventory.dungeonItems[SCENE_GANON] |= 1; }