Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
MashActionCommandStart.inc.c
Go to the documentation of this file.
1API_CALLABLE(N(start)) {
2 u8 mashMeterCutoff;
3
4 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
5 BattleStatus* battleStatus = &gBattleStatus;
6 Bytecode* args = script->ptrReadPos;
7
8 if (battleStatus->actionCommandMode == 0) {
9 battleStatus->actionSuccess = 0;
10 return ApiStatus_DONE2;
11 }
12
14 actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
15 actionCommandStatus->duration = evt_get_variable(script, *args++);
16 actionCommandStatus->difficulty = evt_get_variable(script, *args++);
17 actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
18 actionCommandStatus->targetWeakness = evt_get_variable(script, *args++);
19 actionCommandStatus->wrongButtonPressed = FALSE;
20 actionCommandStatus->barFillLevel = 0;
21 actionCommandStatus->barFillWidth = 0;
22 battleStatus->actionSuccess = 0;
23 battleStatus->actionResult = ACTION_RESULT_NONE;
24 mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[(actionCommandStatus->mashMeterIntervals - 1)];
25 battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND;
26 actionCommandStatus->state = 10;
27 battleStatus->unk_82 = mashMeterCutoff;
29 return ApiStatus_DONE2;
30}
BSS ActionCommandStatus gActionCommandStatus
Definition action_cmd.c:91
s32 adjust_action_command_difficulty(s32 arg0)
Definition action_cmd.c:101
void action_command_init_status(void)
Definition action_cmd.c:256
void func_80269118(void)
Definition action_cmd.c:641
@ ACTION_RESULT_NONE
Definition enums.h:1963
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
BattleStatus gBattleStatus
Definition battle.c:11