diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 77fa151e2..ce80e4661 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -6526,6 +6526,9 @@ GetItemHeldEffect: and a ret z + cp SITRUS_BERRY + jr z, .SitrusBerry + push hl ld hl, ItemAttributes + ITEMATTR_EFFECT dec a @@ -6540,6 +6543,30 @@ GetItemHeldEffect: pop hl ret +.SitrusBerry: +; copy of GetMaxHP then GetQuarterMaxHP + push hl +; get which max HP is to be used +; at the point of healing, the battle turn +; has already switched, so use the opposite +; MaxHP variables... + ld hl, wEnemyMonMaxHP + ldh a, [hBattleTurn] + and a + jr z, .got_max_hp + ld hl, wBattleMonMaxHP +.got_max_hp + inc hl + ld a, [hl] + pop hl + ld c, a +; quarter result + srl c + srl c +; fixed effect + ld b, HELD_BERRY + ret + AnimateCurrentMoveEitherSide: push hl push de