summaryrefslogtreecommitdiff
path: root/engine/battle/decrement_pp.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/decrement_pp.asm')
-rw-r--r--engine/battle/decrement_pp.asm26
1 files changed, 13 insertions, 13 deletions
diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm
index ecf5040b..e23a85ba 100644
--- a/engine/battle/decrement_pp.asm
+++ b/engine/battle/decrement_pp.asm
@@ -1,23 +1,23 @@
-DecrementPP: ; 68000 (1a:4000)
+DecrementPP:
; after using a move, decrement pp in battle and (if not transformed?) in party
ld a, [de]
cp a, STRUGGLE
ret z ; if the pokemon is using "struggle", there's nothing to do
; we don't decrement PP for "struggle"
- ld hl, W_PLAYERBATTSTATUS1
- ld a, [hli] ; load the W_PLAYERBATTSTATUS1 pokemon status flags and increment hl to load the
- ; W_PLAYERBATTSTATUS2 status flags later
+ ld hl, wPlayerBattleStatus1
+ ld a, [hli] ; load the wPlayerBattleStatus1 pokemon status flags and increment hl to load the
+ ; wPlayerBattleStatus2 status flags later
and a, (1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << AttackingMultipleTimes)
ret nz ; if any of these statuses are true, don't decrement PP
- bit UsingRage, [hl]
+ bit UsingRage, [hl]
ret nz ; don't decrement PP either if Pokemon is using Rage
ld hl, wBattleMonPP ; PP of first move (in battle)
-
-; decrement PP in the battle struct
- call .DecrementPP
-
-; decrement PP in the party struct
- ld a, [W_PLAYERBATTSTATUS3]
+
+; decrement PP in the battle struct
+ call .DecrementPP
+
+; decrement PP in the party struct
+ ld a, [wPlayerBattleStatus3]
bit Transformed, a
ret nz ; Return if transformed. Pokemon Red stores the "current pokemon's" PP
; separately from the "Pokemon in your party's" PP. This is
@@ -31,9 +31,9 @@ DecrementPP: ; 68000 (1a:4000)
ld hl, wPartyMon1PP ; PP of first move (in party)
ld a, [wPlayerMonNumber] ; which mon in party is active
- ld bc, wPartyMon2 - wPartyMon1
+ ld bc, wPartyMon2 - wPartyMon1
call AddNTimes ; calculate address of the mon to modify
-.DecrementPP
+.DecrementPP:
ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use?
ld c, a
ld b, 0