From 7146143058fcf358580947cc3c1339af098587f8 Mon Sep 17 00:00:00 2001 From: Jordan Longstaff Date: Tue, 13 Oct 2026 09:39:15 -0400 Subject: [PATCH] Bombchu Bowling ammo changeable during minigame (#7350) --- .../Enhancements/Minigames/BombchuBowling.cpp | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/soh/soh/Enhancements/Minigames/BombchuBowling.cpp b/soh/soh/Enhancements/Minigames/BombchuBowling.cpp index 8ce959e02c..84f08b146e 100644 --- a/soh/soh/Enhancements/Minigames/BombchuBowling.cpp +++ b/soh/soh/Enhancements/Minigames/BombchuBowling.cpp @@ -88,11 +88,22 @@ static void RegisterBombchuBowlingNoBigCucco() { } static void RegisterBombchuBowlingAmmo() { - COND_VB_SHOULD(VB_SET_BOMBCHU_BOWLING_AMMO, - CVAR_BOWLING_VALUE && (CVAR_BOWLING_AMMO_VALUE != CUCCO_BOWLING_AMMO_DEFAULT), { - gPlayState->bombchuBowlingStatus = CVAR_BOWLING_AMMO_VALUE; - *should = false; - }); + static s32 prevAmmoValue = CUCCO_BOWLING_AMMO_DEFAULT; + s32 nextAmmoValue = CVAR_BOWLING_VALUE ? CVAR_BOWLING_AMMO_VALUE : CUCCO_BOWLING_AMMO_DEFAULT; + + if ((prevAmmoValue != nextAmmoValue) && (gPlayState->bombchuBowlingStatus > 0)) { + gPlayState->bombchuBowlingStatus += nextAmmoValue - prevAmmoValue; + if (gPlayState->bombchuBowlingStatus <= 0) { + gPlayState->bombchuBowlingStatus = -1; + } + prevAmmoValue = nextAmmoValue; + } + + COND_VB_SHOULD(VB_SET_BOMBCHU_BOWLING_AMMO, nextAmmoValue != CUCCO_BOWLING_AMMO_DEFAULT, { + prevAmmoValue = CVAR_BOWLING_AMMO_VALUE; + gPlayState->bombchuBowlingStatus = prevAmmoValue; + *should = false; + }); } static void RegisterBombchuBowlingFirstPrize() {