diff options
| author | Pepper0ni <93387759+Pepper0ni@users.noreply.github.com> | 2024-08-18 00:10:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-17 16:10:11 -0700 |
| commit | 9c2e773ce4194c4c718cda7dbe70981c3e1e22ea (patch) | |
| tree | c6bb66306aa5b0fdcab31d055abcf236d06b2a99 /soh/src/code | |
| parent | d3edbcd0423682614d97c4ddef67e64702e5fa3b (diff) | |
Bombchu logic fixes, Add BetterBombchShopping enhancment and some adjacent cleanups (#3733)
* Initial Bombchu rework implementation
* Finish bombchus in logic overhaul
* address reviews
* Post resolution fixes
* fix git being dumb
* Readd Child Wallet To Bombchu Bowling Logic
* post merge fixes
* fix some oversights in bombchu shopping logic
* doesn't work, linker errors
* cleanup old reviews
* Make it build, likely broken by VB
* attempt to fix carpet man second purchse text
* commit to change branch
* mostly have carpet guy working
* badly fix carpet salesman
* fix better bombchu shopping
* fix bombchu drops
* remember you need bombchus in inventory to get drops
* Address reviews
* post-SCL clean up and redo the bombchu ammo logic to apply better to the spirit edge case
* fix oversight which could have allowed for bombchus to logical exist when they shouldn't
* Remove special bombchu playthrough checks which are causing bugs and no longer needed
* fix Slingshot logic reset
* Convert helpers I touched into CanUse and HasItem
* last cleanups
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_en_item00.c | 9 | ||||
| -rw-r--r-- | soh/src/code/z_parameter.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 8e30f462a..bca44cf26 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1454,6 +1454,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); } +// #region [Randomizer] [Enchancment] /** * Sometimes convert the given drop ID into a bombchu. * Returns the new drop type ID. @@ -1483,6 +1484,7 @@ s16 EnItem00_ConvertBombDropToBombchu(s16 dropId) { } } } +// #endregion /** * Converts a given drop type ID based on link's current age, health and owned items. @@ -1501,11 +1503,14 @@ s16 func_8001F404(s16 dropId) { } } - if ((CVarGetInteger(CVAR_ENHANCEMENT("BombchuDrops"), 0) || + // #region [Randomizer] [Enchancment] + if ((CVarGetInteger(CVAR_ENHANCEMENT("EnableBombchuDrops"), 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) && - (dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL)) { + (dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL) && + (!IS_RANDO || Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) || INV_CONTENT(ITEM_BOMB) != ITEM_NONE)) { dropId = EnItem00_ConvertBombDropToBombchu(dropId); } + // #endregion // This is convoluted but it seems like it must be a single condition to match // clang-format off diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 0cfde00b7..1ca58cf00 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -1870,7 +1870,7 @@ void Randomizer_GameplayStats_SetTimestamp(uint16_t item) { return; } // Count any bombchu pack as bombchus - if ((item >= RG_BOMBCHU_5 && item <= RG_BOMBCHU_DROP) || item == RG_PROGRESSIVE_BOMBCHUS) { + if ((item >= RG_BOMBCHU_5 && item <= RG_BOMBCHU_20) || item == RG_PROGRESSIVE_BOMBCHUS) { if (gSaveContext.sohStats.itemTimestamp[ITEM_BOMBCHU] = 0) { gSaveContext.sohStats.itemTimestamp[ITEM_BOMBCHU] = time; } |
