aboutsummaryrefslogtreecommitdiffstats
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/core.asm5
1 files changed, 3 insertions, 2 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 23cac58a..27ed1093 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -5313,12 +5313,13 @@ MetronomePickMove:
; values for enemy turn
ld de, wEnemyMoveNum
ld hl, wEnemySelectedMove
-; loop to pick a random number in the range [1, $a5) to be the move used by Metronome
+; loop to pick a random number in the range of valid moves used by Metronome
.pickMoveLoop
call BattleRandom
and a
jr z, .pickMoveLoop
- cp NUM_ATTACKS ; max move number (including Struggle)
+ cp STRUGGLE
+ assert NUM_ATTACKS == STRUGGLE ; random numbers greater than STRUGGLE are not moves
jr nc, .pickMoveLoop
cp METRONOME
jr z, .pickMoveLoop