mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
3e78e5b2b6
Homogenizing names.
39 lines
562 B
NASM
39 lines
562 B
NASM
BattleCommand_PerishSong:
|
|
; perishsong
|
|
|
|
ld hl, wPlayerSubStatus1
|
|
ld de, wEnemySubStatus1
|
|
bit SUBSTATUS_PERISH, [hl]
|
|
jr z, .ok
|
|
|
|
ld a, [de]
|
|
bit SUBSTATUS_PERISH, a
|
|
jr nz, .failed
|
|
|
|
.ok
|
|
bit SUBSTATUS_PERISH, [hl]
|
|
jr nz, .enemy
|
|
|
|
set SUBSTATUS_PERISH, [hl]
|
|
ld a, 4
|
|
ld [wPlayerPerishCount], a
|
|
|
|
.enemy
|
|
ld a, [de]
|
|
bit SUBSTATUS_PERISH, a
|
|
jr nz, .done
|
|
|
|
set SUBSTATUS_PERISH, a
|
|
ld [de], a
|
|
ld a, 4
|
|
ld [wEnemyPerishCount], a
|
|
|
|
.done
|
|
call AnimateCurrentMove
|
|
ld hl, StartPerishText
|
|
jp StdBattleTextbox
|
|
|
|
.failed
|
|
call AnimateFailedMove
|
|
jp PrintButItFailed
|