aboutsummaryrefslogtreecommitdiffstats
path: root/engine
diff options
context:
space:
mode:
authorRangi42 <sylvie.oukaour+rangi42@gmail.com>2024-12-21 21:04:32 -0500
committerRangi42 <sylvie.oukaour+rangi42@gmail.com>2024-12-21 21:04:36 -0500
commita59c2bbaf92d381acf45fd6313dc23329a8d08ce (patch)
treeaaf3e0b2dd53e64649a0545579f7112fdf91e4c8 /engine
parentLet CheckEitherEventSet reuse A like CheckBothEventsSet (diff)
downloadpokeyellow-a59c2bbaf92d381acf45fd6313dc23329a8d08ce.tar.gz
pokeyellow-a59c2bbaf92d381acf45fd6313dc23329a8d08ce.tar.xz
pokeyellow-a59c2bbaf92d381acf45fd6313dc23329a8d08ce.zip
Use `SERIAL_RNS_LENGTH` in `BattleRandom`
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/core.asm4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index c0d73bac..51d0c1b8 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6681,7 +6681,7 @@ BattleRandom:
add hl, bc
inc a
ld [wLinkBattleRandomNumberListIndex], a
- cp 9
+ cp SERIAL_RNS_LENGTH - 1
ld a, [hl]
pop bc
pop hl
@@ -6704,7 +6704,7 @@ ENDC
ld [wLinkBattleRandomNumberListIndex], a
ld hl, wLinkBattleRandomNumberList
- ld b, 9
+ ld b, SERIAL_RNS_LENGTH - 1
.loop
ld a, [hl]
ld c, a