mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
99e66c2557
- Remove "Buffer" suffix from some byte and word quantities - Change "Ptr" to "Pointer" Fixes #789
30 lines
377 B
NASM
30 lines
377 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 [wTextDecimalByte], a
|
|
call BattleCommand_MoveDelay
|
|
ld hl, MagnitudeText
|
|
call StdBattleTextbox
|
|
pop de
|
|
pop bc
|
|
ret
|
|
|
|
INCLUDE "data/moves/magnitude_power.asm"
|