pokecrystal-board/engine/battle/move_effects/safeguard.asm
mid-kid 3e78e5b2b6 TextBox -> Textbox
Homogenizing names.
2019-04-09 16:09:18 +02:00

24 lines
407 B
NASM

BattleCommand_Safeguard:
; 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