pokecrystal-board/engine/battle/move_effects/pay_day.asm
Rangi eb1e3636bb Use labels instead of constants for HRAM
Use explicit ldh instruction to access HRAM locations, don't rely on optimizing ld
2018-08-25 14:28:22 -04:00

27 lines
335 B
NASM

BattleCommand_PayDay:
; payday
xor a
ld hl, wStringBuffer1
ld [hli], a
ldh 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