diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2022-07-26 00:01:21 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2022-07-26 00:02:05 -0400 |
| commit | 72b56563056fc2917ea0b4d6b278c72e92cb2151 (patch) | |
| tree | e6f4155cd9b1f670c0e355cc3502cdf0fe1102a8 /engine | |
| parent | Basic Issue Template with Discord Link (#100) (diff) | |
| download | pokeyellow-72b56563056fc2917ea0b4d6b278c72e92cb2151.tar.gz pokeyellow-72b56563056fc2917ea0b4d6b278c72e92cb2151.tar.xz pokeyellow-72b56563056fc2917ea0b4d6b278c72e92cb2151.zip | |
Clarify how Metronome picks a move
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/battle/core.asm | 5 |
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 |
