oran berry doesnt activate when mons is kill
This commit is contained in:
parent
52c63cd671
commit
fc510a6b44
1 changed files with 5 additions and 4 deletions
|
@ -4199,11 +4199,12 @@ enum
|
|||
// second argument is 1/X of current hp compared to max hp
|
||||
static bool32 HasEnoughHpToEatBerry(u32 battlerId, u32 hpFraction, u32 itemId)
|
||||
{
|
||||
if (gBattleMons[battlerId].hp == 0)
|
||||
return FALSE;
|
||||
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / hpFraction)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else if (hpFraction <= 4 && GetBattlerAbility(battlerId) == ABILITY_GLUTTONY && ItemId_GetPocket(itemId) == POCKET_BERRIES
|
||||
|
||||
if (hpFraction <= 4 && GetBattlerAbility(battlerId) == ABILITY_GLUTTONY && ItemId_GetPocket(itemId) == POCKET_BERRIES
|
||||
&& gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / 2)
|
||||
{
|
||||
RecordAbilityBattle(battlerId, ABILITY_GLUTTONY);
|
||||
|
|
Loading…
Reference in a new issue