#include "macros/btlcmd.inc"


_000:
    CompareMonDataToValue OPCODE_FLAG_NOT, BTLSCR_ATTACKER, BATTLEMON_STATUS, MON_CONDITION_SLEEP, _019
    CompareVarToValue OPCODE_EQU, BTLVAR_MOVE_TEMP, MOVE_SLEEP_TALK, _012
    Call BATTLE_SUBSCRIPT_SLEEPING

_012:
    UpdateVar OPCODE_FLAG_ON, BTLVAR_SIDE_EFFECT_FLAGS_INDIRECT, MOVE_SIDE_EFFECT_TO_DEFENDER|MOVE_SUBSCRIPT_PTR_FLINCH
    CalcCrit 
    CalcDamage 
    End 

_019:
    UpdateVar OPCODE_FLAG_ON, BTLVAR_MOVE_STATUS_FLAGS, MOVE_STATUS_FAILED
    End 
