pokecrystal-board/engine/battle/move_effects/magnitude.asm
Rangi 9dec80b07e Add meaningful aliases for wd265
Introduce MONICON_* constants
Introduce BATTLEPLAYERACTION_* constants
2018-07-29 00:25:52 -04:00

30 lines
375 B
NASM

BattleCommand_GetMagnitude:
; getmagnitude
push bc
call BattleRandom
ld b, a
ld hl, MagnitudePower
.loop
ld a, [hli]
cp b
jr nc, .ok
inc hl
inc hl
jr .loop
.ok
ld d, [hl]
push de
inc hl
ld a, [hl]
ld [wDeciramBuffer], a
call BattleCommand_MoveDelay
ld hl, MagnitudeText
call StdBattleTextBox
pop de
pop bc
ret
INCLUDE "data/moves/magnitude_power.asm"