Update src/battle_util.c

Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com>
This commit is contained in:
ghoulslash 2021-03-03 10:47:59 -07:00 committed by GitHub
parent 2ccdf1d89e
commit 64e3f7dc24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5172,6 +5172,7 @@ enum
bool32 HasEnoughHpToEatBerry(u32 battlerId, u32 hpFraction, u32 itemId)
{
bool32 isBerry = (ItemId_GetPocket(itemId) == POCKET_BERRIES);
if (gBattleMons[battlerId].hp == 0)
return FALSE;
// Unnerve prevents consumption of opponents' berries.
@ -8298,4 +8299,3 @@ static bool32 IsUnnerveAbilityOnOpposingSide(u8 battlerId)
return TRUE;
return FALSE;
}