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

32 lines
995 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:
TryPerishSong _045
Call BATTLE_SUBSCRIPT_ATTACK_MESSAGE_AND_ANIMATION
// All Pokémon hearing the song will faint in three turns!
PrintMessage pl_msg_00000368_00822, TAG_NONE
Wait
WaitButtonABTime 30
UpdateVar OPCODE_SET, BTLVAR_MSG_MOVE_TEMP, MOVE_PERISH_SONG
UpdateVar OPCODE_SET, BTLVAR_MSG_ABILITY_TEMP, ABILITY_SOUNDPROOF
UpdateVar OPCODE_SET, BTLVAR_BATTLER_SPEED_TEMP, 0
_021:
GetMonBySpeedOrder BTLVAR_MSG_BATTLER_TEMP
CheckIgnorableAbility CHECK_NOT_HAVE, BTLSCR_MSG_TEMP, ABILITY_SOUNDPROOF, _037
// {0}s {1} blocks {2}!
PrintMessage pl_msg_00000368_00689, TAG_NICKNAME_ABILITY_MOVE, BTLSCR_MSG_TEMP, BTLSCR_MSG_TEMP, BTLSCR_MSG_TEMP
Wait
WaitButtonABTime 30
_037:
UpdateVar OPCODE_ADD, BTLVAR_BATTLER_SPEED_TEMP, 1
GoToIfValidMon BTLVAR_BATTLER_SPEED_TEMP, _021
End
_045:
UpdateVar OPCODE_FLAG_ON, BTLVAR_MOVE_STATUS_FLAGS, MOVE_STATUS_FAILED
End