diff --git a/soh/include/functions.h b/soh/include/functions.h index 7854b9835..894987f8c 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -1532,6 +1532,8 @@ void Play_Main(GameState* thisx); u8 CheckStoneCount(); u8 CheckMedallionCount(); u8 CheckDungeonCount(); +u8 CheckBridgeRewardCount(); +u8 CheckLACSRewardCount(); s32 Play_InCsMode(PlayState* play); f32 func_800BFCB8(PlayState* play, MtxF* mf, Vec3f* vec); void* Play_LoadFile(PlayState* play, RomFile* file); diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index bf1b621b8..1a17368a9 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -272,6 +272,7 @@ const std::vector randomizerCvars = { "gRandomizeBlueFireArrows", "gRandomizeBombchusInLogic", "gRandomizeBossKeysanity", + "gRandomizeBridgeRewardOptions", "gRandomizeCompleteMaskQuest", "gRandomizeCuccosToReturn", "gRandomizeDampeHint", @@ -298,6 +299,7 @@ const std::vector randomizerCvars = { "gRandomizeLacsDungeonCount", "gRandomizeLacsMedallionCount", "gRandomizeLacsRewardCount", + "gRandomizeLacsRewardOptions", "gRandomizeLacsStoneCount", "gRandomizeLacsTokenCount", "gRandomizeLAHint", diff --git a/soh/soh/Enhancements/randomizer/3drando/keys.hpp b/soh/soh/Enhancements/randomizer/3drando/keys.hpp index 29f5f32fa..38011b8b8 100644 --- a/soh/soh/Enhancements/randomizer/3drando/keys.hpp +++ b/soh/soh/Enhancements/randomizer/3drando/keys.hpp @@ -1783,8 +1783,8 @@ typedef enum { GANON_BK_SKULLTULA_HINT, LACS_VANILLA_HINT, - LACS_MEDALLIONS_HINT, LACS_STONES_HINT, + LACS_MEDALLIONS_HINT, LACS_REWARDS_HINT, LACS_DUNGEONS_HINT, LACS_TOKENS_HINT, diff --git a/soh/soh/Enhancements/randomizer/3drando/logic.cpp b/soh/soh/Enhancements/randomizer/3drando/logic.cpp index 9eb219cf1..533060eb7 100644 --- a/soh/soh/Enhancements/randomizer/3drando/logic.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/logic.cpp @@ -122,6 +122,7 @@ namespace Logic { //Greg bool Greg = false; + bool GregInLogic = false; //Progressive Items uint8_t ProgressiveBulletBag = 0; @@ -292,8 +293,8 @@ namespace Logic { bool CanUseMagicArrow = false; //Bridge and LACS Requirements - uint8_t MedallionCount = 0; uint8_t StoneCount = 0; + uint8_t MedallionCount = 0; uint8_t DungeonCount = 0; bool HasAllStones = false; bool HasAllMedallions = false; @@ -778,21 +779,22 @@ namespace Logic { DungeonCount = (DekuTreeClear ? 1:0) + (DodongosCavernClear ? 1:0) + (JabuJabusBellyClear ? 1:0) + (ForestTempleClear ? 1:0) + (FireTempleClear ? 1:0) + (WaterTempleClear ? 1:0) + (SpiritTempleClear ? 1:0) + (ShadowTempleClear ? 1:0); HasAllStones = StoneCount == 3; HasAllMedallions = MedallionCount == 6; + GregInLogic = BridgeRewardOptions.Is(BRIDGE_OPTION_GREG) || LACSRewardOptions.Is(LACS_OPTION_GREG); CanBuildRainbowBridge = Bridge.Is(RAINBOWBRIDGE_OPEN) || (Bridge.Is(RAINBOWBRIDGE_VANILLA) && ShadowMedallion && SpiritMedallion && LightArrows) || - (Bridge.Is(RAINBOWBRIDGE_STONES) && StoneCount >= BridgeStoneCount.Value()) || - (Bridge.Is(RAINBOWBRIDGE_MEDALLIONS) && MedallionCount >= BridgeMedallionCount.Value()) || - (Bridge.Is(RAINBOWBRIDGE_REWARDS) && StoneCount + MedallionCount >= BridgeRewardCount.Value()) || - (Bridge.Is(RAINBOWBRIDGE_DUNGEONS) && DungeonCount >= BridgeDungeonCount.Value()) || + (Bridge.Is(RAINBOWBRIDGE_STONES) && StoneCount + (Greg && GregInLogic ? 1 : 0) >= BridgeStoneCount.Value()) || + (Bridge.Is(RAINBOWBRIDGE_MEDALLIONS) && MedallionCount + (Greg && GregInLogic ? 1 : 0) >= BridgeMedallionCount.Value()) || + (Bridge.Is(RAINBOWBRIDGE_REWARDS) && StoneCount + MedallionCount + (Greg && GregInLogic ? 1 : 0) >= BridgeRewardCount.Value()) || + (Bridge.Is(RAINBOWBRIDGE_DUNGEONS) && DungeonCount + (Greg && GregInLogic ? 1 : 0) >= BridgeDungeonCount.Value()) || (Bridge.Is(RAINBOWBRIDGE_TOKENS) && GoldSkulltulaTokens >= BridgeTokenCount.Value()) || (Bridge.Is(RAINBOWBRIDGE_GREG) && Greg); CanTriggerLACS = (LACSCondition == LACSCONDITION_VANILLA && ShadowMedallion && SpiritMedallion) || - (LACSCondition == LACSCONDITION_STONES && StoneCount >= LACSStoneCount.Value()) || - (LACSCondition == LACSCONDITION_MEDALLIONS && MedallionCount >= LACSMedallionCount.Value()) || - (LACSCondition == LACSCONDITION_REWARDS && StoneCount + MedallionCount >= LACSRewardCount.Value()) || - (LACSCondition == LACSCONDITION_DUNGEONS && DungeonCount >= LACSDungeonCount.Value()) || + (LACSCondition == LACSCONDITION_STONES && StoneCount + (Greg && GregInLogic ? 1 : 0) >= LACSStoneCount.Value()) || + (LACSCondition == LACSCONDITION_MEDALLIONS && MedallionCount + (Greg && GregInLogic ? 1 : 0) >= LACSMedallionCount.Value()) || + (LACSCondition == LACSCONDITION_REWARDS && StoneCount + MedallionCount + (Greg && GregInLogic ? 1 : 0) >= LACSRewardCount.Value()) || + (LACSCondition == LACSCONDITION_DUNGEONS && DungeonCount + (Greg && GregInLogic ? 1 : 0) >= LACSDungeonCount.Value()) || (LACSCondition == LACSCONDITION_TOKENS && GoldSkulltulaTokens >= LACSTokenCount.Value()); } diff --git a/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp b/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp index 0a9a3b411..f1fc714d2 100644 --- a/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.cpp @@ -125,6 +125,10 @@ string_view bridgeDungeonCountDesc = "Set the number of completed dungeons re "spawn the Rainbow Bridge."; // string_view bridgeTokenCountDesc = "Set the number of Gold Skulltula Tokens required\n" "to spawn the Rainbow Bridge."; // +string_view bridgeRewardOptionsDesc = "Set whether the rewards are standard, if Greg\n" + "counts as a reward and considered for logic\n" + "or if Greg becomes a wildcard, counting as a reward but\n" + "not considered in logic."; // /*------------------------------ // | RANDOM GANONS TRIALS | // ------------------------------*/ // @@ -601,10 +605,10 @@ string_view ganonKey100GS = "Ganon's Castle Boss Key is given to you /*------------------------------ // | LACS CONDITIONS | // ------------------------------*/ // -string_view lacsMedallionCountDesc = "Set the number of Medallions required to trigger\n" - "the Light Arrow Cutscene."; // string_view lacsStoneCountDesc = "Set the number of Spiritual Stones required to\n" // "trigger the Light Arrow Cutscene."; // +string_view lacsMedallionCountDesc = "Set the number of Medallions required to trigger\n" + "the Light Arrow Cutscene."; // string_view lacsRewardCountDesc = "Set the number of Dungeon Rewards (Spiritual\n" // "Stones and Medallions) required to trigger the\n" // "Light Arrow Cutscene."; // @@ -615,6 +619,10 @@ string_view lacsDungeonCountDesc = "Set the number of completed dungeons re "into the blue warp at the end of them."; // string_view lacsTokenCountDesc = "Set the number of Gold Skulltula Tokens required\n" "to trigger the Light Arrow Cutscene."; // +string_view lacsRewardOptionsDesc = "Set whether the rewards are standard, if Greg\n" + "counts as a reward and considered for logic\n" + "or if Greg becomes a wildcard, counting as a reward but\n" + "not considered in logic."; // /*------------------------------ // | SKIP CHILD STEALTH | // ------------------------------*/ // diff --git a/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp b/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp index e50584578..c0c34c773 100644 --- a/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp +++ b/soh/soh/Enhancements/randomizer/3drando/setting_descriptions.hpp @@ -48,6 +48,8 @@ extern string_view bridgeRewardCountDesc; extern string_view bridgeDungeonCountDesc; extern string_view bridgeTokenCountDesc; +extern string_view bridgeRewardOptionsDesc; + extern string_view randomGanonsTrialsDesc; extern string_view ganonsTrialCountDesc; @@ -195,12 +197,14 @@ extern string_view ganonKeyAnywhere; extern string_view ganonKeyLACS; extern string_view ganonKey100GS; -extern string_view lacsMedallionCountDesc; extern string_view lacsStoneCountDesc; +extern string_view lacsMedallionCountDesc; extern string_view lacsRewardCountDesc; extern string_view lacsDungeonCountDesc; extern string_view lacsTokenCountDesc; +extern string_view lacsRewardOptionsDesc; + extern string_view childStealthDesc; extern string_view skipTowerEscapeDesc; diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.cpp b/soh/soh/Enhancements/randomizer/3drando/settings.cpp index b2a1217b2..cbbc7ba6d 100644 --- a/soh/soh/Enhancements/randomizer/3drando/settings.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/settings.cpp @@ -60,11 +60,12 @@ namespace Settings { Option ZorasFountain = Option::U8 ("Zora's Fountain", {"Closed", "Closed as child", "Open"}, {fountainNormal, fountainAdult, fountainOpen}); Option GerudoFortress = Option::U8 ("Gerudo Fortress", {"Normal", "Fast", "Open"}, {gerudoNormal, gerudoFast, gerudoOpen}); Option Bridge = Option::U8 ("Rainbow Bridge", {"Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens", "Greg"}, {bridgeVanilla, bridgeOpen, bridgeStones, bridgeMedallions, bridgeRewards, bridgeDungeons, bridgeTokens, bridgeGreg}, OptionCategory::Setting, RAINBOWBRIDGE_VANILLA); - Option BridgeStoneCount = Option::U8 ("Stone Count", {NumOpts(0, 3)}, {bridgeStoneCountDesc}, OptionCategory::Setting, 1, true); - Option BridgeMedallionCount= Option::U8 ("Medallion Count", {NumOpts(0, 6)}, {bridgeMedallionCountDesc}, OptionCategory::Setting, 1, true); - Option BridgeRewardCount = Option::U8 ("Reward Count", {NumOpts(0, 9)}, {bridgeRewardCountDesc}, OptionCategory::Setting, 1, true); - Option BridgeDungeonCount = Option::U8 ("Dungeon Count", {NumOpts(0, 8)}, {bridgeDungeonCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeStoneCount = Option::U8 ("Stone Count", {NumOpts(0, 4)}, {bridgeStoneCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeMedallionCount= Option::U8 ("Medallion Count", {NumOpts(0, 7)}, {bridgeMedallionCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeRewardCount = Option::U8 ("Reward Count", {NumOpts(0, 10)}, {bridgeRewardCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeDungeonCount = Option::U8 ("Dungeon Count", {NumOpts(0, 9)}, {bridgeDungeonCountDesc}, OptionCategory::Setting, 1, true); Option BridgeTokenCount = Option::U8 ("Token Count", {NumOpts(0, 100)}, {bridgeTokenCountDesc}, OptionCategory::Setting, 1, true); + Option BridgeRewardOptions = Option::U8 ("Bridge Reward Options", {"Standard Rewards", "Greg as Reward", "Greg as Wildcard"}, {bridgeRewardOptionsDesc}); Option RandomGanonsTrials = Option::Bool("Random Ganon's Trials", {"Off", "On"}, {randomGanonsTrialsDesc}, OptionCategory::Setting, ON); Option GanonsTrialsCount = Option::U8 ("Trial Count", {NumOpts(0, 6)}, {ganonsTrialCountDesc}, OptionCategory::Setting, 1, true); std::vector