2018-06-24 07:09:41 -07:00
|
|
|
BattleCommand_PerishSong:
|
2013-12-01 11:19:57 -08:00
|
|
|
; perishsong
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
ld hl, wPlayerSubStatus1
|
|
|
|
ld de, wEnemySubStatus1
|
2013-12-01 11:19:57 -08:00
|
|
|
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
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wPlayerPerishCount], a
|
2013-12-01 11:19:57 -08:00
|
|
|
|
|
|
|
.enemy
|
|
|
|
ld a, [de]
|
|
|
|
bit SUBSTATUS_PERISH, a
|
|
|
|
jr nz, .done
|
|
|
|
|
|
|
|
set SUBSTATUS_PERISH, a
|
|
|
|
ld [de], a
|
|
|
|
ld a, 4
|
2018-01-23 14:39:09 -08:00
|
|
|
ld [wEnemyPerishCount], a
|
2013-12-01 11:19:57 -08:00
|
|
|
|
|
|
|
.done
|
2014-01-01 05:09:15 -08:00
|
|
|
call AnimateCurrentMove
|
2013-12-01 11:19:57 -08:00
|
|
|
ld hl, StartPerishText
|
2019-04-08 05:15:10 -07:00
|
|
|
jp StdBattleTextbox
|
2013-12-01 11:19:57 -08:00
|
|
|
|
|
|
|
.failed
|
2014-01-01 05:09:15 -08:00
|
|
|
call AnimateFailedMove
|
2013-12-01 11:19:57 -08:00
|
|
|
jp PrintButItFailed
|