Add enigma berry effect

This commit is contained in:
kittenchilly 2023-09-07 15:32:26 -05:00
parent dd3334aa82
commit b4db3b6a81
2 changed files with 10 additions and 0 deletions

View File

@ -7761,6 +7761,15 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
gBattleScripting.statChanger = SET_STATCHANGER(STAT_SPATK, 1, FALSE); gBattleScripting.statChanger = SET_STATCHANGER(STAT_SPATK, 1, FALSE);
} }
break; 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 case HOLD_EFFECT_JABOCA_BERRY: // consume and damage attacker if used physical move
if (IsBattlerAlive(battlerId) if (IsBattlerAlive(battlerId)
&& TARGET_TURN_DAMAGED && TARGET_TURN_DAMAGED

View File

@ -7630,6 +7630,7 @@ const struct Item gItems[] =
.itemId = ITEM_ENIGMA_BERRY, .itemId = ITEM_ENIGMA_BERRY,
.price = 20, .price = 20,
.holdEffect = HOLD_EFFECT_ENIGMA_BERRY, .holdEffect = HOLD_EFFECT_ENIGMA_BERRY,
.holdEffectParam = 25,
.description = sEnigmaBerryDesc, .description = sEnigmaBerryDesc,
.pocket = POCKET_BERRIES, .pocket = POCKET_BERRIES,
.type = ITEM_USE_BAG_MENU, .type = ITEM_USE_BAG_MENU,