mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
22 lines
394 B
NASM
22 lines
394 B
NASM
BattleCommand_Safeguard:
|
|
ld hl, wPlayerScreens
|
|
ld de, wPlayerSafeguardCount
|
|
ldh a, [hBattleTurn]
|
|
and a
|
|
jr z, .ok
|
|
ld hl, wEnemyScreens
|
|
ld de, wEnemySafeguardCount
|
|
.ok
|
|
bit SCREENS_SAFEGUARD, [hl]
|
|
jr nz, .failed
|
|
set SCREENS_SAFEGUARD, [hl]
|
|
ld a, 5
|
|
ld [de], a
|
|
call AnimateCurrentMove
|
|
ld hl, CoveredByVeilText
|
|
jp StdBattleTextbox
|
|
|
|
.failed
|
|
call AnimateFailedMove
|
|
jp PrintButItFailed
|