2018-06-24 14:09:41 +00:00
|
|
|
BattleCommand_GetMagnitude:
|
2018-01-26 16:36:00 +00:00
|
|
|
; 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]
|
2020-12-23 21:29:30 +00:00
|
|
|
ld [wTextDecimalByte], a
|
2018-01-26 16:36:00 +00:00
|
|
|
call BattleCommand_MoveDelay
|
|
|
|
ld hl, MagnitudeText
|
2019-04-08 12:15:10 +00:00
|
|
|
call StdBattleTextbox
|
2018-01-26 16:36:00 +00:00
|
|
|
pop de
|
|
|
|
pop bc
|
|
|
|
ret
|
|
|
|
|
|
|
|
INCLUDE "data/moves/magnitude_power.asm"
|