From 8d18fc0dd8e5a3a79dbd8c20c94107d23e787c2b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 25 Jul 2022 08:54:03 -0400 Subject: [PATCH] =?UTF-8?q?Fixed=20Heal=20Ball=20not=20always=20healing=20?= =?UTF-8?q?caught=20Pok=C3=A9mon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/battle_script_commands.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index cabe013aff..ba576a36a6 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -13853,6 +13853,16 @@ static void Cmd_handleballthrow(void) gBattleCommunication[MULTISTRING_CHOOSER] = 0; else gBattleCommunication[MULTISTRING_CHOOSER] = 1; + + #ifdef ITEM_EXPANSION + if (gLastUsedItem == ITEM_HEAL_BALL) + { + MonRestorePP(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]]); + HealStatusConditions(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], gBattlerPartyIndexes[gBattlerTarget], STATUS1_ANY, gBattlerTarget); + gBattleMons[gBattlerTarget].hp = gBattleMons[gBattlerTarget].maxHP; + SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_HP, &gBattleMons[gBattlerTarget].hp); + } + #endif } else // mon may be caught, calculate shakes {