126 {
131 s32 cutoff;
132 s32 offsetX;
133
134 switch (
acs->state) {
140 }
146 }
151 }
153 break;
156 if (
acs->hudPrepareTime != 0) {
157 acs->hudPrepareTime--;
158 } else {
160 if (
acs->hudPosX > 50) {
162 }
165
166 amt = 100 -
acs->escapeThreshold;
167 offsetX = 29 - (
amt * 60) / 100;
169 }
170 break;
173 if (
acs->prepareTime != 0) {
175 break;
176 }
178 acs->meterFillLevel = 0;
181 acs->stateTimer =
acs->duration;
184
185
188
189
190 if (!
acs->isMeterFilled) {
191 if (
acs->statusChance != 0) {
192 cutoff =
acs->mashMeterCutoffs[
acs->mashMeterNumIntervals];
194 if (
acs->meterFillLevel < 0) {
195 acs->meterFillLevel = 0;
196 }
197 } else {
198 acs->meterFillLevel -= 10;
199 if (
acs->meterFillLevel < 0) {
200 acs->meterFillLevel = 0;
201 }
202 }
203 }
204
205
207 if (
acs->statusChance != 0) {
210
211 acs->meterFillLevel +=
amt;
212 } else {
216 }
217 }
218 }
219
220
227 }
228
231
232 if (
acs->stateTimer != 0) {
234 break;
235 }
236
237 amt =
acs->meterFillLevel;
238 if (
acs->statusChance == 0) {
240 }
241
247 } else {
249 }
250
251
252 cutoff =
acs->mashMeterCutoffs[
acs->mashMeterNumIntervals - 1];
255 } else {
257 }
258
261 }
262
267 break;
269 if (
acs->statusChance == 0) {
271 if (
acs->meterFillLevel < 0) {
272 acs->meterFillLevel = 0;
273 }
274 }
275 if (
acs->stateTimer != 0) {
277 break;
278 }
280 break;
281 }
282
283
284
285 switch (
acs->state) {
289 if (
acs->thresholdMoveDir == 0) {
290 acs->escapeThreshold += 7;
291 if (
acs->escapeThreshold >= 100) {
292 acs->escapeThreshold = 100;
293 acs->thresholdMoveDir = 1;
294 }
295 } else {
296 acs->escapeThreshold -= 7;
297 if (
acs->escapeThreshold <= 0) {
298 acs->escapeThreshold = 0;
299 acs->thresholdMoveDir = 0;
300 }
301 }
302 }
303}
BSS s32 PopupMenu_SelectedIndex
BSS ActionCommandStatus gActionCommandStatus
void action_command_free(void)
void increment_action_command_success_count(void)
#define AC_QUALITY_FAILED
#define SCALE_BY_PCT(x, pct)
HudScript HES_MashAButton
@ SOUND_LOOP_CHARGE_METER
@ ACTION_RESULT_METER_BELOW_HALF
void btl_set_popup_duration(s32 duration)
void hud_element_set_alpha(s32 id, s32 opacity)
void hud_element_set_script(s32 id, HudScript *anim)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
void hud_element_clear_flags(s32 id, s32 flags)
Turns off the given flags.
@ HUD_ELEMENT_FLAG_DISABLED
#define GET_DRAIN_RATE(pct)
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)
BattleStatus gBattleStatus