aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle/move_effects/transform.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2025-11-25 17:53:29 -0500
committerGitHub <noreply@github.com>2025-11-25 16:53:29 -0600
commite92d1af478c8381fde30f709c2619abe90104d3a (patch)
tree7be135926706fabcf23d2b278378d0fdd7f7eda7 /engine/battle/move_effects/transform.asm
parentUse `ld_hli_a_string` macro to make byte-by-byte strings more obvious (#540) (diff)
downloadpokeyellow-e92d1af478c8381fde30f709c2619abe90104d3a.tar.gz
pokeyellow-e92d1af478c8381fde30f709c2619abe90104d3a.tar.xz
pokeyellow-e92d1af478c8381fde30f709c2619abe90104d3a.zip
Avoid magic numbers for most `CopyData` calls (#542)
Diffstat (limited to 'engine/battle/move_effects/transform.asm')
-rw-r--r--engine/battle/move_effects/transform.asm9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm
index 6f2e705c..343fa3ca 100644
--- a/engine/battle/move_effects/transform.asm
+++ b/engine/battle/move_effects/transform.asm
@@ -82,14 +82,15 @@ TransformEffect_:
ld a, [hli]
ld [de], a
inc de
-; Attack, Defense, Speed, and Special stats
+; Skip level and max HP
inc hl
inc hl
inc hl
inc de
inc de
inc de
- ld bc, $8
+; Attack, Defense, Speed, and Special stats
+ ld bc, (NUM_STATS - 1) * 2
call CopyData
ld bc, wBattleMonMoves - wBattleMonPP
add hl, bc ; ld hl, wBattleMonMoves
@@ -99,7 +100,7 @@ TransformEffect_:
ld a, [hli]
and a
jr z, .lessThanFourMoves
- ld a, $5
+ ld a, 5
ld [de], a
inc de
dec b
@@ -136,7 +137,7 @@ TransformEffect_:
ld l, e
pop de
.gotStatsOrModsToCopy
- ld bc, $8
+ ld bc, (NUM_STATS - 1) * 2
jp CopyData
.failed