mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 15:00:13 -05:00
neither pocket nor gift should be listed in dungeonRewardLocations
This commit is contained in:
parent
d788eed2be
commit
f00c142fc9
@ -900,7 +900,6 @@ static void AssumedFill(const std::vector<RandomizerGet>& 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<uint32_t, 9> rDungeonRewardOverrides{};
|
||||
//quest item bit mask of each stone/medallion for the savefile
|
||||
// static constexpr std::array<uint32_t, 9> bitMaskTable = {
|
||||
// 0x00040000, //Kokiri Emerald
|
||||
@ -920,22 +919,20 @@ static void RandomizeDungeonRewards() {
|
||||
//get stones and medallions
|
||||
std::vector<RandomizerGet> 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
|
||||
|
@ -215,6 +215,7 @@ void Context::ItemReset() {
|
||||
GetItemLocation(il)->ResetVariables();
|
||||
}
|
||||
|
||||
GetItemLocation(RC_GIFT_FROM_RAURU)->ResetVariables();
|
||||
GetItemLocation(RC_LINKS_POCKET)->ResetVariables();
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,8 @@ std::multimap<std::tuple<s16, s16, s32>, RandomizerCheck> Rando::StaticData::Che
|
||||
|
||||
std::vector<RandomizerCheck> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user