Merge pull request #2212 from AsparagusEduardo/BE_healBallFix

Fixed Heal Ball not always healing caught Pokémon
This commit is contained in:
ghoulslash 2022-07-28 22:22:20 -04:00 committed by GitHub
commit 5a850b0b4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
{