Replace hardcoded numbers for stats (#1073)
This commit is contained in:
@@ -4161,14 +4161,14 @@ RaiseStat:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
inc b
|
inc b
|
||||||
ld a, $d
|
ld a, MAX_STAT_LEVEL
|
||||||
cp b
|
cp b
|
||||||
jp c, .cant_raise_stat
|
jp c, .cant_raise_stat
|
||||||
ld a, [wLoweredStat]
|
ld a, [wLoweredStat]
|
||||||
and $f0
|
and $f0
|
||||||
jr z, .got_num_stages
|
jr z, .got_num_stages
|
||||||
inc b
|
inc b
|
||||||
ld a, $d
|
ld a, MAX_STAT_LEVEL
|
||||||
cp b
|
cp b
|
||||||
jr nc, .got_num_stages
|
jr nc, .got_num_stages
|
||||||
ld b, a
|
ld b, a
|
||||||
@@ -4176,7 +4176,7 @@ RaiseStat:
|
|||||||
ld [hl], b
|
ld [hl], b
|
||||||
push hl
|
push hl
|
||||||
ld a, c
|
ld a, c
|
||||||
cp $5
|
cp ACCURACY
|
||||||
jr nc, .done_calcing_stats
|
jr nc, .done_calcing_stats
|
||||||
ld hl, wBattleMonStats + 1
|
ld hl, wBattleMonStats + 1
|
||||||
ld de, wPlayerStats
|
ld de, wPlayerStats
|
||||||
@@ -4684,7 +4684,7 @@ LowerStat:
|
|||||||
.got_num_stages
|
.got_num_stages
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
ld a, c
|
ld a, c
|
||||||
cp 5
|
cp ACCURACY
|
||||||
jr nc, .accuracy_evasion
|
jr nc, .accuracy_evasion
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
|
Reference in New Issue
Block a user