diff options
| author | dannye <33dannye@gmail.com> | 2025-05-10 12:25:27 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2025-05-10 12:25:27 -0500 |
| commit | 2c74f137fc42cf7eaffa0a6f9046e4aa89887f91 (patch) | |
| tree | c52fc10a17597a1d04b63b79c6df78cc1b00de41 /engine/items | |
| parent | Fix hardcoded address in VC patch (diff) | |
| parent | Use features new to RGBDS 0.9.2 (#506) (diff) | |
| download | pokeyellow-2c74f137fc42cf7eaffa0a6f9046e4aa89887f91.tar.gz pokeyellow-2c74f137fc42cf7eaffa0a6f9046e4aa89887f91.tar.xz pokeyellow-2c74f137fc42cf7eaffa0a6f9046e4aa89887f91.zip | |
Merge branch 'master' of https://github.com/pret/pokered
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 de95b0c7..9802eb50 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2301,7 +2301,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 @@ -2314,7 +2314,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 @@ -2684,7 +2684,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 @@ -2791,7 +2791,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 @@ -2803,7 +2803,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 |
