5#define NAMESPACE action_command_three_chances
42#define ANTI_MASH_TIME 5
91API_CALLABLE(N(
init)) {
110 acs->meterFillLevel = 0;
111 acs->meterFillWidth = 0;
114 acs->hudPrepareTime = 30;
176 switch (
acs->variation) {
195API_CALLABLE(N(start)) {
213 acs->meterFillLevel = 0;
214 acs->meterFillWidth = 0;
234 switch (
acs->state) {
286 if (
acs->hudPrepareTime != 0) {
287 acs->hudPrepareTime--;
291 if (
acs->hudPosX > 50) {
301 switch (
acs->variation) {
319 if (
acs->prepareTime != 0) {
324 acs->stateTimer =
acs->duration - 60;
325 if (
acs->stateTimer < 42) {
326 acs->stateTimer = 42;
335 if (
acs->stateTimer == 42) {
339 if (
acs->stateTimer == 22) {
345 if (
acs->stateTimer == 2) {
354 if (
acs->stateTimer == 0) {
355 acs->stateTimer = 20;
356 acs->threeChances.time = 0;
358 acs->threeChances.hadCorrectTiming =
FALSE;
368 if (!(
acs->wrongButtonPressed ||
acs->threeChances.hadCorrectTiming)
369 &&
acs->threeChances.time >= -5
388 acs->wrongButtonPressed =
TRUE;
392 acs->threeChances.hadCorrectTiming =
TRUE;
400 if ((
acs->threeChances.time > -5)
401 && (
acs->wrongButtonPressed ||
acs->threeChances.hadCorrectTiming)
404 if (
acs->threeChances.hadCorrectTiming) {
414 if (
acs->threeChances.time == -5) {
416 if (
acs->threeChances.hadCorrectTiming) {
426 acs->threeChances.time--;
429 if (
acs->stateTimer == 2) {
437 if (
acs->stateTimer == 0) {
438 acs->stateTimer = 20;
439 acs->threeChances.time = 0;
441 acs->threeChances.hadCorrectTiming =
FALSE;
451 if (!(
acs->wrongButtonPressed ||
acs->threeChances.hadCorrectTiming)
452 &&
acs->threeChances.time >= -5
475 acs->wrongButtonPressed =
TRUE;
480 acs->threeChances.hadCorrectTiming =
TRUE;
488 if ((
acs->threeChances.time > -5)
489 && (
acs->wrongButtonPressed ||
acs->threeChances.hadCorrectTiming)
492 if (
acs->threeChances.hadCorrectTiming) {
502 if (
acs->threeChances.time == -5) {
504 if (
acs->threeChances.hadCorrectTiming) {
514 acs->threeChances.time--;
517 if (
acs->stateTimer == 2) {
525 if (
acs->stateTimer == 0) {
526 acs->stateTimer = 20;
527 acs->threeChances.time = 0;
529 acs->threeChances.hadCorrectTiming =
FALSE;
539 if (!(
acs->wrongButtonPressed ||
acs->threeChances.hadCorrectTiming)
540 &&
acs->threeChances.time >= -5
563 acs->wrongButtonPressed =
TRUE;
569 acs->threeChances.hadCorrectTiming =
TRUE;
577 if ((
acs->threeChances.time > -5)
578 && (
acs->wrongButtonPressed ||
acs->threeChances.hadCorrectTiming)
581 if (
acs->threeChances.hadCorrectTiming) {
591 if (
acs->threeChances.time == -5) {
593 if (
acs->threeChances.hadCorrectTiming) {
605 acs->threeChances.time--;
622 if (
acs->stateTimer != 0) {
BSS s32 PopupMenu_SelectedIndex
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 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)