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

25 lines
364 B
NASM

BattleCommand_Spikes:
ld hl, wEnemyScreens
ldh a, [hBattleTurn]
and a
jr z, .got_screens
ld hl, wPlayerScreens
.got_screens
; Fails if spikes are already down!
bit SCREENS_SPIKES, [hl]
jr nz, .failed
; Nothing else stops it from working.
set SCREENS_SPIKES, [hl]
call AnimateCurrentMove
ld hl, SpikesText
jp StdBattleTextbox
.failed
jp FailMove