mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Add enigma berry effect
This commit is contained in:
parent
dd3334aa82
commit
b4db3b6a81
@ -7761,6 +7761,15 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
gBattleScripting.statChanger = SET_STATCHANGER(STAT_SPATK, 1, FALSE);
|
||||
}
|
||||
break;
|
||||
case HOLD_EFFECT_ENIGMA_BERRY: // consume and heal if hit by super effective move
|
||||
if (IsBattlerAlive(battlerId)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& gMoveResultFlags & MOVE_RESULT_SUPER_EFFECTIVE)
|
||||
{
|
||||
effect = ItemHealHp(battlerId, gLastUsedItem, TRUE, TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
case HOLD_EFFECT_JABOCA_BERRY: // consume and damage attacker if used physical move
|
||||
if (IsBattlerAlive(battlerId)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
|
@ -7630,6 +7630,7 @@ const struct Item gItems[] =
|
||||
.itemId = ITEM_ENIGMA_BERRY,
|
||||
.price = 20,
|
||||
.holdEffect = HOLD_EFFECT_ENIGMA_BERRY,
|
||||
.holdEffectParam = 25,
|
||||
.description = sEnigmaBerryDesc,
|
||||
.pocket = POCKET_BERRIES,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
|
Loading…
Reference in New Issue
Block a user