You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Move-unique effect commands consistently go in engine/battle/move_effects/
This commit is contained in:
25
engine/battle/move_effects/safeguard.asm
Normal file
25
engine/battle/move_effects/safeguard.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
Reference in New Issue
Block a user