From caffcdd9f766da24e06d93bb2e6b8ff0f541cea4 Mon Sep 17 00:00:00 2001 From: Idain Date: Mon, 21 Aug 2023 11:53:32 -0400 Subject: [PATCH] Replace hardcoded numbers for stats (pret/pokecrystal#1073) --- engine/battle/effect_commands.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 8e2b7d4b..1ef7866d 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -4126,14 +4126,14 @@ RaiseStat: add hl, bc ld b, [hl] inc b - ld a, $d + ld a, MAX_STAT_LEVEL cp b jp c, .cant_raise_stat ld a, [wLoweredStat] and $f0 jr z, .got_num_stages inc b - ld a, $d + ld a, MAX_STAT_LEVEL cp b jr nc, .got_num_stages ld b, a @@ -4141,7 +4141,7 @@ RaiseStat: ld [hl], b push hl ld a, c - cp $5 + cp ACCURACY jr nc, .done_calcing_stats ld hl, wBattleMonStats + 1 ld de, wPlayerStats @@ -4647,7 +4647,7 @@ LowerStat: .got_num_stages ld [hl], b ld a, c - cp 5 + cp ACCURACY jr nc, .accuracy_evasion push hl