mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
26 lines
419 B
NASM
26 lines
419 B
NASM
BattleCommand_Safeguard: ; 37939
|
|
; safeguard
|
|
|
|
ld hl, PlayerScreens
|
|
ld de, PlayerSafeguardCount
|
|
ld a, [hBattleTurn]
|
|
and a
|
|
jr z, .ok
|
|
ld hl, EnemyScreens
|
|
ld de, EnemySafeguardCount
|
|
.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
|
|
|
|
; 37962
|