mirror of https://github.com/pret/pokecrystal.git
28 lines
335 B
NASM
28 lines
335 B
NASM
BattleCommand_PayDay:
|
|
; payday
|
|
|
|
xor a
|
|
ld hl, wStringBuffer1
|
|
ld [hli], a
|
|
|
|
ld a, [hBattleTurn]
|
|
and a
|
|
ld a, [wBattleMonLevel]
|
|
jr z, .ok
|
|
ld a, [wEnemyMonLevel]
|
|
.ok
|
|
|
|
add a
|
|
ld hl, wPayDayMoney + 2
|
|
add [hl]
|
|
ld [hld], a
|
|
jr nc, .done
|
|
inc [hl]
|
|
dec hl
|
|
jr nz, .done
|
|
inc [hl]
|
|
.done
|
|
ld hl, CoinsScatteredText
|
|
jp StdBattleTextBox
|
|
|