pokecrystal-board/engine/battle/move_effects/lock_on.asm
2018-06-24 16:13:22 +02:00

23 lines
323 B
NASM

BattleCommand_LockOn:
; lockon
call CheckSubstituteOpp
jr nz, .fail
ld a, [wAttackMissed]
and a
jr nz, .fail
ld a, BATTLE_VARS_SUBSTATUS5_OPP
call GetBattleVarAddr
set SUBSTATUS_LOCK_ON, [hl]
call AnimateCurrentMove
ld hl, TookAimText
jp StdBattleTextBox
.fail
call AnimateFailedMove
jp PrintDidntAffect