diff options
| author | Christopher Leggett <chris@leggett.dev> | 2025-12-04 15:14:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-04 15:14:32 +0000 |
| commit | 7e829a078048700f0746b73cc681353f4934e147 (patch) | |
| tree | 0841ff0eba94e089ec6d60384030382eb4e56f2c /soh/src/code | |
| parent | 098cb7046059445c3dcfb2ff9e568a858f3384a1 (diff) | |
Add in Progressive Bombchu Bags (#5836)
* Adds new Progressive Bombchu Bags option
Also changes existing code to account for Bombchu Bags becoming
a drop down with 3 values instead of a checkbox
* Handle the new lower capacities for ammo refills
* Handle what happens when receiving a bombchu bag
* Remove the trick name of Progressive Bombchu Bag
Since, you know, that's an actual thing now.
* Implements Bombchu Bag handling next to Progressive Bombchu Handling
* clang-formatting
* Add extra bag for plentiful items
* Address review comment
* Move bombchu upgrade level to gSaveContext and add save/load
* Use logic's saveContext for correct logic calculations
* Remove RG_PROGRESSIVE_BOMBCHU
* Fix Bombchu Refill obtainability
* Don't add normal chus to the pool if chu bags are on.
* cmake-format
* Properly reset bombchuUpgradeLevel on savefile init
* Fix error with va_arg on linux
* Fixes small error in the Bombchu Bag description
* Fix bug with bombchu obtainability
* clang-format
* Fix infinite bombchu text
* fix clang-format
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_en_item00.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_parameter.c | 20 |
2 files changed, 14 insertions, 8 deletions
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 28459ba5e..7fc89ee83 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1259,7 +1259,7 @@ void EnItem00_CustomItemsParticles(Actor* Parent, PlayState* play, GetItemEntry case RG_DOUBLE_DEFENSE: colorIndex = PARTICLE_WHITE; break; - case RG_PROGRESSIVE_BOMBCHUS: + case RG_PROGRESSIVE_BOMBCHU_BAG: colorIndex = PARTICLE_DARK_BLUE; break; case RG_BOTTLE_WITH_FAIRY: diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 84cea3264..3b1d91f05 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2211,8 +2211,10 @@ u8 Item_Give(PlayState* play, u8 item) { AMMO(ITEM_BOMBCHU) = 10; } else { AMMO(ITEM_BOMBCHU) += 10; - if (AMMO(ITEM_BOMBCHU) > 50) { - AMMO(ITEM_BOMBCHU) = 50; + if (GameInteractor_Should(VB_CHECK_BOMBCHU_CAPACITY, true)) { + if (AMMO(ITEM_BOMBCHU) > 50) { + AMMO(ITEM_BOMBCHU) = 50; + } } } return Return_Item(item, MOD_NONE, ITEM_NONE); @@ -2222,8 +2224,10 @@ u8 Item_Give(PlayState* play, u8 item) { AMMO(ITEM_BOMBCHU) += sAmmoRefillCounts[item - ITEM_BOMBCHUS_5 + 8]; } else { AMMO(ITEM_BOMBCHU) += sAmmoRefillCounts[item - ITEM_BOMBCHUS_5 + 8]; - if (AMMO(ITEM_BOMBCHU) > 50) { - AMMO(ITEM_BOMBCHU) = 50; + if (GameInteractor_Should(VB_CHECK_BOMBCHU_CAPACITY, true)) { + if (AMMO(ITEM_BOMBCHU) > 50) { + AMMO(ITEM_BOMBCHU) = 50; + } } } return Return_Item(item, MOD_NONE, ITEM_NONE); @@ -2996,8 +3000,10 @@ void Inventory_ChangeAmmo(s16 item, s16 ammoChange) { } else if (item == ITEM_BOMBCHU) { AMMO(ITEM_BOMBCHU) += ammoChange; - if (AMMO(ITEM_BOMBCHU) >= 50) { - AMMO(ITEM_BOMBCHU) = 50; + if (GameInteractor_Should(VB_CHECK_BOMBCHU_CAPACITY, true)) { + if (AMMO(ITEM_BOMBCHU) > 50) { + AMMO(ITEM_BOMBCHU) = 50; + } } else if (AMMO(ITEM_BOMBCHU) < 0) { AMMO(ITEM_BOMBCHU) = 0; } @@ -4908,7 +4914,7 @@ void Interface_DrawAmmoCount(PlayState* play, s16 button, s16 alpha) { ((i == ITEM_SLINGSHOT) && (AMMO(i) == CUR_CAPACITY(UPG_BULLET_BAG))) || ((i == ITEM_STICK) && (AMMO(i) == CUR_CAPACITY(UPG_STICKS))) || ((i == ITEM_NUT) && (AMMO(i) == CUR_CAPACITY(UPG_NUTS))) || ((i == ITEM_BOMBCHU) && (ammo == 50)) || - ((i == ITEM_BEAN) && (ammo == 15))) { + ((i == ITEM_BEAN) && (ammo == 15)) || GameInteractor_Should(VB_COLOR_AMMO_GREEN, false, i)) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 255, 0, alpha); } |
