diff options
| author | Christopher Leggett <chris@leggett.dev> | 2026-07-24 12:26:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-24 16:26:52 +0000 |
| commit | 44909ab230d80a35067e1acf86ae60f2482edd44 (patch) | |
| tree | f3bdc365a0608f2a61239895a17547f8dd40d600 | |
| parent | 3c565ed6e626c8b905793a781ba78a9ed59b93cb (diff) | |
Rando: Adds Bombchu Refills to junk pool if drops are on (#6949)
Also lock junk chus behind bombchu bags being on
Exclude RG_BOMBCHUS_20 from junk pool for balancing
| -rw-r--r-- | soh/soh/Enhancements/randomizer/3drando/item_pool.cpp | 14 | ||||
| -rw-r--r-- | soh/soh/Enhancements/randomizer/draw.cpp | 13 | ||||
| -rw-r--r-- | soh/soh/Enhancements/randomizer/draw.h | 1 | ||||
| -rw-r--r-- | soh/soh/Enhancements/randomizer/item_list.cpp | 1 |
4 files changed, 10 insertions, 19 deletions
diff --git a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp index 1b01143b5..d98b893a8 100644 --- a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp @@ -6,6 +6,7 @@ #include "../SeedContext.h" #include "../rng.h" #include "soh/Enhancements/randomizer/Traps.h" +#include "soh/Enhancements/randomizer/randomizerTypes.h" #include <algorithm> #include <spdlog/spdlog.h> @@ -13,10 +14,7 @@ std::vector<RandomizerGet> itemPool = {}; std::vector<RandomizerGet> lesserPool = {}; std::vector<RandomizerGet> plentifulPool = {}; std::vector<RandomizerGet> junkPool = {}; -const std::array<RandomizerGet, 13> JunkPoolItems = { - RG_BOMBS_5, RG_BOMBS_10, RG_BOMBS_20, RG_DEKU_NUTS_5, RG_DEKU_STICK_1, RG_DEKU_SEEDS_30, RG_RECOVERY_HEART, - RG_ARROWS_5, RG_ARROWS_10, RG_ARROWS_30, RG_BLUE_RUPEE, RG_RED_RUPEE, RG_DEKU_NUTS_10, -}; +std::vector<RandomizerGet> JunkPoolItems = {}; // RANDOTODO should probably check the same thing as check matches contents at some point const std::map<RandomizerGet, std::vector<RandomizerGet>*> poolForItem = { { RG_BOMBS_5, &junkPool }, { RG_BOMBS_10, &junkPool }, { RG_BOMBS_20, &junkPool }, @@ -153,6 +151,14 @@ void GenerateItemPool() { plentifulPool.clear(); lesserPool.clear(); int reservedSlots = 0; + JunkPoolItems = { RG_BOMBS_5, RG_BOMBS_10, RG_BOMBS_20, RG_DEKU_NUTS_5, RG_DEKU_STICK_1, + RG_DEKU_SEEDS_30, RG_RECOVERY_HEART, RG_ARROWS_5, RG_ARROWS_10, RG_ARROWS_30, + RG_BLUE_RUPEE, RG_RED_RUPEE, RG_DEKU_NUTS_10 }; + if (ctx->GetOption(RSK_ENABLE_BOMBCHU_DROPS).Is(RO_GENERIC_ON) && + ctx->GetOption(RSK_BOMBCHU_BAG).IsNot(RO_BOMBCHU_BAG_NONE)) { + JunkPoolItems.emplace_back(RG_BOMBCHU_5); + JunkPoolItems.emplace_back(RG_BOMBCHU_10); + } // clang-format off // Items the player can start with are removed from the pool so a started copy isn't also shuffled. diff --git a/soh/soh/Enhancements/randomizer/draw.cpp b/soh/soh/Enhancements/randomizer/draw.cpp index 541813726..e9ce2b561 100644 --- a/soh/soh/Enhancements/randomizer/draw.cpp +++ b/soh/soh/Enhancements/randomizer/draw.cpp @@ -1285,19 +1285,6 @@ extern "C" void Randomizer_DrawBombchuBag(PlayState* play, GetItemEntry* getItem CLOSE_DISPS(play->state.gfxCtx); } -extern "C" void Randomizer_DrawBombchuBagInLogic(PlayState* play, GetItemEntry* getItemEntry) { - if (IS_RANDO && OTRGlobals::Instance->gRandoContext->GetOption(RSK_BOMBCHU_BAG).IsNot(RO_BOMBCHU_BAG_NONE)) { - Randomizer_DrawBombchuBag(play, getItemEntry); - } else { - OPEN_DISPS(play->state.gfxCtx); - Gfx_SetupDL_26Opa(play->state.gfxCtx); - gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), - G_MTX_MODELVIEW | G_MTX_LOAD); - gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gGiBombchuDL); - CLOSE_DISPS(play->state.gfxCtx); - } -} - extern "C" void Randomizer_DrawOverworldKey(PlayState* play, GetItemEntry* getItemEntry) { OPEN_DISPS(play->state.gfxCtx); diff --git a/soh/soh/Enhancements/randomizer/draw.h b/soh/soh/Enhancements/randomizer/draw.h index d674f562f..dcb308051 100644 --- a/soh/soh/Enhancements/randomizer/draw.h +++ b/soh/soh/Enhancements/randomizer/draw.h @@ -30,7 +30,6 @@ void Randomizer_DrawOpenChest(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawFishingPoleGI(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawSkeletonKey(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawMysteryItem(PlayState* play, GetItemEntry* getItemEntry); -void Randomizer_DrawBombchuBagInLogic(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawBombchuBag(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawOverworldKey(PlayState* play, GetItemEntry* getItemEntry); void Randomizer_DrawRocsFeather(PlayState* play, GetItemEntry* getItemEntry); diff --git a/soh/soh/Enhancements/randomizer/item_list.cpp b/soh/soh/Enhancements/randomizer/item_list.cpp index 39663d611..3208c77cb 100644 --- a/soh/soh/Enhancements/randomizer/item_list.cpp +++ b/soh/soh/Enhancements/randomizer/item_list.cpp @@ -271,7 +271,6 @@ void Rando::StaticData::InitItemTable() { itemTable[RG_BOMBCHU_5] = Item(RG_BOMBCHU_5, Text{ "Bombchus (5)", "Missiles (5)", "Krabbelminen (5)" }, ITEMTYPE_REFILL, GI_BOMBCHUS_5, true, LOGIC_BOMBCHUS, RHT_BOMBCHUS_5, ITEM_BOMBCHUS_5, OBJECT_GI_BOMB_2, GID_BOMBCHU, 0x33, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE); itemTable[RG_BOMBCHU_10] = Item(RG_BOMBCHU_10, Text{ "Bombchus (10)", "Missiles (10)", "Krabbelminen (10)" }, ITEMTYPE_REFILL, GI_BOMBCHUS_10, true, LOGIC_BOMBCHUS, RHT_BOMBCHUS_10, ITEM_BOMBCHU, OBJECT_GI_BOMB_2, GID_BOMBCHU, 0x33, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE); itemTable[RG_BOMBCHU_20] = Item(RG_BOMBCHU_20, Text{ "Bombchus (20)", "Missiles (20)", "Krabbelminen (20)" }, ITEMTYPE_REFILL, GI_BOMBCHUS_20, true, LOGIC_BOMBCHUS, RHT_BOMBCHUS_20, ITEM_BOMBCHUS_20, OBJECT_GI_BOMB_2, GID_BOMBCHU, 0x33, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE); - itemTable[RG_BOMBCHU_20].SetCustomDrawFunc(Randomizer_DrawBombchuBagInLogic); itemTable[RG_ARROWS_5] = Item(RG_ARROWS_5, Text{ "Arrows (5)", "Flèches (5)", "Pfeile (5)" }, ITEMTYPE_REFILL, GI_ARROWS_SMALL, false, LOGIC_NONE, RHT_ARROWS_5, ITEM_ARROWS_SMALL, OBJECT_GI_ARROW, GID_ARROWS_SMALL, 0xE6, 0x48, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE); itemTable[RG_ARROWS_10] = Item(RG_ARROWS_10, Text{ "Arrows (10)", "Flèches (10)", "Pfeile (10)" }, ITEMTYPE_REFILL, GI_ARROWS_MEDIUM, false, LOGIC_NONE, RHT_ARROWS_10, ITEM_ARROWS_MEDIUM, OBJECT_GI_ARROW, GID_ARROWS_MEDIUM, 0xE6, 0x49, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE); itemTable[RG_ARROWS_30] = Item(RG_ARROWS_30, Text{ "Arrows (30)", "Flèches (30)", "Pfeile (30)" }, ITEMTYPE_REFILL, GI_ARROWS_LARGE, false, LOGIC_NONE, RHT_ARROWS_30, ITEM_ARROWS_LARGE, OBJECT_GI_ARROW, GID_ARROWS_LARGE, 0xE6, 0x4A, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE); |
