You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
split out some more move effects
This commit is contained in:
41
battle/effects/perish_song.asm
Normal file
41
battle/effects/perish_song.asm
Normal file
@@ -0,0 +1,41 @@
|
||||
BattleCommand58: ; 376c2
|
||||
; perishsong
|
||||
|
||||
|
||||
ld hl, PlayerSubStatus1
|
||||
ld de, EnemySubStatus1
|
||||
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 [PlayerPerishCount], a
|
||||
|
||||
.enemy
|
||||
ld a, [de]
|
||||
bit SUBSTATUS_PERISH, a
|
||||
jr nz, .done
|
||||
|
||||
set SUBSTATUS_PERISH, a
|
||||
ld [de], a
|
||||
ld a, 4
|
||||
ld [EnemyPerishCount], a
|
||||
|
||||
.done
|
||||
call Function0x37e01
|
||||
ld hl, StartPerishText
|
||||
jp StdBattleTextBox
|
||||
|
||||
.failed
|
||||
call Function0x37e77
|
||||
jp PrintButItFailed
|
||||
; 376f8
|
||||
|
||||
Reference in New Issue
Block a user