#include "macros/btlcmd.inc"


_000:
    CompareMonDataToValue OPCODE_EQU, BTLSCR_ATTACKER, BATTLEMON_STOCKPILE_COUNT, 0, _064
    UpdateMonDataFromVar OPCODE_GET, BTLSCR_ATTACKER, BATTLEMON_STOCKPILE_COUNT, BTLVAR_MOVE_POWER
    UpdateVar OPCODE_MUL, BTLVAR_MOVE_POWER, 100
    UpdateMonData OPCODE_SET, BTLSCR_ATTACKER, BATTLEMON_STOCKPILE_COUNT, 0
    UpdateMonDataFromVar OPCODE_GET, BTLSCR_ATTACKER, BATTLEMON_STOCKPILE_DEF_BOOSTS, BTLVAR_CALC_TEMP
    UpdateMonDataFromVar OPCODE_SUB_TO_ZERO, BTLSCR_ATTACKER, BATTLEMON_DEFENSE_STAGE, BTLVAR_CALC_TEMP
    UpdateMonDataFromVar OPCODE_GET, BTLSCR_ATTACKER, BATTLEMON_STOCKPILE_SPDEF_BOOSTS, BTLVAR_CALC_TEMP
    UpdateMonDataFromVar OPCODE_SUB_TO_ZERO, BTLSCR_ATTACKER, BATTLEMON_SP_DEFENSE_STAGE, BTLVAR_CALC_TEMP
    UpdateMonData OPCODE_SET, BTLSCR_ATTACKER, BATTLEMON_STOCKPILE_DEF_BOOSTS, 0
    UpdateMonData OPCODE_SET, BTLSCR_ATTACKER, BATTLEMON_STOCKPILE_SPDEF_BOOSTS, 0
    UpdateVar OPCODE_FLAG_ON, BTLVAR_BATTLE_CTX_STATUS, SYSCTL_MESSAGE_AFTER_MISS
    // {0}’s stockpiled effect wore off!
    BufferMessage pl_msg_00000368_00994, TAG_NICKNAME, BTLSCR_ATTACKER
    UpdateVar OPCODE_SET, BTLVAR_SIDE_EFFECT_FLAGS_INDIRECT, MOVE_SIDE_EFFECT_ON_HIT|MOVE_SUBSCRIPT_PTR_PRINT_MESSAGE_AND_PLAY_ANIMATION
    CalcCrit 
    CalcMaxDamage 
    End 

_064:
    PrintAttackMessage 
    Wait 
    WaitButtonABTime 30
    // But it failed to spit up a thing!
    PrintMessage pl_msg_00000368_00814, TAG_NONE
    Wait 
    WaitButtonABTime 30
    UpdateVar OPCODE_FLAG_ON, BTLVAR_MOVE_STATUS_FLAGS, MOVE_STATUS_NO_MORE_WORK
    End 
