jep-hack/engine/battle/move_effects/safeguard.asm
Zeta_Null 2f8a41f833 First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
2023-09-10 12:35:35 -04:00

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