2018-06-24 14:09:41 +00:00
|
|
|
BattleCommand_Foresight:
|
2013-12-01 19:19:57 +00:00
|
|
|
; foresight
|
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wAttackMissed]
|
2013-12-01 19:19:57 +00:00
|
|
|
and a
|
|
|
|
jr nz, .failed
|
|
|
|
|
|
|
|
call CheckHiddenOpponent
|
|
|
|
jr nz, .failed
|
|
|
|
|
|
|
|
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
2014-06-14 07:34:57 +00:00
|
|
|
call GetBattleVarAddr
|
2013-12-01 19:19:57 +00:00
|
|
|
bit SUBSTATUS_IDENTIFIED, [hl]
|
|
|
|
jr nz, .failed
|
|
|
|
|
|
|
|
set SUBSTATUS_IDENTIFIED, [hl]
|
2014-01-01 13:09:15 +00:00
|
|
|
call AnimateCurrentMove
|
2013-12-01 19:19:57 +00:00
|
|
|
ld hl, IdentifiedText
|
|
|
|
jp StdBattleTextBox
|
|
|
|
|
|
|
|
.failed
|
2018-01-26 16:36:00 +00:00
|
|
|
jp FailMove
|