From 64e3f7dc24987a89552f7b748d7f43e35b2497a5 Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Wed, 3 Mar 2021 10:47:59 -0700 Subject: [PATCH] Update src/battle_util.c Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com> --- src/battle_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index 3dd0dd92f1..f7def5b9a9 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -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; } -