5#define NAMESPACE action_command_spook
17#define METER_FILL_TICK 850
21#define GET_DRAIN_RATE(pct) PCT_TO_TABLE_RATE(N(DrainRateTable), pct)
23API_CALLABLE(N(
init)) {
38 acs->hudPrepareTime = 30;
41 acs->meterFillLevel = 0;
42 acs->meterFillWidth = 0;
70API_CALLABLE(N(start)) {
89 acs->meterFillLevel = 0;
90 acs->meterFillWidth = 0;
93 battleStatus->maxActionQuality =
acs->mashMeterCutoffs[(
acs->mashMeterNumIntervals - 1)];
110 switch (
acs->state) {
131 if (
acs->hudPosX > 50) {
139 if (
acs->prepareTime != 0) {
144 acs->meterFillLevel = 0;
147 acs->stateTimer =
acs->duration;
156 if (!
acs->isMeterFilled) {
157 if (
acs->statusChance != 0) {
158 cutoff =
acs->mashMeterCutoffs[
acs->mashMeterNumIntervals];
160 if (
acs->meterFillLevel < 0) {
161 acs->meterFillLevel = 0;
164 acs->meterFillLevel -= 10;
165 if (
acs->meterFillLevel < 0) {
166 acs->meterFillLevel = 0;
172 if (!
acs->isMeterFilled) {
173 if (
acs->statusChance != 0) {
183 acs->meterFillLevel += (a * b) / (100 * 100);
191 acs->meterFillLevel -= (a * b) / (100 * 100);
212 if (
acs->meterFillLevel < 0) {
213 acs->meterFillLevel = 0;
228 if (
acs->stateTimer != 0) {
234 if (
acs->statusChance == 0) {
245 cutoff =
acs->mashMeterCutoffs[
acs->mashMeterNumIntervals - 1];
263 if (
acs->statusChance == 0) {
265 if (
acs->meterFillLevel < 0) {
266 acs->meterFillLevel = 0;
270 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)
#define AC_QUALITY_FAILED
HudScript HES_StickNeutral
HudScript HES_StickMashLeft
@ SOUND_LOOP_CHARGE_METER
@ ACTION_RESULT_METER_NOT_ENOUGH
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)
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.
@ HUD_ELEMENT_FLAG_DISABLED
void sfx_stop_sound(s32 soundID)
void sfx_adjust_env_sound_params(s32 soundID, u8 volume, u8 pan, s16 pitchShift)
void sfx_play_sound_with_params(s32 soundID, u8 volume, u8 pan, s16 pitchShift)
#define GET_DRAIN_RATE(pct)
s32 actionCmdTableSpook[]
BattleStatus gBattleStatus
void N init(Npc *bombette)