diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index a80192689..9c2bff044 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -900,7 +900,6 @@ static void AssumedFill(const std::vector& items, const std::vect //setting, or randomize one dungeon reward to Link's Pocket if that setting is on static void RandomizeDungeonRewards() { auto ctx = Rando::Context::GetInstance(); - std::array rDungeonRewardOverrides{}; //quest item bit mask of each stone/medallion for the savefile // static constexpr std::array bitMaskTable = { // 0x00040000, //Kokiri Emerald @@ -920,22 +919,20 @@ static void RandomizeDungeonRewards() { //get stones and medallions std::vector rewards = FilterAndEraseFromPool(ItemPool, [](const auto i) {return Rando::StaticData::RetrieveItem(i).GetItemType() == ITEMTYPE_DUNGEONREWARD;}); - // If there are less than 9 dungeon rewards, prioritize actual dungeons for placement over Gift from Rauru - if (rewards.size() < 9) { - ctx->PlaceItemInLocation(RC_GIFT_FROM_RAURU, RG_GREEN_RUPEE); - } - if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_VANILLA) || ctx->GetOption(RSK_SHUFFLE_DUNGEON_REWARDS).Is(RO_DUNGEON_REWARDS_VANILLA)) { // Place dungeon rewards in vanilla locations for (RandomizerCheck loc : Rando::StaticData::dungeonRewardLocations) { ctx->GetItemLocation(loc)->PlaceVanillaItem(); } + ctx->GetItemLocation(RC_GIFT_FROM_RAURU)->PlaceVanillaItem(); } else { // Randomize dungeon rewards with assumed fill - AssumedFill(rewards, Rando::StaticData::dungeonRewardLocations); - } - - for (size_t i = 0; i < Rando::StaticData::dungeonRewardLocations.size(); i++) { - const auto index = ctx->GetItemLocation(Rando::StaticData::dungeonRewardLocations[i])->GetPlacedItem().GetItemID() - baseOffset; - rDungeonRewardOverrides[i] = index; + std::vector rewardLocations(Rando::StaticData::dungeonRewardLocations); + // If there are less than 9 dungeon rewards, prioritize actual dungeons for placement + if (rewards.size() < 9) { + ctx->PlaceItemInLocation(RC_LINKS_POCKET, RG_GREEN_RUPEE); + } else { + rewardLocations.push_back(RC_LINKS_POCKET); + } + AssumedFill(rewards, rewardLocations); } } else if (ctx->GetOption(RSK_LINKS_POCKET).Is(RO_LINKS_POCKET_DUNGEON_REWARD)) { //get 1 stone/medallion diff --git a/soh/soh/Enhancements/randomizer/context.cpp b/soh/soh/Enhancements/randomizer/context.cpp index 582b0fc7a..cd4914aaf 100644 --- a/soh/soh/Enhancements/randomizer/context.cpp +++ b/soh/soh/Enhancements/randomizer/context.cpp @@ -215,6 +215,7 @@ void Context::ItemReset() { GetItemLocation(il)->ResetVariables(); } + GetItemLocation(RC_GIFT_FROM_RAURU)->ResetVariables(); GetItemLocation(RC_LINKS_POCKET)->ResetVariables(); } diff --git a/soh/soh/Enhancements/randomizer/location_list.cpp b/soh/soh/Enhancements/randomizer/location_list.cpp index ae01858c3..1fe52b897 100644 --- a/soh/soh/Enhancements/randomizer/location_list.cpp +++ b/soh/soh/Enhancements/randomizer/location_list.cpp @@ -8,8 +8,8 @@ std::multimap, RandomizerCheck> Rando::StaticData::Che std::vector Rando::StaticData::dungeonRewardLocations = { // Bosses - RC_QUEEN_GOHMA, RC_KING_DODONGO, RC_BARINADE, RC_GIFT_FROM_RAURU, - RC_PHANTOM_GANON, RC_VOLVAGIA, RC_MORPHA, RC_TWINROVA, RC_BONGO_BONGO, + RC_QUEEN_GOHMA, RC_KING_DODONGO, RC_BARINADE, + RC_PHANTOM_GANON, RC_VOLVAGIA, RC_MORPHA, RC_TWINROVA, RC_BONGO_BONGO, }; using namespace Rando;