diff options
Diffstat (limited to 'engine/items')
| -rw-r--r-- | engine/items/item_effects.asm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 162e79a7..98f1b066 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2058,7 +2058,7 @@ ItemUsePPRestore: cp MAX_ETHER jr z, .fullyRestorePP ld a, [hl] ; move PP - and %00111111 ; lower 6 bit bits store current PP + and PP_MASK cp b ; does current PP equal max PP? ret z ; if so, return add 10 ; increase current PP by 10 @@ -2071,7 +2071,7 @@ ItemUsePPRestore: ld b, a .storeNewAmount ld a, [hl] ; move PP - and %11000000 ; PP Up counter bits + and PP_UP_MASK add b ld [hl], a ret @@ -2403,7 +2403,7 @@ RestoreBonusPP: jr nz, .nextMove .skipMenuItemIDCheck ld a, [hl] - and %11000000 ; have any PP Ups been used? + and PP_UP_MASK call nz, AddBonusPP ; if so, add bonus PP .nextMove inc hl @@ -2509,7 +2509,7 @@ GetMaxPP: .addPPOffset add hl, bc ld a, [hl] ; a = current PP - and %11000000 ; get PP Up count + and PP_UP_MASK pop bc or b ; place normal max PP in 6 lower bits of a ASSERT wMoveData + MOVE_PP + 1 == wPPUpCountAndMaxPP @@ -2521,7 +2521,7 @@ GetMaxPP: ld [wUsingPPUp], a call AddBonusPP ; add bonus PP from PP Ups ld a, [hl] - and %00111111 ; mask out the PP Up count + and PP_MASK ld [wMaxPP], a ; store max PP ret |
