summaryrefslogtreecommitdiff
path: root/engine/battle
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle')
-rw-r--r--engine/battle/core.asm24
-rw-r--r--engine/battle/move_effects/beat_up.asm20
2 files changed, 22 insertions, 22 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 3c2bf571f..f84864a95 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -7438,13 +7438,13 @@ AnimateExpBar:
jp nc, .finish
ldh a, [hProduct + 3]
- ld [wd004], a
+ ld [wExperienceGained + 2], a
push af
ldh a, [hProduct + 2]
- ld [wd003], a
+ ld [wExperienceGained + 1], a
push af
xor a
- ld [wd002], a
+ ld [wExperienceGained], a
xor a ; PARTYMON
ld [wMonType], a
predef CopyMonToTempMon
@@ -7456,10 +7456,10 @@ AnimateExpBar:
call CalcExpBar
push bc
ld hl, wTempMonExp + 2
- ld a, [wd004]
+ ld a, [wExperienceGained + 2]
add [hl]
ld [hld], a
- ld a, [wd003]
+ ld a, [wExperienceGained + 1]
adc [hl]
ld [hld], a
jr nc, .NoOverflow
@@ -8788,7 +8788,7 @@ AddLastLinkBattleToLinkRecord:
.FindOpponentAndAppendRecord:
ld b, NUM_LINK_BATTLE_RECORDS
ld hl, sLinkBattleRecord1End - 1
- ld de, wd002
+ ld de, wLinkBattleRecordBuffer
.loop3
push bc
push de
@@ -8817,16 +8817,16 @@ AddLastLinkBattleToLinkRecord:
add b
add b
ld e, a
- ld d, $0
- ld hl, wd002
+ ld d, 0
+ ld hl, wLinkBattleRecordBuffer
add hl, de
push hl
ld a, c
add c
add c
ld e, a
- ld d, $0
- ld hl, wd002
+ ld d, 0
+ ld hl, wLinkBattleRecordBuffer
add hl, de
ld d, h
ld e, l
@@ -8858,7 +8858,7 @@ AddLastLinkBattleToLinkRecord:
ld hl, sLinkBattleRecord
call AddNTimes
push hl
- ld de, wd002
+ ld de, wLinkBattleRecordBuffer
ld bc, LINK_BATTLE_RECORD_LENGTH
call CopyBytes
pop hl
@@ -8872,7 +8872,7 @@ AddLastLinkBattleToLinkRecord:
push hl
ld bc, LINK_BATTLE_RECORD_LENGTH
call CopyBytes
- ld hl, wd002
+ ld hl, wLinkBattleRecordBuffer
ld bc, LINK_BATTLE_RECORD_LENGTH
pop de
call CopyBytes
diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm
index 73bbb2e42..f1cc7a5c2 100644
--- a/engine/battle/move_effects/beat_up.asm
+++ b/engine/battle/move_effects/beat_up.asm
@@ -14,7 +14,7 @@ BattleCommand_BeatUp:
call DelayFrames
xor a
ld [wPlayerRolloutCount], a
- ld [wd002], a
+ ld [wCurBeatUpPartyMon], a
ld [wBeatUpHitAtLeastOnce], a
jr .got_mon
@@ -23,10 +23,10 @@ BattleCommand_BeatUp:
ld b, a
ld a, [wPartyCount]
sub b
- ld [wd002], a
+ ld [wCurBeatUpPartyMon], a
.got_mon
- ld a, [wd002]
+ ld a, [wCurBeatUpPartyMon]
ld hl, wPartyMonNicknames
call GetNick
ld a, MON_HP
@@ -34,7 +34,7 @@ BattleCommand_BeatUp:
ld a, [hli]
or [hl]
jp z, .beatup_fail ; fainted
- ld a, [wd002]
+ ld a, [wCurBeatUpPartyMon]
ld c, a
ld a, [wCurBattleMon]
; BUG: this can desynchronize link battles
@@ -88,7 +88,7 @@ BattleCommand_BeatUp:
xor a
ld [wEnemyRolloutCount], a
- ld [wd002], a
+ ld [wCurBeatUpPartyMon], a
ld [wBeatUpHitAtLeastOnce], a
jr .enemy_got_mon
@@ -97,7 +97,7 @@ BattleCommand_BeatUp:
ld b, a
ld a, [wOTPartyCount]
sub b
- ld [wd002], a
+ ld [wCurBeatUpPartyMon], a
.enemy_got_mon
ld a, [wBattleMode]
@@ -112,7 +112,7 @@ BattleCommand_BeatUp:
and a
jr nz, .link_or_tower
- ld a, [wd002]
+ ld a, [wCurBeatUpPartyMon]
ld c, a
ld b, 0
ld hl, wOTPartySpecies
@@ -123,7 +123,7 @@ BattleCommand_BeatUp:
jr .got_enemy_nick
.link_or_tower
- ld a, [wd002]
+ ld a, [wCurBeatUpPartyMon]
ld hl, wOTPartyMonNicknames
ld bc, NAME_LENGTH
call AddNTimes
@@ -137,7 +137,7 @@ BattleCommand_BeatUp:
or [hl]
jp z, .beatup_fail
- ld a, [wd002]
+ ld a, [wCurBeatUpPartyMon]
ld b, a
ld a, [wCurOTMon]
cp b
@@ -217,7 +217,7 @@ GetBeatupMonLocation:
ld hl, wOTPartyMon1Species
.got_species
- ld a, [wd002]
+ ld a, [wCurBeatUpPartyMon]
add hl, bc
call GetPartyLocation
pop bc