aboutsummaryrefslogtreecommitdiffstats
path: root/engine/items/item_effects.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/items/item_effects.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/items/item_effects.asm')
-rw-r--r--engine/items/item_effects.asm6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index 1b68e47a..7fffae59 100644
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -1302,13 +1302,13 @@ ItemUseMedicine:
.statNameInnerLoop
ld a, [hli]
ld b, a
- ld a, $50
+ ld a, '@'
cp b
jr nz, .statNameInnerLoop
jr .statNameLoop
.gotStatName
ld de, wStringBuffer
- ld bc, 10
+ ld bc, NAME_LENGTH - 1 ; all VitaminStats are at most 10 bytes
call CopyData ; copy the stat's name to wStringBuffer
ld a, SFX_HEAL_AILMENT
call PlaySound
@@ -2029,7 +2029,7 @@ ItemUsePPRestore:
ld bc, wPartyMon2 - wPartyMon1
call AddNTimes
ld de, wBattleMonPP
- ld bc, 4
+ ld bc, NUM_MOVES
call CopyData ; copy party data to in-battle data
.skipUpdatingInBattleData
ld a, SFX_HEAL_AILMENT