From 0388785af8ffd1dba727321f4735dbfe0c578eea Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Sat, 21 Dec 2024 21:05:39 -0500 Subject: [PATCH] Use `SERIAL_RNS_LENGTH` in `_BattleRandom` --- engine/battle/core.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 82af89276..cdf7ac07f 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6664,7 +6664,7 @@ _BattleRandom:: ld [wLinkBattleRNCount], a ; If we haven't hit the end yet, we're good - cp 10 - 1 ; Exclude last value. See the closing comment + cp SERIAL_RNS_LENGTH - 1 ; Exclude last value. See the closing comment ld a, [hl] pop bc pop hl @@ -6680,7 +6680,7 @@ _BattleRandom:: xor a ld [wLinkBattleRNCount], a ld hl, wLinkBattleRNs - ld b, 10 ; number of seeds + ld b, SERIAL_RNS_LENGTH ; number of seeds ; Generate next number in the sequence for each seed ; a[n+1] = (a[n] * 5 + 1) % 256