pokecrystal-board/engine/battle/move_effects/magnitude.asm

30 lines
377 B
NASM
Raw Normal View History

2018-06-24 07:09:41 -07:00
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 [wTextDecimalByte], a
call BattleCommand_MoveDelay
ld hl, MagnitudeText
2019-04-08 05:15:10 -07:00
call StdBattleTextbox
pop de
pop bc
ret
INCLUDE "data/moves/magnitude_power.asm"