pokeplatinum/res/battle/scripts/subscripts/subscript_recover_hp.s
2024-07-16 12:01:40 -07:00

31 lines
972 B
ArmAsm
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "macros/btlcmd.inc"
.data
_000:
UpdateMonDataFromVar OPCODE_GET, BTLSCR_MSG_TEMP, BATTLEMON_MAX_HP, BTLVAR_CALC_TEMP
CompareMonDataToVar OPCODE_EQU, BTLSCR_MSG_TEMP, BATTLEMON_CUR_HP, BTLVAR_CALC_TEMP, _036
PlayMoveAnimation BTLSCR_ATTACKER
Wait
UpdateVar OPCODE_FLAG_ON, BTLVAR_BATTLE_CTX_STATUS, SYSCTL_SKIP_SPRITE_BLINK
CompareVarToValue OPCODE_FLAG_NOT, BTLVAR_BATTLE_CTX_STATUS_2, SYSCTL_RECOVER_HP_VISUAL, _026
PlayBattleAnimation BTLSCR_MSG_TEMP, BATTLE_ANIMATION_RESTORE_HP
Wait
_026:
Call BATTLE_SUBSCRIPT_UPDATE_HP
// {0} regained health!
PrintMessage pl_msg_00000368_00184, TAG_NICKNAME, BTLSCR_MSG_TEMP
Wait
WaitButtonABTime 30
End
_036:
WaitButtonABTime 30
// {0}s HP is full!
PrintMessage pl_msg_00000368_00187, TAG_NICKNAME, BTLSCR_MSG_TEMP
Wait
WaitButtonABTime 30
UpdateVar OPCODE_FLAG_ON, BTLVAR_MOVE_STATUS_FLAGS, MOVE_STATUS_NO_MORE_WORK
End