5#define NAMESPACE action_command_three_chances
42#define ANTI_MASH_TIME 5
44INCLUDE_IMG(
"battle/action_cmd/three_chances_1.png", battle_action_cmd_three_chances_1_png);
45INCLUDE_PAL(
"battle/action_cmd/three_chances_1.pal", battle_action_cmd_three_chances_1_pal);
47INCLUDE_IMG(
"battle/action_cmd/three_chances_2.png", battle_action_cmd_three_chances_2_png);
48INCLUDE_PAL(
"battle/action_cmd/three_chances_2.pal", battle_action_cmd_three_chances_2_pal);
50INCLUDE_IMG(
"battle/action_cmd/three_chances_3.png", battle_action_cmd_three_chances_3_png);
51INCLUDE_PAL(
"battle/action_cmd/three_chances_3.pal", battle_action_cmd_three_chances_3_pal);
53INCLUDE_IMG(
"battle/action_cmd/three_chances_0.png", battle_action_cmd_three_chances_0_png);
54INCLUDE_PAL(
"battle/action_cmd/three_chances_0.pal", battle_action_cmd_three_chances_0_pal);
56INCLUDE_IMG(
"battle/action_cmd/three_chances_block.png", battle_action_cmd_three_chances_block_png);
57INCLUDE_PAL(
"battle/action_cmd/three_chances_block.pal", battle_action_cmd_three_chances_block_pal);
59INCLUDE_IMG(
"battle/action_cmd/three_chances_circle.png", battle_action_cmd_three_chances_circle_png);
60INCLUDE_PAL(
"battle/action_cmd/three_chances_circle.pal", battle_action_cmd_three_chances_circle_pal);
62INCLUDE_IMG(
"battle/action_cmd/three_chances_cloud.png", battle_action_cmd_three_chances_cloud_png);
63INCLUDE_PAL(
"battle/action_cmd/three_chances_cloud.pal", battle_action_cmd_three_chances_cloud_pal);
65INCLUDE_IMG(
"battle/action_cmd/three_chances_4.png", battle_action_cmd_three_chances_4_png);
66INCLUDE_PAL(
"battle/action_cmd/three_chances_4.pal", battle_action_cmd_three_chances_4_pal);
91API_CALLABLE(N(
init)) {
176 switch (acs->variation) {
195API_CALLABLE(N(start)) {
198 Bytecode* args = script->ptrReadPos;
219 battleStatus->
flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND;
234 switch (acs->
state) {
301 switch (acs->variation) {
356 acs->threeChances.time = 0;
358 acs->threeChances.hadCorrectTiming = FALSE;
369 && acs->threeChances.time >= -5
382 for (i = 0; i < window;
pos++, i++) {
392 acs->threeChances.hadCorrectTiming = TRUE;
400 if ((acs->threeChances.time > -5)
404 if (acs->threeChances.hadCorrectTiming) {
414 if (acs->threeChances.time == -5) {
416 if (acs->threeChances.hadCorrectTiming) {
426 acs->threeChances.time--;
439 acs->threeChances.time = 0;
441 acs->threeChances.hadCorrectTiming = FALSE;
452 && acs->threeChances.time >= -5
468 for (i = 0; i < window;
pos++, i++) {
480 acs->threeChances.hadCorrectTiming = TRUE;
488 if ((acs->threeChances.time > -5)
492 if (acs->threeChances.hadCorrectTiming) {
502 if (acs->threeChances.time == -5) {
504 if (acs->threeChances.hadCorrectTiming) {
514 acs->threeChances.time--;
527 acs->threeChances.time = 0;
529 acs->threeChances.hadCorrectTiming = FALSE;
540 && acs->threeChances.time >= -5
556 for (i = 0; i < window;
pos++, i++) {
569 acs->threeChances.hadCorrectTiming = TRUE;
577 if ((acs->threeChances.time > -5)
581 if (acs->threeChances.hadCorrectTiming) {
591 if (acs->threeChances.time == -5) {
593 if (acs->threeChances.hadCorrectTiming) {
605 acs->threeChances.time--;
BSS ActionCommandStatus gActionCommandStatus
void action_command_free(void)
void increment_action_command_attempt_count(void)
s32 adjust_action_command_difficulty(s32 difficultyLevel)
void increment_action_command_success_count(void)
void action_command_init_status(void)
HudScript HES_TimingCharge3
#define AC_QUALITY_FAILED
HudScript HES_TimingReady
HudScript HES_TimingCharge4b
HudScript HES_TimingBar3Chances
HudScript HES_TimingCharge4c
HudScript HES_AButtonDown
HudScript HES_TimingCharge2
@ ACTION_COMMAND_THREE_CHANCES
void btl_set_popup_duration(s32 duration)
s32 evt_get_variable(Evt *script, Bytecode var)
void hud_element_set_alpha(s32 id, s32 opacity)
void hud_element_set_script(s32 id, HudScript *anim)
void hud_element_set_render_depth(s32 id, s32 z)
HudScript * hud_element_get_script(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
void hud_element_clear_flags(s32 id, s32 flags)
Turns off the given flags.
void hud_element_draw_clipped(s32 id)
void hud_element_free(s32 id)
@ HUD_ELEMENT_FLAG_DISABLED
#define HES_TEMPLATE_CI_ENUM_SIZE(name, sizeX, sizeY)
Basic HudScript used for static CI images, setting size with hs_SetTileSize.
#define INCLUDE_PAL(FILENAME, SYMBOLNAME)
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
void sfx_play_sound(s32 soundID)
s32 * actionCmdDifficultyTable
s32 actionCmdTableWaterBlock[][2]
HudScript HES_TurboCharge
HudScript * DigitScripts[]
@ THREE_CHANCES_STATE_SECOND_CHANCE
@ THREE_CHANCES_STATE_DISPOSE
@ THREE_CHANCES_STATE_UNUSED_CHANCE
@ THREE_CHANCES_STATE_WRAPUP
@ THREE_CHANCES_STATE_PREFACE
@ THREE_CHANCES_STATE_THIRD_CHANCE
@ THREE_CHANCES_STATE_FIRST_CHANCE
@ THREE_CHANCES_STATE_INIT
@ THREE_CHANCES_STATE_START
@ THREE_CHANCES_STATE_APPEAR
@ ACV_THREE_CHANCES_CLOUD_NINE
@ ACV_THREE_CHANCES_TURBO_CHARGE
@ ACV_THREE_CHANCES_WATER_BLOCK
BattleStatus gBattleStatus
void N init(Npc *bombette)