mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
eb1e3636bb
Use explicit ldh instruction to access HRAM locations, don't rely on optimizing ld
35 lines
564 B
NASM
35 lines
564 B
NASM
BattleCommand_HealBell:
|
|
; healbell
|
|
|
|
ld a, BATTLE_VARS_SUBSTATUS1
|
|
call GetBattleVarAddr
|
|
res SUBSTATUS_NIGHTMARE, [hl]
|
|
ld de, wPartyMon1Status
|
|
ldh a, [hBattleTurn]
|
|
and a
|
|
jr z, .got_status
|
|
ld de, wOTPartyMon1Status
|
|
.got_status
|
|
ld a, BATTLE_VARS_STATUS
|
|
call GetBattleVarAddr
|
|
xor a
|
|
ld [hl], a
|
|
ld h, d
|
|
ld l, e
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
|
ld d, PARTY_LENGTH
|
|
.loop
|
|
ld [hl], a
|
|
add hl, bc
|
|
dec d
|
|
jr nz, .loop
|
|
call AnimateCurrentMove
|
|
|
|
ld hl, BellChimedText
|
|
call StdBattleTextBox
|
|
|
|
ldh a, [hBattleTurn]
|
|
and a
|
|
jp z, CalcPlayerStats
|
|
jp CalcEnemyStats
|