#include "macros/btlcmd.inc"


_000:
    UpdateMonDataFromVar OPCODE_GET, BTLSCR_DEFENDER, BATTLEMON_CUR_HP, BTLVAR_DAMAGE
    UpdateMonDataFromVar OPCODE_GET, BTLSCR_ATTACKER, BATTLEMON_CUR_HP, BTLVAR_CALC_TEMP
    CompareVarToVar OPCODE_LTE, BTLVAR_DAMAGE, BTLVAR_CALC_TEMP, _027
    UpdateVarFromVar OPCODE_SUB, BTLVAR_DAMAGE, BTLVAR_CALC_TEMP
    UpdateVar OPCODE_MUL, BTLVAR_DAMAGE, -1
    UpdateVar OPCODE_FLAG_ON, BTLVAR_BATTLE_CTX_STATUS, SYSCTL_IGNORE_TYPE_CHECKS
    End 

_027:
    UpdateVar OPCODE_FLAG_ON, BTLVAR_MOVE_STATUS_FLAGS, MOVE_STATUS_FAILED
    End 
