4#define NAMESPACE action_command_flee
18#define METER_FILL_RATE 180
22API_CALLABLE(N(
init)) {
40 acs->meterFillLevel =
acs->escapeChance * 100;
42 acs->meterFillWidth = 0;
75 offsetX = 29 - ((100 -
acs->escapeThreshold) * 60) / 100;
88API_CALLABLE(N(start)) {
103 battleStatus->maxActionQuality =
acs->mashMeterCutoffs[
acs->mashMeterNumIntervals - 1];
116 switch (
acs->state) {
146 if (
acs->hudPosX > 50) {
153 if (
acs->prepareTime != 0) {
161 acs->stateTimer =
acs->duration;
181 if (
acs->stateTimer != 0) {
194 acs->stateTimer = 20;
198 if (
acs->stateTimer != 0) {
207 switch (
acs->state) {
212 if (
acs->flee.dir == 0) {
214 if (
acs->escapeThreshold >= 100) {
215 acs->escapeThreshold = 100;
220 if (
acs->escapeThreshold <= 0) {
221 acs->escapeThreshold = 0;
236 hudX = 60 - ((100 -
acs->escapeThreshold) * 60 / 100);
251 }
else if (!
acs->isMeterFilled) {
BSS s32 PopupMenu_SelectedIndex
BSS ActionCommandStatus gActionCommandStatus
void action_command_free(void)
void draw_mash_meter_multicolor_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor)
s32 adjust_action_command_difficulty(s32 difficultyLevel)
void draw_mash_meter_blink(s32 posX, s32 posY, s32 fillValue)
void action_command_init_status(void)
#define AC_QUALITY_FAILED
#define SCALE_BY_PCT(x, pct)
HudScript HES_MashAButton
HudScript HES_RunningAway
@ ACTION_RESULT_METER_NOT_ENOUGH
s32 evt_get_variable(Evt *script, Bytecode var)
void hud_element_get_render_pos(s32 id, s32 *x, s32 *y)
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.
void hud_element_draw_clipped(s32 id)
void hud_element_free(s32 id)
@ HUD_ELEMENT_FLAG_DISABLED
BattleStatus gBattleStatus
void N init(Npc *bombette)