diff --git a/include/common_structs.h b/include/common_structs.h index ac25aef456..2bc9e58ae7 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -912,8 +912,8 @@ typedef struct BattleStatus { /* 0x07B */ u8 damageTaken; /* 0x07C */ s8 changePartnerAllowed; /* 0x07D */ s8 menuStatus[4]; ///< -1 = automatically pick the first move, 0 = disabled, 1 = enabled - /* 0x081 */ s8 actionSuccess; // degree of success for action command, -1 indicates failure, 0 is in progress, >0 is some degree of success - /* 0x082 */ s8 maxActionSuccess; // seems to indicate the maximum positive value for actionSuccess; never read and inconsistently used between various action commands + /* 0x081 */ s8 actionQuality; // degree of success for action command, -1 indicates failure, 0 is in progress, >0 is some degree of success + /* 0x082 */ s8 maxActionQuality; // seems to indicate the maximum positive value for actionQuality; never read and inconsistently used between various action commands /* 0x083 */ s8 actionCommandMode; /* 0x084 */ s8 actionProgress; // actionCommandVar1 ? /* 0x085 */ s8 resultTier; diff --git a/include/enums.h b/include/enums.h index e981672216..a9602d37e7 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1961,12 +1961,12 @@ typedef enum HitResult { } HitResult; typedef enum ActionResult { - ACTION_RESULT_NONE = 127, - ACTION_RESULT_MINUS_4 = -4, - ACTION_RESULT_MINUS_2 = -2, - ACTION_RESULT_EARLY = -1, - ACTION_RESULT_FAIL = 0, - ACTION_RESULT_SUCCESS = 1, + ACTION_RESULT_NONE = 127, + ACTION_RESULT_METER_BELOW_HALF = -4, // certain mashing comamnds fail with this value + ACTION_RESULT_METER_NOT_ENOUGH = -2, // certain mashing comamnds fail with this value + ACTION_RESULT_EARLY = -1, // timing commands too early fail with this value + ACTION_RESULT_FAIL = 0, // simple failure to complete action command + ACTION_RESULT_SUCCESS = 1, } ActionResult; typedef enum BlockResult { diff --git a/include/script_api/battle.h b/include/script_api/battle.h index 3b82ac42e0..f55bf1025d 100644 --- a/include/script_api/battle.h +++ b/include/script_api/battle.h @@ -206,7 +206,7 @@ API_CALLABLE(EnablePlayerBlur); API_CALLABLE(PlayerBasicJumpToGoal); API_CALLABLE(PlayerSuperJumpToGoal); API_CALLABLE(PlayerUltraJumpToGoal); -API_CALLABLE(GetPlayerActionSuccess); +API_CALLABLE(GetPlayerActionQuality); API_CALLABLE(BindTakeTurn); API_CALLABLE(PauseTakeTurn); API_CALLABLE(ResumeTakeTurn); @@ -283,7 +283,7 @@ API_CALLABLE(SetBattleCamTargetingModes); API_CALLABLE(UseBattleCamPresetImmediately); API_CALLABLE(UseBattleCamPresetWait); API_CALLABLE(HideHealthBar); -API_CALLABLE(GetPartnerActionSuccess); +API_CALLABLE(GetPartnerActionQuality); API_CALLABLE(CreateNpc); API_CALLABLE(EnableBattleStatusBar); API_CALLABLE(PlayerYieldTurn); diff --git a/src/battle/action_cmd.c b/src/battle/action_cmd.c index 441fa344c5..ca76f4e768 100644 --- a/src/battle/action_cmd.c +++ b/src/battle/action_cmd.c @@ -677,13 +677,13 @@ API_CALLABLE(SetupMashMeter) { return ApiStatus_DONE2; } -API_CALLABLE(GetActionSuccess) { - evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess); +API_CALLABLE(GetSmashActionQuality) { + evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionQuality); return ApiStatus_DONE2; } API_CALLABLE(SetActionSuccess) { - gBattleStatus.actionSuccess = evt_get_variable(script, *script->ptrReadPos); + gBattleStatus.actionQuality = evt_get_variable(script, *script->ptrReadPos); return ApiStatus_DONE2; } @@ -764,12 +764,12 @@ API_CALLABLE(ShowActionHud) { return ApiStatus_DONE2; } -API_CALLABLE(GetActionSuccessCopy) { - evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess); +API_CALLABLE(GetMashActionQuality) { + evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionQuality); return ApiStatus_DONE2; } -API_CALLABLE(GetActionResult) { +API_CALLABLE(GetJumpActionQuality) { evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionResult); return ApiStatus_DONE2; } diff --git a/src/battle/action_cmd.h b/src/battle/action_cmd.h index 73fdc07bdd..d149549928 100644 --- a/src/battle/action_cmd.h +++ b/src/battle/action_cmd.h @@ -63,7 +63,7 @@ enum ActionCommandModes { AC_MODE_TUTORIAL_WAIT_INPUT = 3, }; -#define AC_ACTION_FAILED -1 +#define AC_QUALITY_FAILED -1 // mash meter has 100 units for each 1% #define ONE_PCT_MASH 100 @@ -205,7 +205,7 @@ s32 check_block_input(s32 buttonMask); API_CALLABLE(LoadActionCommand); API_CALLABLE(SetActionDifficultyTable); API_CALLABLE(SetupMashMeter); -API_CALLABLE(GetActionSuccess); +API_CALLABLE(GetSmashActionQuality); API_CALLABLE(SetActionSuccess); API_CALLABLE(SetActionCommandMode); API_CALLABLE(GetActionCommandMode); @@ -216,8 +216,8 @@ API_CALLABLE(func_802693F0); API_CALLABLE(InterruptActionCommand); API_CALLABLE(InterruptLeechActionCommand); API_CALLABLE(ShowActionHud); -API_CALLABLE(GetActionSuccessCopy); -API_CALLABLE(GetActionResult); +API_CALLABLE(GetMashActionQuality); +API_CALLABLE(GetJumpActionQuality); API_CALLABLE(SetActionResult); API_CALLABLE(GetBlockResult); API_CALLABLE(GetActionProgress); diff --git a/src/battle/action_cmd/air_lift.c b/src/battle/action_cmd/air_lift.c index fa976c561c..3dfd1a80b0 100644 --- a/src/battle/action_cmd/air_lift.c +++ b/src/battle/action_cmd/air_lift.c @@ -29,7 +29,7 @@ API_CALLABLE(N(init)) { s32 hid; battleStatus->actionCmdDifficultyTable = actionCmdTableAirLift; - battleStatus->maxActionSuccess = 0; + battleStatus->maxActionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; action_command_init_status(); @@ -47,7 +47,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionProgress = 0; N(HasStarted) = FALSE; @@ -90,9 +90,9 @@ API_CALLABLE(N(start)) { acs->variation = evt_get_variable(script, *args++); acs->wrongButtonPressed = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; acs->any.unk_5C = 0; @@ -202,15 +202,15 @@ void N(update)(void) { hud_element_clear_flags(hid, HUD_ELEMENT_FLAG_DISABLED); } - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; - if (battleStatus->actionProgress < battleStatus->actionSuccess) { - battleStatus->actionProgress = battleStatus->actionSuccess; + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; + if (battleStatus->actionProgress < battleStatus->actionQuality) { + battleStatus->actionProgress = battleStatus->actionQuality; } - sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionSuccess * 12); + sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12); if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } if (acs->escapeChance == 0) { @@ -218,16 +218,16 @@ void N(update)(void) { } // threshold for success is completely random, only guaranteed if the bar is 100% filled - battleStatus->actionSuccess = battleStatus->actionProgress; - if (rand_int(99) < battleStatus->actionSuccess) { + battleStatus->actionQuality = battleStatus->actionProgress; + if (rand_int(99) < battleStatus->actionQuality) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; - battleStatus->actionSuccess = 1; + battleStatus->actionQuality = 1; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; + battleStatus->actionQuality = AC_QUALITY_FAILED; } - if (battleStatus->actionSuccess == 1) { + if (battleStatus->actionQuality == 1) { increment_action_command_success_count(); } @@ -245,7 +245,7 @@ void N(update)(void) { } if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } action_command_free(); break; diff --git a/src/battle/action_cmd/air_raid.c b/src/battle/action_cmd/air_raid.c index 4b4be057fc..a23d1a1225 100644 --- a/src/battle/action_cmd/air_raid.c +++ b/src/battle/action_cmd/air_raid.c @@ -30,12 +30,12 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTableAirRaid; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -49,7 +49,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -80,7 +80,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -95,9 +95,9 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -243,23 +243,23 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } if (acs->barFillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; } cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionSuccess > cutoff) { + if (battleStatus->actionQuality > cutoff) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only count 100% fill as success for this action command increment_action_command_success_count(); } @@ -272,7 +272,7 @@ void N(update)(void) { case AC_STATE_DISPOSE: if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } action_command_free(); break; diff --git a/src/battle/action_cmd/body_slam.c b/src/battle/action_cmd/body_slam.c index 964638424c..7ff177589c 100644 --- a/src/battle/action_cmd/body_slam.c +++ b/src/battle/action_cmd/body_slam.c @@ -21,11 +21,11 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTableBodySlam; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -37,7 +37,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -73,7 +73,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -88,9 +88,9 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -190,20 +190,20 @@ void N(update)(void) { do { if (acs->escapeThreshold < MAX_MASH_UNITS) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { s32 window = battleStatus->actionCmdDifficultyTable[acs->difficulty] * METER_FILL_RATE; // release needs to be within 2 frames + modifier from difficulty table if (acs->escapeThreshold - window >= MAX_MASH_UNITS + 2 * METER_FILL_RATE + 1) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = 1; + battleStatus->actionQuality = 1; } } } while (0); // required to match battleStatus->actionResult = ACTION_RESULT_FAIL; - if (battleStatus->actionSuccess == 1) { + if (battleStatus->actionQuality == 1) { increment_action_command_success_count(); } diff --git a/src/battle/action_cmd/bomb.c b/src/battle/action_cmd/bomb.c index 105429d9a8..7f9ec79e5f 100644 --- a/src/battle/action_cmd/bomb.c +++ b/src/battle/action_cmd/bomb.c @@ -26,12 +26,12 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTableBomb; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -43,7 +43,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -75,7 +75,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -90,9 +90,9 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -195,19 +195,19 @@ void N(update)(void) { } if (acs->barFillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; } cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionSuccess > cutoff) { + if (battleStatus->actionQuality > cutoff) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only count 100% fill as success for this action command increment_action_command_success_count(); } diff --git a/src/battle/action_cmd/break_free.c b/src/battle/action_cmd/break_free.c index f803c8a702..e513b97605 100644 --- a/src/battle/action_cmd/break_free.c +++ b/src/battle/action_cmd/break_free.c @@ -21,12 +21,12 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 0; + battleStatus->maxActionQuality = 0; battleStatus->actionCmdDifficultyTable = actionCmdTableBreakFree; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -39,7 +39,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->escapeThreshold = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -76,7 +76,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -93,9 +93,9 @@ API_CALLABLE(N(start)) { acs->escapeThreshold = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; acs->escapeThreshold = rand_int(acs->escapeChance); acs->breakFree.dir = 0; @@ -207,18 +207,18 @@ void N(update)(void) { acs->barFillLevel += rand_int(SCALE_BY_PCT(25, battleStatus->actionCmdDifficultyTable[acs->difficulty])); } - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } - if (battleStatus->actionSuccess >= acs->mashMeterCutoffs[acs->mashMeterNumIntervals] - acs->escapeThreshold) { + if (battleStatus->actionQuality >= acs->mashMeterCutoffs[acs->mashMeterNumIntervals] - acs->escapeThreshold) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; - battleStatus->actionSuccess = 1; + battleStatus->actionQuality = 1; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; + battleStatus->actionQuality = AC_QUALITY_FAILED; } btl_set_popup_duration(POPUP_MSG_OFF); @@ -228,7 +228,7 @@ void N(update)(void) { case AC_STATE_DISPOSE: if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } action_command_free(); break; diff --git a/src/battle/action_cmd/dizzy_shell.c b/src/battle/action_cmd/dizzy_shell.c index 9fe891eff0..340f002b15 100644 --- a/src/battle/action_cmd/dizzy_shell.c +++ b/src/battle/action_cmd/dizzy_shell.c @@ -25,12 +25,12 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTableDizzyShell; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -43,7 +43,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -74,7 +74,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -89,9 +89,9 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -197,7 +197,7 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } fillLevel = acs->barFillLevel; @@ -206,20 +206,20 @@ void N(update)(void) { } if (fillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = fillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = fillLevel / ONE_PCT_MASH; } cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionSuccess >= cutoff) { + if (battleStatus->actionQuality >= cutoff) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only could 100% fill as success for this action command increment_action_command_success_count(); } @@ -238,7 +238,7 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } action_command_free(); break; diff --git a/src/battle/action_cmd/fire_shell.c b/src/battle/action_cmd/fire_shell.c index 655f699b0f..9df8d25888 100644 --- a/src/battle/action_cmd/fire_shell.c +++ b/src/battle/action_cmd/fire_shell.c @@ -30,12 +30,12 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTableFireShell; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } action_command_init_status(); @@ -48,7 +48,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -79,7 +79,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -94,9 +94,9 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -234,23 +234,23 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } if (acs->barFillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; } cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionSuccess > cutoff) { + if (battleStatus->actionQuality > cutoff) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only count 100% fill as success for this action command increment_action_command_success_count(); } @@ -263,7 +263,7 @@ void N(update)(void) { case AC_STATE_DISPOSE: if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } action_command_free(); break; diff --git a/src/battle/action_cmd/flee.c b/src/battle/action_cmd/flee.c index e2d9523aad..71f46de6c6 100644 --- a/src/battle/action_cmd/flee.c +++ b/src/battle/action_cmd/flee.c @@ -26,7 +26,7 @@ API_CALLABLE(N(init)) { s32 offsetX; s32 hid; - battleStatus->maxActionSuccess = 0; + battleStatus->maxActionQuality = 0; battleStatus->actionCmdDifficultyTable = actionCmdTableFlee; battleStatus->actionResult = ACTION_RESULT_NONE; @@ -43,7 +43,7 @@ API_CALLABLE(N(init)) { acs->flee.dir = 1; acs->escapeChance = rand_int(1); acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; N(HasStarted) = FALSE; acs->hudPosX = -48; acs->hudPosY = 80; @@ -98,9 +98,9 @@ API_CALLABLE(N(start)) { acs->difficulty = adjust_action_command_difficulty(acs->difficulty); acs->wrongButtonPressed = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -176,20 +176,23 @@ void N(update)(void) { hud_element_clear_flags(hid, HUD_ELEMENT_FLAG_DISABLED); } - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; - if (acs->stateTimer == 0) { - if (battleStatus->actionSuccess >= (100 - acs->escapeThreshold)) { - battleStatus->actionResult = ACTION_RESULT_SUCCESS; - battleStatus->actionSuccess = 1; - } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; - battleStatus->actionSuccess = AC_ACTION_FAILED; - } - acs->stateTimer = 20; - acs->state = AC_STATE_DISPOSE; - } else { + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; + + if (acs->stateTimer != 0) { acs->stateTimer--; + break; } + + if (battleStatus->actionQuality >= (100 - acs->escapeThreshold)) { + battleStatus->actionResult = ACTION_RESULT_SUCCESS; + battleStatus->actionQuality = 1; + } else { + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; + battleStatus->actionQuality = AC_QUALITY_FAILED; + } + + acs->stateTimer = 20; + acs->state = AC_STATE_DISPOSE; break; case AC_STATE_DISPOSE: if (acs->stateTimer != 0) { diff --git a/src/battle/action_cmd/hammer.c b/src/battle/action_cmd/hammer.c index b0ebfcef77..50056f3e13 100644 --- a/src/battle/action_cmd/hammer.c +++ b/src/battle/action_cmd/hammer.c @@ -21,12 +21,12 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 1; + battleStatus->maxActionQuality = 1; battleStatus->actionCmdDifficultyTable = actionCmdTableHammer; battleStatus->actionResult = ACTION_RESULT_FAIL; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionProgress = 0; return ApiStatus_DONE2; } @@ -90,7 +90,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionProgress = 0; return ApiStatus_DONE2; } @@ -108,7 +108,7 @@ API_CALLABLE(N(start)) { } acs->hammerMissedStart = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionProgress = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->state = AC_STATE_START; @@ -276,7 +276,7 @@ void N(update)(void) { && acs->autoSucceed == 0 && battleStatus->actionCommandMode < AC_MODE_TUTORIAL ) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; battleStatus->actionResult = ACTION_RESULT_EARLY; action_command_free(); return; @@ -290,14 +290,14 @@ void N(update)(void) { } // has the stick been released within the window? - if (battleStatus->actionSuccess == 0) { + if (battleStatus->actionQuality == 0) { for (i = 0; i < inputWindow; i++) { if (bufferPos >= ARRAY_COUNT(battleStatus->holdInputBuffer)) { bufferPos -= ARRAY_COUNT(battleStatus->holdInputBuffer); } if (!(battleStatus->holdInputBuffer[bufferPos] & BUTTON_STICK_LEFT) || acs->autoSucceed != 0) { - battleStatus->actionSuccess = 1; + battleStatus->actionQuality = 1; battleStatus->actionResult = ACTION_RESULT_SUCCESS; gBattleStatus.flags1 |= BS_FLAGS1_2000; } @@ -308,11 +308,11 @@ void N(update)(void) { if (battleStatus->actionCommandMode < AC_MODE_TUTORIAL || acs->stateTimer != acs->duration) { acs->stateTimer++; if (acs->duration < acs->stateTimer) { - if (battleStatus->actionSuccess == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + if (battleStatus->actionQuality == 0) { + battleStatus->actionQuality = AC_QUALITY_FAILED; } - if (battleStatus->actionSuccess == 1) { + if (battleStatus->actionQuality == 1) { increment_action_command_success_count(); } diff --git a/src/battle/action_cmd/hurricane.c b/src/battle/action_cmd/hurricane.c index 5be18ab98d..e19396af6c 100644 --- a/src/battle/action_cmd/hurricane.c +++ b/src/battle/action_cmd/hurricane.c @@ -25,10 +25,10 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 5; + battleStatus->maxActionQuality = 5; battleStatus->actionCmdDifficultyTable = actionCmdTableHurricane; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -77,7 +77,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -92,7 +92,7 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->state = AC_STATE_START; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; @@ -268,19 +268,20 @@ void N(update)(void) { } if (buttonsPushed == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = buttonsPushed / ONE_PCT_MASH; + battleStatus->actionQuality = buttonsPushed / ONE_PCT_MASH; } + // a good result is filling the bar over halfway to the second-highest interval cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; if (battleStatus->actionProgress <= cutoff / 2) { - battleStatus->actionResult = ACTION_RESULT_MINUS_4; + battleStatus->actionResult = ACTION_RESULT_METER_BELOW_HALF; } else { battleStatus->actionResult = ACTION_RESULT_SUCCESS; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only count 100% fill as success for this action command increment_action_command_success_count(); } @@ -288,7 +289,6 @@ void N(update)(void) { btl_set_popup_duration(POPUP_MSG_OFF); acs->stateTimer = 5; acs->state = AC_STATE_DISPOSE; - break; case AC_STATE_DISPOSE: if (acs->statusChance == 0) { @@ -300,9 +300,9 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - } else { - action_command_free(); + break; } + action_command_free(); break; } } diff --git a/src/battle/action_cmd/jump.c b/src/battle/action_cmd/jump.c index 8fc5865e6b..39a47679a7 100644 --- a/src/battle/action_cmd/jump.c +++ b/src/battle/action_cmd/jump.c @@ -15,12 +15,12 @@ API_CALLABLE(N(init)) { ActionCommandStatus* acs = &gActionCommandStatus; s32 hid; - gBattleStatus.maxActionSuccess = 1; + gBattleStatus.maxActionQuality = 1; gBattleStatus.actionCmdDifficultyTable = actionCmdTableJump; gBattleStatus.actionResult = ACTION_RESULT_FAIL; if (gBattleStatus.actionCommandMode == AC_MODE_NOT_LEARNED) { - gBattleStatus.actionSuccess = 0; + gBattleStatus.actionQuality = 0; return ApiStatus_DONE2; } @@ -55,7 +55,7 @@ API_CALLABLE(N(start)) { s32 hid; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -64,7 +64,7 @@ API_CALLABLE(N(start)) { acs->difficulty = evt_get_variable(script, *args++); acs->difficulty = adjust_action_command_difficulty(acs->difficulty); acs->wrongButtonPressed = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; hid = acs->hudElements[HIDX_BUTTON]; acs->hudPosX = 50; @@ -143,7 +143,7 @@ void N(update)(void) { } acs->stateTimer = battleStatus->actionCmdDifficultyTable[acs->difficulty]; - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; acs->state = AC_STATE_ACTIVE; // fallthrough @@ -156,7 +156,7 @@ void N(update)(void) { break; } } else { - if (battleStatus->actionSuccess >= 0) { + if (battleStatus->actionQuality >= 0) { hid = acs->hudElements[HIDX_BUTTON]; if (acs->showHud) { hud_element_set_flags(hid, HUD_ELEMENT_FLAG_DISABLED); @@ -165,16 +165,16 @@ void N(update)(void) { } // valid input is allowed during this state - if (battleStatus->actionSuccess < 0) { + if (battleStatus->actionQuality < 0) { if (((battleStatus->curButtonsPressed & BUTTON_A) && !acs->wrongButtonPressed) || acs->autoSucceed) { - battleStatus->actionSuccess = 1; + battleStatus->actionQuality = 1; battleStatus->actionResult = ACTION_RESULT_SUCCESS; gBattleStatus.flags1 |= BS_FLAGS1_2000; } } if (acs->stateTimer == 0) { - if (battleStatus->actionSuccess == 1) { + if (battleStatus->actionQuality == 1) { increment_action_command_success_count(); } if (battleStatus->actionCommandMode == AC_MODE_TUTORIAL) { diff --git a/src/battle/action_cmd/mega_shock.c b/src/battle/action_cmd/mega_shock.c index bdae0d442f..4dcd8b810e 100644 --- a/src/battle/action_cmd/mega_shock.c +++ b/src/battle/action_cmd/mega_shock.c @@ -1,4 +1,6 @@ #include "common.h" + + #include "audio/public.h" #include "battle/action_cmd.h" @@ -15,7 +17,7 @@ enum { }; // how much to add to the meter per input -#define METER_FILL_TICK 650 +#define METER_FILL_TICK 780 s32 N(DrainRateTable)[] = { 0, 25, 50, 75, 75 }; @@ -26,10 +28,10 @@ API_CALLABLE(N(init)) { ActionCommandStatus* acs = &gActionCommandStatus; s32 hid; - battleStatus->maxActionSuccess = 5; + battleStatus->maxActionQuality = 5; battleStatus->actionCmdDifficultyTable = actionCmdTableMegaShock; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -78,7 +80,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -93,7 +95,7 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->state = AC_STATE_START; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; @@ -210,7 +212,7 @@ void N(update)(void) { if (acs->statusChance != 0) { s32 amt; - amt = SCALE_BY_PCT(780, acs->statusChance); + amt = SCALE_BY_PCT(METER_FILL_TICK, acs->statusChance); amt = SCALE_BY_PCT(amt, battleStatus->actionCmdDifficultyTable[acs->difficulty]); // Perplexing reuse of buttonsPushed here, but it fixes register allocation. Likely another @@ -256,39 +258,42 @@ void N(update)(void) { battleStatus->actionProgress = acs->barFillLevel / ONE_PCT_MASH; sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionProgress * 12); - if (acs->stateTimer == 0) { - // Again, reusing buttonsPushed specifically for reg-alloc. See above. - // - // TODO: Find a way to avoid reusing buttonsPushed. - buttonsPushed = acs->barFillLevel; - if (acs->statusChance == 0) { - buttonsPushed = 0; - } - - if (buttonsPushed == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; - } else { - battleStatus->actionSuccess = buttonsPushed / ONE_PCT_MASH; - } + if (acs->stateTimer != 0) { + acs->stateTimer--; + break; + } - cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionProgress <= cutoff / 2) { - battleStatus->actionResult = ACTION_RESULT_MINUS_4; - } else { - battleStatus->actionResult = ACTION_RESULT_SUCCESS; - } + // Again, reusing buttonsPushed specifically for reg-alloc. See above. + // + // TODO: Find a way to avoid reusing buttonsPushed. + buttonsPushed = acs->barFillLevel; + if (acs->statusChance == 0) { + buttonsPushed = 0; + } - if (battleStatus->actionSuccess == 100) { - increment_action_command_success_count(); - } + if (buttonsPushed == 0) { + battleStatus->actionQuality = AC_QUALITY_FAILED; + } else { + battleStatus->actionQuality = buttonsPushed / ONE_PCT_MASH; + } - sfx_stop_sound(SOUND_LOOP_CHARGE_BAR); - btl_set_popup_duration(POPUP_MSG_OFF); - acs->stateTimer = 5; - acs->state = AC_STATE_DISPOSE; + // a good result is filling the bar over halfway to the second-highest interval + cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; + if (battleStatus->actionProgress <= cutoff / 2) { + battleStatus->actionResult = ACTION_RESULT_METER_BELOW_HALF; } else { - acs->stateTimer--; + battleStatus->actionResult = ACTION_RESULT_SUCCESS; } + + if (battleStatus->actionQuality == 100) { + // only count 100% fill as success for this action command + increment_action_command_success_count(); + } + + sfx_stop_sound(SOUND_LOOP_CHARGE_BAR); + btl_set_popup_duration(POPUP_MSG_OFF); + acs->stateTimer = 5; + acs->state = AC_STATE_DISPOSE; break; case AC_STATE_DISPOSE: if (acs->statusChance == 0) { @@ -300,9 +305,9 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - } else { - action_command_free(); + break; } + action_command_free(); break; } } diff --git a/src/battle/action_cmd/power_shock.c b/src/battle/action_cmd/power_shock.c index abd6f627cb..386fa76ff5 100644 --- a/src/battle/action_cmd/power_shock.c +++ b/src/battle/action_cmd/power_shock.c @@ -25,8 +25,13 @@ enum { HIDX_OK = 4, }; +// how much to add to the meter per input +#define METER_FILL_TICK 850 + s32 N(DrainRateTable)[] = { 0, 25, 50, 75, 75 }; +#define GET_DRAIN_RATE(pct) (N(DrainRateTable)[((pct) / (ONE_PCT_MASH / 5))]) + BSS s32 N(HasStarted); API_CALLABLE(N(init)) { @@ -35,11 +40,11 @@ API_CALLABLE(N(init)) { s32 hid; s32 offsetX; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTablePowerShock; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -93,7 +98,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -108,7 +113,7 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->state = AC_STATE_START; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; @@ -185,7 +190,7 @@ void N(update)(void) { if (!acs->isBarFilled) { if (acs->statusChance != 0) { cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals]; - acs->barFillLevel -= N(DrainRateTable)[acs->barFillLevel / cutoff / 20]; + acs->barFillLevel -= GET_DRAIN_RATE(acs->barFillLevel / cutoff); if (acs->barFillLevel < 0) { acs->barFillLevel = 0; } @@ -201,7 +206,7 @@ void N(update)(void) { if (battleStatus->curButtonsPressed & BUTTON_A) { if (acs->statusChance != 0) { s32 difficultyPct = battleStatus->actionCmdDifficultyTable[acs->difficulty]; - amt = SCALE_BY_PCT(SCALE_BY_PCT(850, difficultyPct), acs->statusChance); + amt = SCALE_BY_PCT(SCALE_BY_PCT(METER_FILL_TICK, difficultyPct), acs->statusChance); acs->barFillLevel += amt; } else { @@ -236,21 +241,22 @@ void N(update)(void) { battleStatus->actionProgress = amt / ONE_PCT_MASH; if (amt == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else if (battleStatus->actionProgress >= acs->escapeThreshold) { - battleStatus->actionSuccess = 1; + battleStatus->actionQuality = 1; } else { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; } + // a good result is filling the bar over halfway to the second-highest interval cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (cutoff / 2 < battleStatus->actionProgress) { - battleStatus->actionResult = ACTION_RESULT_SUCCESS; + if (battleStatus->actionProgress <= cutoff / 2) { + battleStatus->actionResult = ACTION_RESULT_METER_BELOW_HALF; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_4; + battleStatus->actionResult = ACTION_RESULT_SUCCESS; } - if (battleStatus->actionSuccess == 1) { + if (battleStatus->actionQuality == 1) { increment_action_command_success_count(); } diff --git a/src/battle/action_cmd/smack.c b/src/battle/action_cmd/smack.c index 7b1cbdcf99..a40c8d0466 100644 --- a/src/battle/action_cmd/smack.c +++ b/src/battle/action_cmd/smack.c @@ -33,11 +33,11 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTableSmack; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } action_command_init_status(); @@ -49,7 +49,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionProgress = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -81,7 +81,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -96,9 +96,9 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -260,32 +260,32 @@ void N(update)(void) { break; } - if (acs->stateTimer == 0) { - if (acs->barFillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; - } else { - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; - } + if (acs->stateTimer != 0) { + acs->stateTimer--; + break; + } - cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionSuccess > cutoff) { - battleStatus->actionResult = ACTION_RESULT_SUCCESS; - } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; - } + if (acs->barFillLevel == 0) { + battleStatus->actionQuality = AC_QUALITY_FAILED; + } else { + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; + } - if (battleStatus->actionSuccess == 100) { - increment_action_command_success_count(); - } + cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; + if (battleStatus->actionQuality > cutoff) { + battleStatus->actionResult = ACTION_RESULT_SUCCESS; + } else { + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; + } - btl_set_popup_duration(POPUP_MSG_OFF); - sfx_stop_sound(SOUND_LOOP_CHARGE_BAR); - acs->stateTimer = 5; - acs->state = AC_STATE_DISPOSE; - break; + if (battleStatus->actionQuality == 100) { + increment_action_command_success_count(); } - acs->stateTimer--; + btl_set_popup_duration(POPUP_MSG_OFF); + sfx_stop_sound(SOUND_LOOP_CHARGE_BAR); + acs->stateTimer = 5; + acs->state = AC_STATE_DISPOSE; break; case AC_STATE_DISPOSE: if (acs->stateTimer != 0) { diff --git a/src/battle/action_cmd/spiny_surge.c b/src/battle/action_cmd/spiny_surge.c index 0a7f9dc159..fff0695136 100644 --- a/src/battle/action_cmd/spiny_surge.c +++ b/src/battle/action_cmd/spiny_surge.c @@ -26,11 +26,11 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 16; + battleStatus->maxActionQuality = 16; battleStatus->actionCmdDifficultyTable = actionCmdTableSpinySurge; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -42,7 +42,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->hudPrepareTime = 30; acs->hudPosX = -48; @@ -75,7 +75,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -89,7 +89,7 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; acs->state = AC_STATE_START; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; @@ -203,31 +203,31 @@ void N(update)(void) { ) { acs->spinySurge.tossState = SPINY_SURGE_THROW; } - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; PrevButtons = battleStatus->curButtonsDown; battleStatus->actionProgress = acs->spinySurge.tossState; - sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionSuccess * 12); + sfx_adjust_env_sound_params(SOUND_LOOP_CHARGE_BAR, 0, 0, battleStatus->actionQuality * 12); if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } if (acs->barFillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; } cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionSuccess > cutoff) { + if (battleStatus->actionQuality > cutoff) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only count 100% fill as success for this action command increment_action_command_success_count(); } @@ -240,9 +240,9 @@ void N(update)(void) { case AC_STATE_DISPOSE: if (acs->stateTimer != 0) { acs->stateTimer--; - } else { - action_command_free(); + break; } + action_command_free(); break; } } diff --git a/src/battle/action_cmd/spook.c b/src/battle/action_cmd/spook.c index be7cabeb6f..183f9579f3 100644 --- a/src/battle/action_cmd/spook.c +++ b/src/battle/action_cmd/spook.c @@ -25,11 +25,11 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTableSpook; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } action_command_init_status(); @@ -41,7 +41,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionProgress = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -73,7 +73,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -88,9 +88,9 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -227,7 +227,7 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } fillLevel = acs->barFillLevel; @@ -236,20 +236,20 @@ void N(update)(void) { } if (fillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = fillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = fillLevel / ONE_PCT_MASH; } cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionSuccess > cutoff) { + if (battleStatus->actionQuality > cutoff) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only count 100% fill as success for this action command increment_action_command_success_count(); } @@ -269,7 +269,7 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } action_command_free(); break; diff --git a/src/battle/action_cmd/squirt.c b/src/battle/action_cmd/squirt.c index d14c418afa..e7fdaf69dc 100644 --- a/src/battle/action_cmd/squirt.c +++ b/src/battle/action_cmd/squirt.c @@ -26,10 +26,10 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 5; + battleStatus->maxActionQuality = 5; battleStatus->actionCmdDifficultyTable = actionCmdTableSquirt; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -66,7 +66,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -80,7 +80,7 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->state = AC_STATE_START; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; @@ -187,24 +187,24 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } if (acs->barFillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = battleStatus->actionProgress; + battleStatus->actionQuality = battleStatus->actionProgress; } // a good result is filling the bar over halfway to the second-highest interval cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (cutoff / 2 < battleStatus->actionProgress) { - battleStatus->actionResult = ACTION_RESULT_SUCCESS; + if (battleStatus->actionProgress <= cutoff / 2) { + battleStatus->actionResult = ACTION_RESULT_METER_BELOW_HALF; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_4; + battleStatus->actionResult = ACTION_RESULT_SUCCESS; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only count 100% fill as success for this action command increment_action_command_success_count(); } @@ -217,9 +217,9 @@ void N(update)(void) { case AC_STATE_DISPOSE: if (acs->stateTimer != 0) { acs->stateTimer--; - } else { - action_command_free(); + break; } + action_command_free(); break; } } diff --git a/src/battle/action_cmd/stop_leech.c b/src/battle/action_cmd/stop_leech.c index 736c91edb1..985dad11a6 100644 --- a/src/battle/action_cmd/stop_leech.c +++ b/src/battle/action_cmd/stop_leech.c @@ -24,10 +24,10 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 5; + battleStatus->maxActionQuality = 5; battleStatus->actionCmdDifficultyTable = actionCmdTableStopLeech; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -61,7 +61,7 @@ API_CALLABLE(N(start)) { BattleStatus* battleStatus = &gBattleStatus; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -75,7 +75,7 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->state = AC_STATE_START; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; @@ -156,7 +156,7 @@ void N(update)(void) { acs->stateTimer--; break; } - battleStatus->actionSuccess = 1; + battleStatus->actionQuality = 1; battleStatus->actionResult = ACTION_RESULT_NONE; action_command_free(); default: diff --git a/src/battle/action_cmd/three_chances.c b/src/battle/action_cmd/three_chances.c index 803013d1cb..d464d09b0c 100644 --- a/src/battle/action_cmd/three_chances.c +++ b/src/battle/action_cmd/three_chances.c @@ -94,11 +94,11 @@ API_CALLABLE(N(init)) { Bytecode* args = script->ptrReadPos; s32 hid; - battleStatus->maxActionSuccess = 5; + battleStatus->maxActionQuality = 5; battleStatus->actionCmdDifficultyTable = (s32*)actionCmdTableWaterBlock; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -198,7 +198,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -213,7 +213,7 @@ API_CALLABLE(N(start)) { acs->barFillLevel = 0; acs->barFillWidth = 0; battleStatus->actionProgress = 1; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->state = 10; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; @@ -606,12 +606,12 @@ void N(update)(void) { break; case THREE_CHANCES_STATE_WRAPUP: if (battleStatus->actionProgress == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = battleStatus->actionProgress; + battleStatus->actionQuality = battleStatus->actionProgress; } battleStatus->actionResult = ACTION_RESULT_SUCCESS; - if (battleStatus->actionSuccess == 3) { + if (battleStatus->actionQuality == 3) { increment_action_command_success_count(); } btl_set_popup_duration(POPUP_MSG_OFF); diff --git a/src/battle/action_cmd/tidal_wave.c b/src/battle/action_cmd/tidal_wave.c index 823ce08a77..fd915201cb 100644 --- a/src/battle/action_cmd/tidal_wave.c +++ b/src/battle/action_cmd/tidal_wave.c @@ -39,11 +39,11 @@ API_CALLABLE(N(init)) { s32 hid; s32 i; - battleStatus->maxActionSuccess = 5; + battleStatus->maxActionQuality = 5; battleStatus->actionCmdDifficultyTable = actionCmdTableTidalWave; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -81,7 +81,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -95,7 +95,7 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionProgress = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; acs->state = TIDAL_WAVE_STATE_START; @@ -296,12 +296,12 @@ void N(update)(void) { break; case TIDAL_WAVE_STATE_WRAPUP: if (battleStatus->actionProgress == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = battleStatus->actionProgress; + battleStatus->actionQuality = battleStatus->actionProgress; } battleStatus->actionResult = ACTION_RESULT_SUCCESS; - if (battleStatus->actionSuccess >= 10) { + if (battleStatus->actionQuality >= 10) { increment_action_command_success_count(); } btl_set_popup_duration(POPUP_MSG_OFF); diff --git a/src/battle/action_cmd/unused_flee.c b/src/battle/action_cmd/unused_flee.c index 700c808c16..f1fdb026a3 100644 --- a/src/battle/action_cmd/unused_flee.c +++ b/src/battle/action_cmd/unused_flee.c @@ -34,7 +34,7 @@ API_CALLABLE(N(init)) { s32 hid; s32 temp; - battleStatus->maxActionSuccess = 5; + battleStatus->maxActionQuality = 5; battleStatus->actionCmdDifficultyTable = actionCmdTable07; acs->autoSucceed = FALSE; @@ -83,7 +83,7 @@ API_CALLABLE(N(start)) { acs->difficulty = adjust_action_command_difficulty(acs->difficulty); acs->wrongButtonPressed = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; @@ -143,7 +143,7 @@ void N(update)(void) { } hud_element_set_script(acs->hudElements[HIDX_BUTTON], &HES_MashAButton); - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; N(HasStarted) = TRUE; acs->flee.drainDelay = 0; acs->state = AC_STATE_ACTIVE; @@ -173,7 +173,7 @@ void N(update)(void) { acs->flee.drainDelay--; if (acs->flee.drainDelay == 0) { acs->barFillLevel = 0; - battleStatus->actionSuccess++; + battleStatus->actionQuality++; } } diff --git a/src/battle/action_cmd/unused_mash_a.c b/src/battle/action_cmd/unused_mash_a.c index 7d48642949..a507e33bd5 100644 --- a/src/battle/action_cmd/unused_mash_a.c +++ b/src/battle/action_cmd/unused_mash_a.c @@ -26,12 +26,12 @@ API_CALLABLE(N(init)) { BattleStatus* battleStatus = &gBattleStatus; s32 hid; - battleStatus->maxActionSuccess = 100; + battleStatus->maxActionQuality = 100; battleStatus->actionCmdDifficultyTable = actionCmdTable0A; battleStatus->actionResult = ACTION_RESULT_NONE; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -44,7 +44,7 @@ API_CALLABLE(N(init)) { acs->barFillLevel = 0; acs->barFillWidth = 0; acs->isBarFilled = FALSE; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; acs->hudPosX = -48; acs->hudPosY = 80; @@ -75,7 +75,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -90,9 +90,9 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->maxActionSuccess = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; + battleStatus->maxActionQuality = acs->mashMeterCutoffs[(acs->mashMeterNumIntervals - 1)]; battleStatus->flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND; acs->state = AC_STATE_START; @@ -171,23 +171,23 @@ void N(update)(void) { if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } if (acs->barFillLevel == 0) { - battleStatus->actionSuccess = AC_ACTION_FAILED; + battleStatus->actionQuality = AC_QUALITY_FAILED; } else { - battleStatus->actionSuccess = acs->barFillLevel / ONE_PCT_MASH; + battleStatus->actionQuality = acs->barFillLevel / ONE_PCT_MASH; } cutoff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals - 1]; - if (battleStatus->actionSuccess >= cutoff) { + if (battleStatus->actionQuality >= cutoff) { battleStatus->actionResult = ACTION_RESULT_SUCCESS; } else { - battleStatus->actionResult = ACTION_RESULT_MINUS_2; + battleStatus->actionResult = ACTION_RESULT_METER_NOT_ENOUGH; } - if (battleStatus->actionSuccess == 100) { + if (battleStatus->actionQuality == 100) { // only count 100% fill as success for this action command increment_action_command_success_count(); } @@ -199,7 +199,7 @@ void N(update)(void) { case AC_STATE_DISPOSE: if (acs->stateTimer != 0) { acs->stateTimer--; - return; + break; } action_command_free(); break; diff --git a/src/battle/action_cmd/whirlwind.c b/src/battle/action_cmd/whirlwind.c index 5afb22cb7d..e81a879367 100644 --- a/src/battle/action_cmd/whirlwind.c +++ b/src/battle/action_cmd/whirlwind.c @@ -77,10 +77,10 @@ API_CALLABLE(N(init)) { Bytecode* args = script->ptrReadPos; s32 hid; - battleStatus->maxActionSuccess = 5; + battleStatus->maxActionQuality = 5; battleStatus->actionCmdDifficultyTable = actionCmdTableWhirlwind; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -132,7 +132,7 @@ API_CALLABLE(N(start)) { Bytecode* args = script->ptrReadPos; if (battleStatus->actionCommandMode == AC_MODE_NOT_LEARNED) { - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; return ApiStatus_DONE2; } @@ -146,7 +146,7 @@ API_CALLABLE(N(start)) { acs->wrongButtonPressed = FALSE; acs->barFillLevel = 0; acs->barFillWidth = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_FAIL; if (acs->variation == ACV_WHIRLWIND_HUFF) { battleStatus->actionProgress = 0; @@ -268,7 +268,7 @@ void N(update)(void) { return; } battleStatus->actionResult = ACTION_RESULT_NONE; - battleStatus->actionSuccess = battleStatus->actionProgress; + battleStatus->actionQuality = battleStatus->actionProgress; btl_set_popup_duration(POPUP_MSG_OFF); acs->stateTimer = 5; acs->state = AC_STATE_DISPOSE; diff --git a/src/battle/area/flo2/actor/huff_n_puff.c b/src/battle/area/flo2/actor/huff_n_puff.c index 649f3be6c7..7d02186cfc 100644 --- a/src/battle/area/flo2/actor/huff_n_puff.c +++ b/src/battle/area/flo2/actor/huff_n_puff.c @@ -3004,7 +3004,7 @@ EvtScript N(EVS_Attack_TuffPuffSwarm) = { Call(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_NICE_HIT) Add(LVarD, 1) EndIf - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) IfEq(LVar0, 1) BreakLoop EndIf diff --git a/src/battle/area/hos/actor/goombario_tutor.c b/src/battle/area/hos/actor/goombario_tutor.c index 58120fc556..5f8f0560a8 100644 --- a/src/battle/area/hos/actor/goombario_tutor.c +++ b/src/battle/area/hos/actor/goombario_tutor.c @@ -506,7 +506,7 @@ EvtScript N(EVS_ManageTutorial) = { Call(SetActionCommandMode, AC_MODE_LEARNED) Call(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN) Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) - Call(GetActionResult, LVar0) + Call(GetJumpActionQuality, LVar0) Switch(LVar0) CaseEq(ACTION_RESULT_EARLY) Call(ActorSpeak, MSG_HOS_002A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) diff --git a/src/battle/area/iwa/actor/buzzar.c b/src/battle/area/iwa/actor/buzzar.c index efeec498f7..4b651b62ee 100644 --- a/src/battle/area/iwa/actor/buzzar.c +++ b/src/battle/area/iwa/actor/buzzar.c @@ -955,7 +955,7 @@ EvtScript N(EVS_Attack_GrappleDrop) = { Call(action_command_break_free_start, 0, 60 * DT, 30, AC_DIFFICULTY_3) ExecGetTID(N(EVS_LiftMario), LVarA) Wait(62) - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) IfGt(LVar0, 0) Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) Wait(2) diff --git a/src/battle/area/tik2/actor/blooper_baby.c b/src/battle/area/tik2/actor/blooper_baby.c index 816574d0cc..6ffccd8365 100644 --- a/src/battle/area/tik2/actor/blooper_baby.c +++ b/src/battle/area/tik2/actor/blooper_baby.c @@ -493,7 +493,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) Set(LFlag0, FALSE) Loop(10) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -509,7 +509,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -524,7 +524,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.1), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -539,7 +539,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.2), Float(1.0)) Set(LFlag0, FALSE) Loop(3) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -554,7 +554,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -601,7 +601,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) Set(LFlag0, FALSE) Loop(3) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -616,7 +616,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.2), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -631,7 +631,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.1), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -652,7 +652,7 @@ EvtScript N(EVS_TakeTurn) = { EndIf Set(LFlag0, FALSE) Loop(12) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop diff --git a/src/battle/btl_states_actions.c b/src/battle/btl_states_actions.c index ffa27ed7e4..f28f4b8065 100644 --- a/src/battle/btl_states_actions.c +++ b/src/battle/btl_states_actions.c @@ -270,8 +270,8 @@ void btl_state_update_normal_start(void) { if (is_ability_active(ABILITY_MYSTERY_SCROLL)) { battleStatus->actionCommandMode = AC_MODE_LEARNED; } - battleStatus->actionSuccess = 0; - battleStatus->maxActionSuccess = 0; + battleStatus->actionQuality = 0; + battleStatus->maxActionQuality = 0; battleStatus->enabledMenusFlags = -1; battleStatus->enabledStarPowersFlags = -1; battleStatus->itemUsesLeft = 0; @@ -3598,7 +3598,7 @@ void btl_state_update_enemy_move(void) { } battleStatus->stateFreezeCount = 0; battleStatus->lastAttackDamage = 0; - battleStatus->actionSuccess = 0; + battleStatus->actionQuality = 0; battleStatus->actionResult = ACTION_RESULT_NONE; battleStatus->blockResult = BLOCK_RESULT_NONE; battleStatus->curDamageSource = DMG_SRC_DEFAULT; diff --git a/src/battle/common/actor/jungle_fuzzy.inc.c b/src/battle/common/actor/jungle_fuzzy.inc.c index 5ebc7bef8a..9a13352df0 100644 --- a/src/battle/common/actor/jungle_fuzzy.inc.c +++ b/src/battle/common/actor/jungle_fuzzy.inc.c @@ -455,7 +455,7 @@ EvtScript N(EVS_Attack_Leech) = { Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Bite) Set(LFlag0, FALSE) Loop(21) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -473,7 +473,7 @@ EvtScript N(EVS_Attack_Leech) = { Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -487,7 +487,7 @@ EvtScript N(EVS_Attack_Leech) = { Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -501,7 +501,7 @@ EvtScript N(EVS_Attack_Leech) = { Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -515,7 +515,7 @@ EvtScript N(EVS_Attack_Leech) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -529,7 +529,7 @@ EvtScript N(EVS_Attack_Leech) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -543,7 +543,7 @@ EvtScript N(EVS_Attack_Leech) = { Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) Set(LFlag0, FALSE) Loop(10) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -556,7 +556,7 @@ EvtScript N(EVS_Attack_Leech) = { EndIf Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -605,7 +605,7 @@ EvtScript N(EVS_Attack_Leech) = { EndIf Set(LFlag0, FALSE) Loop(35) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop diff --git a/src/battle/common/actor/swoopula.inc.c b/src/battle/common/actor/swoopula.inc.c index e14c926373..8f340f6bb6 100644 --- a/src/battle/common/actor/swoopula.inc.c +++ b/src/battle/common/actor/swoopula.inc.c @@ -577,7 +577,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) Set(LFlag0, FALSE) Loop(21) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -595,7 +595,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -609,7 +609,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -623,7 +623,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -637,7 +637,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -651,7 +651,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -665,7 +665,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -679,7 +679,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -693,7 +693,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -707,7 +707,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -724,7 +724,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { EndIf Set(LFlag0, FALSE) Loop(5) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -739,7 +739,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -753,7 +753,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -767,7 +767,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -781,7 +781,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -795,7 +795,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -809,7 +809,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) Set(LFlag0, FALSE) Loop(10) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -823,7 +823,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -868,7 +868,7 @@ EvtScript N(EVS_Flying_TakeTurn) = { EndIf Set(LFlag0, FALSE) Loop(30) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1027,7 +1027,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) Set(LFlag0, FALSE) Loop(21) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1044,7 +1044,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1058,7 +1058,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1072,7 +1072,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1086,7 +1086,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) Set(LFlag0, FALSE) Loop(1) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1100,7 +1100,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1114,7 +1114,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) Set(LFlag0, FALSE) Loop(10) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1128,7 +1128,7 @@ EvtScript N(EVS_TakeTurn) = { Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) Set(LFlag0, FALSE) Loop(2) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop @@ -1173,7 +1173,7 @@ EvtScript N(EVS_TakeTurn) = { EndIf Set(LFlag0, FALSE) Loop(35) - Call(GetActionSuccessCopy, LVar1) + Call(GetMashActionQuality, LVar1) IfEq(LVar1, 1) Set(LFlag0, TRUE) BreakLoop diff --git a/src/battle/common/move/HammerSupport.inc.c b/src/battle/common/move/HammerSupport.inc.c index 90fb228cb3..46bb472ee5 100644 --- a/src/battle/common/move/HammerSupport.inc.c +++ b/src/battle/common/move/HammerSupport.inc.c @@ -3,6 +3,13 @@ #include "battle/action_cmd/hammer.h" #include "sprite/player.h" +#define BASIC_HAMMER_DMG_BAD 1 +#define BASIC_HAMMER_DMG_GOOD 2 +#define SUPER_HAMMER_DMG_BAD 2 +#define SUPER_HAMMER_DMG_GOOD 4 +#define ULTRA_HAMMER_DMG_BAD 3 +#define ULTRA_HAMMER_DMG_GOOD 6 + API_CALLABLE(N(IsBerserkerEquipped)) { script->varTable[0] = gBattleStatus.actionCommandMode; script->varTable[1] = 15; @@ -285,7 +292,7 @@ EvtScript N(EVS_UseBasicHammer) = { Call(GetActionCommandMode, LVar0) IfLt(LVar0, AC_MODE_TUTORIAL) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -366,7 +373,7 @@ EvtScript N(EVS_UseSuperHammer) = { EndLoop Label(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -435,7 +442,7 @@ EvtScript N(EVS_UseUltraHammer) = { EndLoop Label(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -502,7 +509,7 @@ EvtScript N(EVS_Hammer_UseBasicQuake) = { EndLoop Label(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -551,7 +558,7 @@ EvtScript N(EVS_Hammer_UseSuperQuake) = { EndLoop Label(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -600,7 +607,7 @@ EvtScript N(EVS_Hammer_UseUltraQuake) = { EndLoop Label(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf diff --git a/src/battle/common/move/JumpSupport.inc.c b/src/battle/common/move/JumpSupport.inc.c index 944fc4fe5b..2e5f13968d 100644 --- a/src/battle/common/move/JumpSupport.inc.c +++ b/src/battle/common/move/JumpSupport.inc.c @@ -335,7 +335,7 @@ EvtScript N(EVS_JumpSupport_UnusedSuper) = { Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) Call(PlayerSuperJumpToGoal, LVarA, PLAYER_SUPER_JUMP_0) Wait(7) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(PlayerSuperJumpToGoal, 3, PLAYER_SUPER_JUMP_1) @@ -362,7 +362,7 @@ EvtScript N(EVS_JumpSupport_UnusedUltra) = { Call(PlayerUltraJumpToGoal, LVarA, PLAYER_ULTRA_JUMP_0) Call(InterruptActionCommand) Set(LVar9, 0) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) IfGt(LVar0, 0) Set(LVar9, 1) Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Stomp) diff --git a/src/battle/dmg_partner.c b/src/battle/dmg_partner.c index db3d348a69..b2524ae697 100644 --- a/src/battle/dmg_partner.c +++ b/src/battle/dmg_partner.c @@ -1382,21 +1382,21 @@ API_CALLABLE(DeletePartner) { return ApiStatus_DONE2; } -API_CALLABLE(GetPartnerActionSuccess) { - BattleStatus* battleStatus = &gBattleStatus; - s32 var = *script->ptrReadPos; - s32 actionSuccess = battleStatus->actionSuccess; - s32 outVal = 0; +API_CALLABLE(GetPartnerActionQuality) { + Bytecode* args = script->ptrReadPos; + s32 outVar = *args++; + s32 actionQuality = gBattleStatus.actionQuality; + s32 quality = 0; - if (actionSuccess < 0) { - actionSuccess = 0; + if (actionQuality < 0) { + actionQuality = 0; } - if (actionSuccess > outVal) { - outVal = actionSuccess; + if (quality < actionQuality) { + quality = actionQuality; } - evt_set_variable(script, var, outVal); + evt_set_variable(script, outVar, quality); return ApiStatus_DONE2; } diff --git a/src/battle/dmg_player.c b/src/battle/dmg_player.c index 8cb3535795..3d2d4532b8 100644 --- a/src/battle/dmg_player.c +++ b/src/battle/dmg_player.c @@ -2507,21 +2507,21 @@ API_CALLABLE(PlayerUltraJumpToGoal) { return ApiStatus_BLOCK; } -API_CALLABLE(GetPlayerActionSuccess) { +API_CALLABLE(GetPlayerActionQuality) { Bytecode* args = script->ptrReadPos; s32 outVar = *args++; - s32 actionSuccess = gBattleStatus.actionSuccess; - s32 actionSucceeded = 0; + s32 actionQuality = gBattleStatus.actionQuality; + s32 quality = 0; - if (actionSuccess < 0) { - actionSuccess = 0; + if (actionQuality < 0) { + actionQuality = 0; } - if (actionSucceeded < actionSuccess) { - actionSucceeded = actionSuccess; + if (quality < actionQuality) { + quality = actionQuality; } - evt_set_variable(script, outVar, actionSucceeded); + evt_set_variable(script, outVar, quality); return ApiStatus_DONE2; } diff --git a/src/battle/move/hammer/attack.c b/src/battle/move/hammer/attack.c index a159679c09..bc905e9de3 100644 --- a/src/battle/move/hammer/attack.c +++ b/src/battle/move/hammer/attack.c @@ -44,7 +44,7 @@ EvtScript N(EVS_UseMove_Impl) = { CaseEq(2) ExecWait(N(EVS_UseUltraHammer)) EndSwitch - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) // incorrect use, should use GetSmashActionQuality Switch(LVar0) CaseGt(0) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -92,7 +92,7 @@ EvtScript N(EVS_UseMove_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -266,7 +266,7 @@ EvtScript N(EVS_UseBerserker_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) // incorrect use, should use GetSmashActionQuality Switch(LVar0) CaseGt(0) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -314,7 +314,7 @@ EvtScript N(EVS_UseBerserker_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/auto_smash.c b/src/battle/move/hammer/auto_smash.c index 270248d1f4..d74e632356 100644 --- a/src/battle/move/hammer/auto_smash.c +++ b/src/battle/move/hammer/auto_smash.c @@ -13,19 +13,19 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 45) - Set(LVarE, 1) - Set(LVarF, 2) + Set(LVarD, 45) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 45) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 45) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 45) - Set(LVarE, 3) - Set(LVarF, 6) + Set(LVarD, 45) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) EndSwitch Return @@ -43,7 +43,7 @@ EvtScript N(EVS_UseMove_Impl) = { ExecWait(N(EVS_UseUltraHammer)) EndSwitch Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, BS_FLAGS1_INCLUDE_POWER_UPS) - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) // incorrect use, should use GetSmashActionQuality Switch(LVar0) CaseGt(0) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -91,7 +91,7 @@ EvtScript N(EVS_UseMove_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/d_down_pound.c b/src/battle/move/hammer/d_down_pound.c index f11717c1cd..e9b17477ed 100644 --- a/src/battle/move/hammer/d_down_pound.c +++ b/src/battle/move/hammer/d_down_pound.c @@ -11,7 +11,7 @@ API_CALLABLE(N(MakeGreenImpactFX)) { s32 x = evt_get_variable(script, *args++); s32 y = evt_get_variable(script, *args++); s32 z = evt_get_variable(script, *args++); - b32 success = script->varTable[10]; // value from GetPlayerActionSuccess + b32 success = script->varTable[10]; // value from GetPlayerActionQuality if (!success) { fx_green_impact(TRUE, x + 30, y + 25, z, 45.0f); @@ -22,7 +22,7 @@ API_CALLABLE(N(MakeGreenImpactFX)) { return ApiStatus_DONE2; } -extern EvtScript N(UseMove_Impl); +extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { Call(ShowActionHud, TRUE) @@ -30,26 +30,26 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 50) - Set(LVarE, 1) - Set(LVarF, 2) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 50) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 50) - Set(LVarE, 2) - Set(LVarF, 4) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 50) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 50) - Set(LVarE, 3) - Set(LVarF, 6) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 50) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) EndSwitch Return End }; -EvtScript N(UseMove_Impl) = { +EvtScript N(EVS_UseMove_Impl) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) @@ -60,7 +60,7 @@ EvtScript N(UseMove_Impl) = { ExecWait(N(EVS_UseUltraHammer)) EndSwitch Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_IGNORE_DEFENSE, 25, 0, LVar9, 16) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -101,7 +101,7 @@ EvtScript N(UseMove_Impl) = { EndThread EndSwitch EndSwitch - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) IfGt(LVar0, FALSE) Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) Call(MoveBattleCamOver, 5) @@ -123,10 +123,10 @@ EvtScript N(UseMove_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVarA) + Call(GetPlayerActionQuality, LVarA) Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) Call(N(MakeGreenImpactFX), LVar0, LVar1, LVar2) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) diff --git a/src/battle/move/hammer/hammer_charge_0.c b/src/battle/move/hammer/hammer_charge_0.c index 0259e4a1fb..001fcc0d99 100644 --- a/src/battle/move/hammer/hammer_charge_0.c +++ b/src/battle/move/hammer/hammer_charge_0.c @@ -41,32 +41,32 @@ API_CALLABLE(func_802A11CC_74F2FC) { return ApiStatus_DONE2; } -extern EvtScript N(EVS_802A3348); +extern EvtScript N(EVS_UseMove1_Impl); EvtScript N(EVS_UseMove1) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 65) - Set(LVarE, 1) - Set(LVarF, 2) - ExecWait(N(EVS_802A3348)) + Set(LVarD, 65) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove1_Impl)) CaseEq(1) - Set(LVarD, 65) - Set(LVarE, 2) - Set(LVarF, 4) - ExecWait(N(EVS_802A3348)) + Set(LVarD, 65) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove1_Impl)) CaseEq(2) - Set(LVarD, 65) - Set(LVarE, 4) - Set(LVarF, 6) - ExecWait(N(EVS_802A3348)) + Set(LVarD, 65) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD + 1) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove1_Impl)) EndSwitch Return End }; -EvtScript N(EVS_802A3348) = { +EvtScript N(EVS_UseMove1_Impl) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) @@ -77,7 +77,7 @@ EvtScript N(EVS_802A3348) = { ExecWait(N(EVS_UseBasicHammer)) EndSwitch Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -125,7 +125,7 @@ EvtScript N(EVS_802A3348) = { Return EndIf Set(LFlag0, FALSE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/hammer_charge_1.c b/src/battle/move/hammer/hammer_charge_1.c index f157e79b7d..65e9447cb3 100644 --- a/src/battle/move/hammer/hammer_charge_1.c +++ b/src/battle/move/hammer/hammer_charge_1.c @@ -56,19 +56,19 @@ EvtScript N(EVS_UseMove1) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 65) - Set(LVarE, 1) - Set(LVarF, 2) + Set(LVarD, 65) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove1_Impl)) CaseEq(1) - Set(LVarD, 65) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 65) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove1_Impl)) CaseEq(2) - Set(LVarD, 65) - Set(LVarE, 4) - Set(LVarF, 6) + Set(LVarD, 65) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD + 1) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove1_Impl)) EndSwitch Return @@ -86,7 +86,7 @@ EvtScript N(EVS_UseMove1_Impl) = { ExecWait(N(EVS_UseBasicHammer)) EndSwitch Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -134,7 +134,7 @@ EvtScript N(EVS_UseMove1_Impl) = { Return EndIf Set(LFlag0, FALSE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/hammer_charge_2.c b/src/battle/move/hammer/hammer_charge_2.c index a82bdd1bbd..ba4cb30e18 100644 --- a/src/battle/move/hammer/hammer_charge_2.c +++ b/src/battle/move/hammer/hammer_charge_2.c @@ -56,19 +56,19 @@ EvtScript N(EVS_UseMove1) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 65) - Set(LVarE, 1) - Set(LVarF, 2) + Set(LVarD, 65) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove1_Impl)) CaseEq(1) - Set(LVarD, 65) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 65) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove1_Impl)) CaseEq(2) - Set(LVarD, 65) - Set(LVarE, 4) - Set(LVarF, 6) + Set(LVarD, 65) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD + 1) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove1_Impl)) EndSwitch Return @@ -86,7 +86,7 @@ EvtScript N(EVS_UseMove1_Impl) = { ExecWait(N(EVS_UseBasicHammer)) EndSwitch Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -134,7 +134,7 @@ EvtScript N(EVS_UseMove1_Impl) = { Return EndIf Set(LFlag0, FALSE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/hammer_throw.c b/src/battle/move/hammer/hammer_throw.c index a0e75867a0..8721bc8fe7 100644 --- a/src/battle/move/hammer/hammer_throw.c +++ b/src/battle/move/hammer/hammer_throw.c @@ -41,19 +41,19 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 50) - Set(LVarE, 1) - Set(LVarF, 2) + Set(LVarD, 50) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 50) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 50) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 50) - Set(LVarE, 3) - Set(LVarF, 6) + Set(LVarD, 50) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) EndSwitch Return @@ -248,7 +248,7 @@ EvtScript N(EVS_UseMove_Impl) = { IfGt(LVar0, AC_MODE_NOT_LEARNED) Loop(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfNe(LVar0, 0) BreakLoop EndIf @@ -285,7 +285,7 @@ EvtScript N(EVS_UseMove_Impl) = { Call(InitTargetIterator) Call(SetGoalToTarget, ACTOR_SELF) Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - Call(GetPlayerActionSuccess, LVar3) + Call(GetPlayerActionQuality, LVar3) Switch(LVar3) CaseGt(FALSE) Thread @@ -321,7 +321,7 @@ EvtScript N(EVS_UseMove_Impl) = { Return EndIf Thread - Call(GetPlayerActionSuccess, LVar3) + Call(GetPlayerActionQuality, LVar3) Switch(LVar3) CaseGt(FALSE) Call(SetVirtualEntityJumpGravity, LVarA, Float(1.4)) @@ -337,7 +337,7 @@ EvtScript N(EVS_UseMove_Impl) = { Call(DeleteVirtualEntity, LVarA) EndSwitch EndThread - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -389,7 +389,7 @@ EvtScript N(EVS_UseMove_Impl) = { CaseEq(2) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) EndSwitch - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/mega_quake.c b/src/battle/move/hammer/mega_quake.c index 54fb714932..ce6f17c73d 100644 --- a/src/battle/move/hammer/mega_quake.c +++ b/src/battle/move/hammer/mega_quake.c @@ -35,33 +35,33 @@ API_CALLABLE(func_802A10A4_756824) { } } -extern EvtScript N(EVS_802A3238); +extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { Call(ShowActionHud, TRUE) Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 80) - Set(LVarE, 3) - Set(LVarF, 6) - ExecWait(N(EVS_802A3238)) + Set(LVarD, 80) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 80) - Set(LVarE, 3) - Set(LVarF, 6) - ExecWait(N(EVS_802A3238)) + Set(LVarD, 80) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 80) - Set(LVarE, 3) - Set(LVarF, 6) - ExecWait(N(EVS_802A3238)) + Set(LVarD, 80) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) EndSwitch Return End }; -EvtScript N(EVS_802A3238) = { +EvtScript N(EVS_UseMove_Impl) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) @@ -82,7 +82,7 @@ EvtScript N(EVS_802A3238) = { Wait(2) PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) EndThread - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) @@ -141,7 +141,7 @@ EvtScript N(EVS_802A3238) = { PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) EndThread EndSwitch - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) IfGt(LVar0, FALSE) Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_QUAKE) Call(MoveBattleCamOver, 5) @@ -188,7 +188,7 @@ EvtScript N(EVS_802A3238) = { IfEq(LVar0, HIT_RESULT_MISS) Goto(11) EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) diff --git a/src/battle/move/hammer/mega_smash.c b/src/battle/move/hammer/mega_smash.c index 5cb0616f9d..e93a2fa129 100644 --- a/src/battle/move/hammer/mega_smash.c +++ b/src/battle/move/hammer/mega_smash.c @@ -5,7 +5,7 @@ #include "battle/common/move/HammerSupport.inc.c" -extern EvtScript N(UseMove_Impl); +extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) @@ -13,20 +13,20 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 45) - Set(LVarE, 5) - Set(LVarF, 6) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD + 4) + Set(LVarF, BASIC_HAMMER_DMG_GOOD + 4) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 45) - Set(LVarE, 6) - Set(LVarF, 8) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD + 4) + Set(LVarF, SUPER_HAMMER_DMG_GOOD + 4) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 45) - Set(LVarE, 7) - Set(LVarF, 10) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD + 4) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD + 4) + ExecWait(N(EVS_UseMove_Impl)) EndSwitch Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) Return @@ -51,7 +51,7 @@ EvtScript N(EVS_802A3188) = { End }; -EvtScript N(UseMove_Impl) = { +EvtScript N(EVS_UseMove_Impl) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) @@ -70,7 +70,7 @@ EvtScript N(UseMove_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/power_quake.c b/src/battle/move/hammer/power_quake.c index b555ea47e4..cdfb695fb4 100644 --- a/src/battle/move/hammer/power_quake.c +++ b/src/battle/move/hammer/power_quake.c @@ -13,19 +13,19 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 80) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 80) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_802A3168)) CaseEq(1) - Set(LVarD, 80) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 80) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_802A3168)) CaseEq(2) - Set(LVarD, 80) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 80) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_802A3168)) EndSwitch Return @@ -53,7 +53,7 @@ EvtScript N(EVS_802A3168) = { Wait(2) PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) EndThread - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) @@ -102,7 +102,7 @@ EvtScript N(EVS_802A3168) = { PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 96, 8, 72, 30, 0, 0, 0, 0, 0) EndThread EndSwitch - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) IfGt(LVar0, FALSE) Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_QUAKE) Call(MoveBattleCamOver, 5) @@ -137,7 +137,7 @@ EvtScript N(EVS_802A3168) = { IfEq(LVar0, HIT_RESULT_MISS) Goto(11) EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) diff --git a/src/battle/move/hammer/power_smash.c b/src/battle/move/hammer/power_smash.c index 81d0a07b54..4f53085e83 100644 --- a/src/battle/move/hammer/power_smash.c +++ b/src/battle/move/hammer/power_smash.c @@ -5,7 +5,7 @@ #include "battle/common/move/HammerSupport.inc.c" -extern EvtScript N(UseMove_Impl); +extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) @@ -13,20 +13,20 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 45) - Set(LVarE, 3) - Set(LVarF, 4) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD + 2) + Set(LVarF, BASIC_HAMMER_DMG_GOOD + 2) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 45) - Set(LVarE, 4) - Set(LVarF, 6) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD + 2) + Set(LVarF, SUPER_HAMMER_DMG_GOOD + 2) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 45) - Set(LVarE, 5) - Set(LVarF, 8) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD + 2) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD + 2) + ExecWait(N(EVS_UseMove_Impl)) EndSwitch Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) Return @@ -45,7 +45,7 @@ EvtScript N(EVS_802A3188) = { End }; -EvtScript N(UseMove_Impl) = { +EvtScript N(EVS_UseMove_Impl) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) @@ -65,7 +65,7 @@ EvtScript N(UseMove_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/quake_hammer.c b/src/battle/move/hammer/quake_hammer.c index cc4d4c71ec..21408a40b1 100644 --- a/src/battle/move/hammer/quake_hammer.c +++ b/src/battle/move/hammer/quake_hammer.c @@ -6,33 +6,33 @@ #include "battle/common/move/HammerSupport.inc.c" -extern EvtScript N(EVS_802A3168); +extern EvtScript N(EVS_UseMove_Impl); -EvtScript N(EVS_UseMove0) = { +EvtScript N(EVS_UseMove) = { Call(ShowActionHud, TRUE) Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 80) - Set(LVarE, 1) - Set(LVarF, 2) - ExecWait(N(EVS_802A3168)) + Set(LVarD, 80) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 80) - Set(LVarE, 1) - Set(LVarF, 2) - ExecWait(N(EVS_802A3168)) + Set(LVarD, 80) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 80) - Set(LVarE, 1) - Set(LVarF, 2) - ExecWait(N(EVS_802A3168)) + Set(LVarD, 80) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) EndSwitch Return End }; -EvtScript N(EVS_802A3168) = { +EvtScript N(EVS_UseMove_Impl) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) @@ -53,7 +53,7 @@ EvtScript N(EVS_802A3168) = { Wait(2) PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) EndChildThread - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) @@ -87,7 +87,7 @@ EvtScript N(EVS_802A3168) = { Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.025390625)) EndChildThread EndSwitch - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) IfGt(LVar0, FALSE) Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_QUAKE) Call(MoveBattleCamOver, 5) @@ -122,7 +122,7 @@ EvtScript N(EVS_802A3168) = { IfEq(LVar0, HIT_RESULT_MISS) Goto(11) EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) diff --git a/src/battle/move/hammer/shell_crack.c b/src/battle/move/hammer/shell_crack.c index f18c313097..4aae594c0a 100644 --- a/src/battle/move/hammer/shell_crack.c +++ b/src/battle/move/hammer/shell_crack.c @@ -20,27 +20,27 @@ API_CALLABLE(func_802A10A4_77F2E4) { return ApiStatus_DONE2; } -extern EvtScript N(UseMove_Impl); +extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { Call(ShowActionHud, TRUE) Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 60) - Set(LVarE, 1) - Set(LVarF, 2) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 60) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 60) - Set(LVarE, 2) - Set(LVarF, 4) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 60) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 60) - Set(LVarE, 3) - Set(LVarF, 6) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 60) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) + ExecWait(N(EVS_UseMove_Impl)) EndSwitch Return End @@ -64,7 +64,7 @@ EvtScript N(EVS_802A3248) = { End }; -EvtScript N(UseMove_Impl) = { +EvtScript N(EVS_UseMove_Impl) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) @@ -86,7 +86,7 @@ EvtScript N(UseMove_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/shrink_smash.c b/src/battle/move/hammer/shrink_smash.c index 91e42a8a85..6cc1b7ca5d 100644 --- a/src/battle/move/hammer/shrink_smash.c +++ b/src/battle/move/hammer/shrink_smash.c @@ -11,19 +11,19 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 45) - Set(LVarE, 1) - Set(LVarF, 2) + Set(LVarD, 45) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 45) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 45) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 45) - Set(LVarE, 3) - Set(LVarF, 6) + Set(LVarD, 45) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove_Impl)) EndSwitch Return @@ -41,7 +41,7 @@ EvtScript N(EVS_UseMove_Impl) = { ExecWait(N(EVS_UseUltraHammer)) EndSwitch Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) // incorrect use, should use GetSmashActionQuality Switch(LVar0) CaseGt(0) Call(GetMenuSelection, LVar0, LVar1, LVar2) @@ -89,7 +89,7 @@ EvtScript N(EVS_UseMove_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/hammer/spin_smash.c b/src/battle/move/hammer/spin_smash.c index 9861a2effe..844481983c 100644 --- a/src/battle/move/hammer/spin_smash.c +++ b/src/battle/move/hammer/spin_smash.c @@ -40,19 +40,19 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 60) - Set(LVarE, 1) - Set(LVarF, 2) + Set(LVarD, 60) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD) + Set(LVarF, BASIC_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove1_Impl)) CaseEq(1) - Set(LVarD, 60) - Set(LVarE, 2) - Set(LVarF, 4) + Set(LVarD, 60) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD) + Set(LVarF, SUPER_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove2_Impl)) CaseEq(2) - Set(LVarD, 60) - Set(LVarE, 3) - Set(LVarF, 6) + Set(LVarD, 60) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD) ExecWait(N(EVS_UseMove3_Impl)) EndSwitch Return @@ -126,7 +126,7 @@ EvtScript N(EVS_UseMove1_Impl) = { EndLoop Label(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -145,7 +145,7 @@ EvtScript N(EVS_UseMove1_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(func_802A1000_737890) @@ -248,7 +248,7 @@ EvtScript N(EVS_UseMove2_Impl) = { EndLoop Label(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -267,7 +267,7 @@ EvtScript N(EVS_UseMove2_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(func_802A1000_737890) @@ -368,7 +368,7 @@ EvtScript N(EVS_UseMove3_Impl) = { EndLoop Label(0) Wait(1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -387,7 +387,7 @@ EvtScript N(EVS_UseMove3_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(func_802A1000_737890) diff --git a/src/battle/move/hammer/super_smash.c b/src/battle/move/hammer/super_smash.c index a1dfa66937..741ddaffb1 100644 --- a/src/battle/move/hammer/super_smash.c +++ b/src/battle/move/hammer/super_smash.c @@ -5,7 +5,7 @@ #include "battle/common/move/HammerSupport.inc.c" -extern EvtScript N(UseMove_Impl); +extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) @@ -13,20 +13,20 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - Set(LVarD, 45) - Set(LVarE, 4) - Set(LVarF, 5) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, BASIC_HAMMER_DMG_BAD + 3) + Set(LVarF, BASIC_HAMMER_DMG_GOOD + 3) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(1) - Set(LVarD, 45) - Set(LVarE, 5) - Set(LVarF, 7) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, SUPER_HAMMER_DMG_BAD + 3) + Set(LVarF, SUPER_HAMMER_DMG_GOOD + 3) + ExecWait(N(EVS_UseMove_Impl)) CaseEq(2) - Set(LVarD, 45) - Set(LVarE, 6) - Set(LVarF, 9) - ExecWait(N(UseMove_Impl)) + Set(LVarD, 45) // duration + Set(LVarE, ULTRA_HAMMER_DMG_BAD + 3) + Set(LVarF, ULTRA_HAMMER_DMG_GOOD + 3) + ExecWait(N(EVS_UseMove_Impl)) EndSwitch Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) Return @@ -47,7 +47,7 @@ EvtScript N(EVS_802A3188) = { End }; -EvtScript N(UseMove_Impl) = { +EvtScript N(EVS_UseMove_Impl) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) @@ -66,7 +66,7 @@ EvtScript N(UseMove_Impl) = { ExecWait(N(EVS_HammerSupport_ReturnHome_SmashMiss)) Return EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(GetMenuSelection, LVar0, LVar1, LVar2) diff --git a/src/battle/move/jump/attack.c b/src/battle/move/jump/attack.c index cff8257e67..c3dbf2c2e0 100644 --- a/src/battle/move/jump/attack.c +++ b/src/battle/move/jump/attack.c @@ -25,7 +25,7 @@ API_CALLABLE(N(GetJumpDamage)) { return ApiStatus_DONE2; } -extern EvtScript N(EVS_UseMove_Normal); +extern EvtScript N(EVS_UseMove_Basic); extern EvtScript N(EVS_UseMove_Super); extern EvtScript N(EVS_UseMove_Ultra); extern EvtScript N(EVS_UseMove_Tutorial); @@ -40,7 +40,7 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - ExecWait(N(EVS_UseMove_Normal)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) ExecWait(N(EVS_UseMove_Super)) CaseEq(2) @@ -50,7 +50,7 @@ EvtScript N(EVS_UseMove) = { End }; -EvtScript N(EVS_UseMove_Normal) = { +EvtScript N(EVS_UseMove_Basic) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(GetActionCommandMode, LVar0) IfEq(LVar0, AC_MODE_TUTORIAL) @@ -72,7 +72,7 @@ EvtScript N(EVS_UseMove_Normal) = { IfGt(LVar0, AC_MODE_NOT_LEARNED) Wait(1) EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -99,7 +99,7 @@ EvtScript N(EVS_UseMove_Normal) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -125,7 +125,7 @@ EvtScript N(EVS_UseMove_Super) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -144,7 +144,7 @@ EvtScript N(EVS_UseMove_Super) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH) Wait(5) @@ -180,7 +180,7 @@ EvtScript N(EVS_UseMove_Ultra) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) @@ -199,7 +199,7 @@ EvtScript N(EVS_UseMove_Ultra) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH) Wait(5) @@ -344,7 +344,7 @@ EvtScript N(EVS_UseBerserker_Normal) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -369,7 +369,7 @@ EvtScript N(EVS_UseBerserker_Normal) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -395,7 +395,7 @@ EvtScript N(EVS_UseBerserker_Super) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -414,7 +414,7 @@ EvtScript N(EVS_UseBerserker_Super) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH) Wait(5) @@ -452,7 +452,7 @@ EvtScript N(EVS_UseBerserker_Ultra) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) @@ -471,7 +471,7 @@ EvtScript N(EVS_UseBerserker_Ultra) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH) Wait(5) @@ -528,7 +528,7 @@ EvtScript N(EVS_UseMove_Tutorial) = { IfGt(LVar0, AC_MODE_NOT_LEARNED) Wait(1) EndIf - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -553,7 +553,7 @@ EvtScript N(EVS_UseMove_Tutorial) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) diff --git a/src/battle/move/jump/auto_jump.c b/src/battle/move/jump/auto_jump.c index e35bf69021..01cc25c13a 100644 --- a/src/battle/move/jump/auto_jump.c +++ b/src/battle/move/jump/auto_jump.c @@ -7,9 +7,9 @@ #include "battle/common/move/JumpSupport.inc.c" -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Call(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) @@ -18,17 +18,17 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Return End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(GetActionCommandMode, LVar0) IfEq(LVar0, AC_MODE_TUTORIAL) @@ -47,7 +47,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -72,7 +72,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -90,7 +90,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -98,7 +98,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -117,7 +117,7 @@ EvtScript N(EVS_UseMove_ImplB) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH) Wait(5) @@ -145,7 +145,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -153,7 +153,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) @@ -172,7 +172,7 @@ EvtScript N(EVS_UseMove_ImplC) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH) Wait(5) diff --git a/src/battle/move/jump/auto_multibounce.c b/src/battle/move/jump/auto_multibounce.c index ba53f119be..4df4e22a61 100644 --- a/src/battle/move/jump/auto_multibounce.c +++ b/src/battle/move/jump/auto_multibounce.c @@ -7,9 +7,9 @@ #include "battle/common/move/JumpSupport.inc.c" -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Call(ShowActionHud, TRUE) @@ -17,17 +17,17 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Return End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -40,7 +40,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -73,7 +73,7 @@ EvtScript N(EVS_UseMove_ImplA) = { EndIf EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Add(LVarF, 1) Set(LFlag0, FALSE) Label(10) @@ -107,7 +107,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -139,7 +139,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) EndSwitch Call(SetActionResult, LVarE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseOrEq(FALSE) CaseOrEq(2) @@ -169,7 +169,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -182,7 +182,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -215,7 +215,7 @@ EvtScript N(EVS_UseMove_ImplB) = { EndIf EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LFlag0, FALSE) Set(LVarF, 0) Add(LVarF, 1) @@ -254,7 +254,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -286,7 +286,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) EndSwitch Call(SetActionResult, LVarE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseOrEq(FALSE) CaseOrEq(2) @@ -316,7 +316,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -329,7 +329,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -362,7 +362,7 @@ EvtScript N(EVS_UseMove_ImplC) = { EndIf EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LFlag0, FALSE) Set(LVarF, 0) Add(LVarF, 1) @@ -394,7 +394,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -426,7 +426,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) EndSwitch Call(SetActionResult, LVarE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseOrEq(FALSE) CaseOrEq(2) diff --git a/src/battle/move/jump/d_down_jump.c b/src/battle/move/jump/d_down_jump.c index ad8c347791..bda25b5fbd 100644 --- a/src/battle/move/jump/d_down_jump.c +++ b/src/battle/move/jump/d_down_jump.c @@ -8,24 +8,24 @@ #include "battle/common/move/JumpSupport.inc.c" -API_CALLABLE(N(func_802A10E4_781A04)) { +API_CALLABLE(N(SpawnImpactFX)) { Bytecode* args = script->ptrReadPos; - s32 var0 = evt_get_variable(script, *args++); - s32 var1 = evt_get_variable(script, *args++); - s32 var2 = evt_get_variable(script, *args++); + s32 x = evt_get_variable(script, *args++); + s32 y = evt_get_variable(script, *args++); + s32 z = evt_get_variable(script, *args++); if (script->varTable[10] == 0) { - fx_green_impact(TRUE, var0, var1, var2, 0.0f); + fx_green_impact(TRUE, x, y, z, 0.0f); } else { - fx_green_impact(FALSE, var0, var1, var2, 0.0f); + fx_green_impact(FALSE, x, y, z, 0.0f); } return ApiStatus_DONE2; } -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Call(ShowActionHud, TRUE) @@ -33,29 +33,29 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Return End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) ExecWait(N(EVS_JumpSupport_Miss)) Return EndIf - Call(GetPlayerActionSuccess, LVarA) + Call(GetPlayerActionQuality, LVarA) Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(N(SpawnImpactFX), LVar0, LVar1, LVar2) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -81,7 +81,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -91,7 +91,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) Call(PlayerBasicJumpToGoal, 24, PLAYER_BASIC_JUMP_3) Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(N(SpawnImpactFX), LVar0, LVar1, LVar2) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) Wait(1) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -102,7 +102,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -110,10 +110,10 @@ EvtScript N(EVS_UseMove_ImplB) = { Return EndIf Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(N(SpawnImpactFX), LVar0, LVar1, LVar2) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -132,7 +132,7 @@ EvtScript N(EVS_UseMove_ImplB) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH) Wait(5) @@ -152,7 +152,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Call(PlayerSuperJumpToGoal, 3, PLAYER_SUPER_JUMP_5) Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(N(SpawnImpactFX), LVar0, LVar1, LVar2) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) Wait(1) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -163,7 +163,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -171,10 +171,10 @@ EvtScript N(EVS_UseMove_ImplC) = { Return EndIf Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(N(SpawnImpactFX), LVar0, LVar1, LVar2) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) @@ -193,7 +193,7 @@ EvtScript N(EVS_UseMove_ImplC) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH) Wait(5) @@ -211,7 +211,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Call(PlayerUltraJumpToGoal, 25, PLAYER_ULTRA_JUMP_4) Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(N(SpawnImpactFX), LVar0, LVar1, LVar2) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) Wait(1) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) diff --git a/src/battle/move/jump/demo_power_bounce.c b/src/battle/move/jump/demo_power_bounce.c index 841c1852ed..7c1bd06fde 100644 --- a/src/battle/move/jump/demo_power_bounce.c +++ b/src/battle/move/jump/demo_power_bounce.c @@ -36,9 +36,9 @@ API_CALLABLE(N(GetHitChance)) { return ApiStatus_DONE2; } -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Set(LFlagA, FALSE) @@ -48,19 +48,19 @@ EvtScript N(EVS_UseMove) = { Switch(LVar1) CaseEq(0) Set(LVarC, 1) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) Set(LVarC, 2) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) Set(LVarC, 3) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Return End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) @@ -77,7 +77,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -102,7 +102,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LVarD, 0) Set(LVarF, 0) Set(LFlag0, FALSE) @@ -149,7 +149,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -196,7 +196,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) @@ -213,7 +213,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -232,7 +232,7 @@ EvtScript N(EVS_UseMove_ImplB) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LVarD, 0) Set(LVarF, 0) Set(LFlag0, FALSE) @@ -285,7 +285,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -332,7 +332,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) @@ -349,7 +349,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) @@ -368,7 +368,7 @@ EvtScript N(EVS_UseMove_ImplC) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LVarD, 0) Set(LVarF, 0) Set(LFlag0, FALSE) @@ -417,7 +417,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) diff --git a/src/battle/move/jump/dizzy_stomp.c b/src/battle/move/jump/dizzy_stomp.c index e35b8db78f..cced6aa7bb 100644 --- a/src/battle/move/jump/dizzy_stomp.c +++ b/src/battle/move/jump/dizzy_stomp.c @@ -7,26 +7,26 @@ #include "battle/common/move/JumpSupport.inc.c" -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Call(ShowActionHud, TRUE) Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Return End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -34,7 +34,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -59,7 +59,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -77,7 +77,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -85,7 +85,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -104,7 +104,7 @@ EvtScript N(EVS_UseMove_ImplB) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH) Wait(5) @@ -132,7 +132,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -140,7 +140,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) @@ -159,7 +159,7 @@ EvtScript N(EVS_UseMove_ImplC) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH) Wait(5) diff --git a/src/battle/move/jump/earthquake_jump.c b/src/battle/move/jump/earthquake_jump.c index 430b27fb18..dee4b075b8 100644 --- a/src/battle/move/jump/earthquake_jump.c +++ b/src/battle/move/jump/earthquake_jump.c @@ -19,9 +19,9 @@ Difficulty1D N(DifficultyTable) = { 11, 10, 9, 8, 7, 6, 5, 4 }; -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Set(LFlagA, FALSE) @@ -29,17 +29,17 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Return End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetGoalToFirstTarget, ACTOR_SELF) @@ -89,7 +89,7 @@ EvtScript N(EVS_UseMove_ImplA) = { EndChildThread Wait(10) Call(InitTargetIterator) - Call(GetPlayerActionSuccess, LVarB) + Call(GetPlayerActionQuality, LVarB) Set(LVar9, 0) Label(1) Call(SetGoalToTarget, ACTOR_PLAYER) @@ -128,7 +128,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LVarF, 0) Set(LFlag0, FALSE) Label(10) @@ -192,7 +192,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Set(LFlag0, TRUE) EndIf Call(InitTargetIterator) - Call(GetPlayerActionSuccess, LVarB) + Call(GetPlayerActionQuality, LVarB) Set(LVar9, 0) Label(11) Call(SetGoalToTarget, ACTOR_PLAYER) @@ -257,7 +257,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetGoalToFirstTarget, ACTOR_SELF) @@ -309,7 +309,7 @@ EvtScript N(EVS_UseMove_ImplB) = { EndChildThread Wait(10) Call(InitTargetIterator) - Call(GetPlayerActionSuccess, LVarB) + Call(GetPlayerActionQuality, LVarB) Set(LVar9, 0) Label(1) Call(SetGoalToTarget, ACTOR_PLAYER) @@ -348,7 +348,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LVarF, 0) Set(LFlag0, FALSE) Label(10) @@ -418,7 +418,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Set(LFlag0, TRUE) EndIf Call(InitTargetIterator) - Call(GetPlayerActionSuccess, LVarB) + Call(GetPlayerActionQuality, LVarB) Set(LVar9, 0) Label(11) Call(SetGoalToTarget, ACTOR_PLAYER) @@ -483,7 +483,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetGoalToFirstTarget, ACTOR_SELF) @@ -535,7 +535,7 @@ EvtScript N(EVS_UseMove_ImplC) = { EndChildThread Wait(10) Call(InitTargetIterator) - Call(GetPlayerActionSuccess, LVarB) + Call(GetPlayerActionQuality, LVarB) Set(LVar9, 0) Label(1) Call(SetGoalToTarget, ACTOR_PLAYER) @@ -574,7 +574,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LVarF, 0) Set(LFlag0, FALSE) Label(10) @@ -640,7 +640,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Set(LFlag0, TRUE) EndIf Call(InitTargetIterator) - Call(GetPlayerActionSuccess, LVarB) + Call(GetPlayerActionQuality, LVarB) Set(LVar9, 0) Label(11) Call(SetGoalToTarget, ACTOR_PLAYER) diff --git a/src/battle/move/jump/jump_charge_0.c b/src/battle/move/jump/jump_charge_0.c index 5b8da6720f..5ad7958f20 100644 --- a/src/battle/move/jump/jump_charge_0.c +++ b/src/battle/move/jump/jump_charge_0.c @@ -43,12 +43,12 @@ API_CALLABLE(N(func_802A120C_74D77C)) { return ApiStatus_DONE2; } -EvtScript N(EVS_UseMove1) = { +EvtScript N(EVS_UseMove_Unimplemented) = { Return End }; -EvtScript N(EVS_UseMove0) = { +EvtScript N(EVS_UseMove) = { Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) Wait(10) ChildThread diff --git a/src/battle/move/jump/jump_charge_1.c b/src/battle/move/jump/jump_charge_1.c index b4d146f972..4585fad1b8 100644 --- a/src/battle/move/jump/jump_charge_1.c +++ b/src/battle/move/jump/jump_charge_1.c @@ -10,7 +10,7 @@ #include "world/common/todo/IsJumpMaxCharged.inc.c" -BSS s32 D_802A2C50; +BSS b32 N(HasCharged); API_CALLABLE(N(func_802A1108_74D678)) { Bytecode* args = script->ptrReadPos; @@ -18,13 +18,12 @@ API_CALLABLE(N(func_802A1108_74D678)) { s32 var1 = evt_get_variable(script, *args++); s32 var2 = evt_get_variable(script, *args++); s32 var3 = evt_get_variable(script, *args++); - s32* var4; fx_stat_change(1, var1, var2, var3, 1.0f, 60); - var4 = &D_802A2C50; - *var4 = 0; + + N(HasCharged) = FALSE; if (battleStatus->jumpCharge > 0) { - *var4 = 1; + N(HasCharged) = TRUE; } battleStatus->jumpCharge += 2; @@ -42,22 +41,22 @@ API_CALLABLE(N(func_802A1108_74D678)) { #include "world/common/todo/UnkMoveFunc2.inc.c" -API_CALLABLE(N(func_802A133C_75CCBC)) { - if (D_802A2C50 == 0) { - script->varTable[0] = 6; +API_CALLABLE(N(GetChargeMessage)) { + if (!N(HasCharged)) { + script->varTable[0] = BTL_MSG_CHARGE_JUMP; } else { - script->varTable[0] = 7; + script->varTable[0] = BTL_MSG_CHARGE_JUMP_MORE; } return ApiStatus_DONE2; } -EvtScript N(EVS_UseMove1) = { +EvtScript N(EVS_UseMove_Unimplemented) = { Return End }; -EvtScript N(EVS_UseMove0) = { +EvtScript N(EVS_UseMove) = { Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) Wait(10) ChildThread @@ -94,7 +93,7 @@ EvtScript N(EVS_UseMove0) = { Wait(4) Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) - Call(N(func_802A133C_75CCBC)) + Call(N(GetChargeMessage)) Call(ShowVariableMessageBox, LVar0, 60, 2) Else Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) diff --git a/src/battle/move/jump/jump_charge_2.c b/src/battle/move/jump/jump_charge_2.c index 5ce523afd3..08d21346ac 100644 --- a/src/battle/move/jump/jump_charge_2.c +++ b/src/battle/move/jump/jump_charge_2.c @@ -10,7 +10,7 @@ #include "world/common/todo/IsJumpMaxCharged.inc.c" -BSS s32 D_802A2C20; +BSS b32 N(HasCharged); API_CALLABLE(N(func_802A1108_74D678)) { Bytecode* args = script->ptrReadPos; @@ -21,10 +21,10 @@ API_CALLABLE(N(func_802A1108_74D678)) { s32* var4; fx_stat_change(2, var1, var2, var3, 1.0f, 60); - var4 = &D_802A2C20; - *var4 = 0; + + N(HasCharged) = FALSE; if (battleStatus->jumpCharge > 0) { - *var4 = 1; + N(HasCharged) = TRUE; } battleStatus->jumpCharge += 3; @@ -42,22 +42,22 @@ API_CALLABLE(N(func_802A1108_74D678)) { #include "world/common/todo/UnkMoveFunc3.inc.c" -API_CALLABLE(N(func_802A133C_761C5C)) { - if (D_802A2C20 == 0) { - script->varTable[0] = 6; +API_CALLABLE(N(GetChargeMessage)) { + if (!N(HasCharged)) { + script->varTable[0] = BTL_MSG_CHARGE_JUMP; } else { - script->varTable[0] = 7; + script->varTable[0] = BTL_MSG_CHARGE_JUMP_MORE; } return ApiStatus_DONE2; } -EvtScript N(EVS_UseMove1) = { +EvtScript N(EVS_UseMove_Unimplemented) = { Return End }; -EvtScript N(EVS_UseMove0) = { +EvtScript N(EVS_UseMove) = { Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) Wait(10) ChildThread @@ -93,7 +93,7 @@ EvtScript N(EVS_UseMove0) = { Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) Wait(4) Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - Call(N(func_802A133C_761C5C)) + Call(N(GetChargeMessage)) Call(ShowVariableMessageBox, LVar0, 60, 3) Else Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) diff --git a/src/battle/move/jump/mega_jump.c b/src/battle/move/jump/mega_jump.c index 36d434786a..52f5d25774 100644 --- a/src/battle/move/jump/mega_jump.c +++ b/src/battle/move/jump/mega_jump.c @@ -54,7 +54,7 @@ EvtScript N(EVS_UseMove_Basic) = { EndIf ExecWait(N(EVS_PlayQuakeFX)) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -82,7 +82,7 @@ EvtScript N(EVS_UseMove_Super) = { EndIf ExecWait(N(EVS_PlayQuakeFX)) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -110,7 +110,7 @@ EvtScript N(EVS_UseMove_Ultra) = { EndIf ExecWait(N(EVS_PlayQuakeFX)) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) diff --git a/src/battle/move/jump/multibounce.c b/src/battle/move/jump/multibounce.c index e2d76e0e17..9145a4aba8 100644 --- a/src/battle/move/jump/multibounce.c +++ b/src/battle/move/jump/multibounce.c @@ -53,7 +53,7 @@ EvtScript N(EVS_UseMove_Basic) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(0) IfFalse(LFlag0) @@ -86,7 +86,7 @@ EvtScript N(EVS_UseMove_Basic) = { EndIf EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Add(LVarF, 1) Set(LFlag0, FALSE) Label(10) @@ -120,7 +120,7 @@ EvtScript N(EVS_UseMove_Basic) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -152,7 +152,7 @@ EvtScript N(EVS_UseMove_Basic) = { Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) EndSwitch Call(SetActionResult, LVarE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseOrEq(FALSE) CaseOrEq(2) @@ -204,7 +204,7 @@ EvtScript N(EVS_UseMove_Super) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -237,7 +237,7 @@ EvtScript N(EVS_UseMove_Super) = { EndIf EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LFlag0, FALSE) Set(LVarF, 0) Add(LVarF, 1) @@ -276,7 +276,7 @@ EvtScript N(EVS_UseMove_Super) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -308,7 +308,7 @@ EvtScript N(EVS_UseMove_Super) = { Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) EndSwitch Call(SetActionResult, LVarE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseOrEq(FALSE) CaseOrEq(2) @@ -360,7 +360,7 @@ EvtScript N(EVS_UseMove_Ultra) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -393,7 +393,7 @@ EvtScript N(EVS_UseMove_Ultra) = { EndIf EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Set(LFlag0, FALSE) Set(LVarF, 0) Add(LVarF, 1) @@ -425,7 +425,7 @@ EvtScript N(EVS_UseMove_Ultra) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -457,7 +457,7 @@ EvtScript N(EVS_UseMove_Ultra) = { Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) EndSwitch Call(SetActionResult, LVarE) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseOrEq(FALSE) CaseOrEq(2) diff --git a/src/battle/move/jump/power_bounce.c b/src/battle/move/jump/power_bounce.c index fe94e0d50c..1bc08ccb6b 100644 --- a/src/battle/move/jump/power_bounce.c +++ b/src/battle/move/jump/power_bounce.c @@ -54,9 +54,9 @@ API_CALLABLE(N(StoreHitCountRecord)) { return ApiStatus_DONE2; } -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Set(LFlagA, FALSE) @@ -66,20 +66,20 @@ EvtScript N(EVS_UseMove) = { Switch(LVar1) CaseEq(0) Set(LVarC, 1) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) Set(LVarC, 2) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) Set(LVarC, 3) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Call(N(StoreHitCountRecord)) Return End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) @@ -96,7 +96,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -121,7 +121,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Call(N(IncrementHitCounter)) Set(LVarD, 0) Set(LVarF, 0) @@ -169,7 +169,7 @@ EvtScript N(EVS_UseMove_ImplA) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(0) IfEq(LFlag0, FALSE) @@ -221,7 +221,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) @@ -238,7 +238,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -257,7 +257,7 @@ EvtScript N(EVS_UseMove_ImplB) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Call(N(IncrementHitCounter)) Set(LVarD, 0) Set(LVarF, 0) @@ -311,7 +311,7 @@ EvtScript N(EVS_UseMove_ImplB) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) @@ -363,7 +363,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) @@ -380,7 +380,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) @@ -399,7 +399,7 @@ EvtScript N(EVS_UseMove_ImplC) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarE) + Call(GetJumpActionQuality, LVarE) Call(N(IncrementHitCounter)) Set(LVarD, 0) Set(LVarF, 0) @@ -449,7 +449,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Set(LFlag0, TRUE) EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) IfEq(LFlag0, FALSE) diff --git a/src/battle/move/jump/power_jump.c b/src/battle/move/jump/power_jump.c index b6f86a4a0c..a6afa8bab8 100644 --- a/src/battle/move/jump/power_jump.c +++ b/src/battle/move/jump/power_jump.c @@ -6,9 +6,9 @@ #include "battle/common/move/JumpSupport.inc.c" -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) @@ -16,11 +16,11 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) Return @@ -39,7 +39,7 @@ EvtScript N(EVS_802A26B4) = { End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -48,7 +48,7 @@ EvtScript N(EVS_UseMove_ImplA) = { EndIf ExecWait(N(EVS_802A26B4)) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -67,7 +67,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -76,7 +76,7 @@ EvtScript N(EVS_UseMove_ImplB) = { EndIf ExecWait(N(EVS_802A26B4)) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -95,7 +95,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -104,7 +104,7 @@ EvtScript N(EVS_UseMove_ImplC) = { EndIf ExecWait(N(EVS_802A26B4)) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) diff --git a/src/battle/move/jump/shrink_stomp.c b/src/battle/move/jump/shrink_stomp.c index f909c1b609..6f344df03d 100644 --- a/src/battle/move/jump/shrink_stomp.c +++ b/src/battle/move/jump/shrink_stomp.c @@ -34,7 +34,7 @@ EvtScript N(EVS_UseMove_Basic) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -59,7 +59,7 @@ EvtScript N(EVS_UseMove_Basic) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -85,7 +85,7 @@ EvtScript N(EVS_UseMove_Super) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_2) @@ -104,7 +104,7 @@ EvtScript N(EVS_UseMove_Super) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH) Wait(5) @@ -140,7 +140,7 @@ EvtScript N(EVS_UseMove_Ultra) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_3) @@ -159,7 +159,7 @@ EvtScript N(EVS_UseMove_Ultra) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH) Wait(5) diff --git a/src/battle/move/jump/sleep_stomp.c b/src/battle/move/jump/sleep_stomp.c index f4a16dc295..4b46a8497e 100644 --- a/src/battle/move/jump/sleep_stomp.c +++ b/src/battle/move/jump/sleep_stomp.c @@ -34,7 +34,7 @@ EvtScript N(EVS_UseMove_Basic) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -59,7 +59,7 @@ EvtScript N(EVS_UseMove_Basic) = { Call(SetGoalToTarget, ACTOR_PLAYER) Call(UseBattleCamPreset, BTL_CAM_PLAYER_JUMP_FINISH) EndChildThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -85,7 +85,7 @@ EvtScript N(EVS_UseMove_Super) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -104,7 +104,7 @@ EvtScript N(EVS_UseMove_Super) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_JUMP_FINISH) Wait(5) @@ -140,7 +140,7 @@ EvtScript N(EVS_UseMove_Ultra) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(FALSE) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -159,7 +159,7 @@ EvtScript N(EVS_UseMove_Ultra) = { CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) EndCaseGroup EndSwitch - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) ChildThread Call(UseBattleCamPreset, BTL_CAM_PLAYER_PRE_ULTRA_JUMP_FINISH) Wait(5) diff --git a/src/battle/move/jump/super_jump.c b/src/battle/move/jump/super_jump.c index e1817707dc..7d288a2f1d 100644 --- a/src/battle/move/jump/super_jump.c +++ b/src/battle/move/jump/super_jump.c @@ -6,9 +6,9 @@ #include "battle/common/move/JumpSupport.inc.c" -extern EvtScript N(EVS_UseMove_ImplA); -extern EvtScript N(EVS_UseMove_ImplB); -extern EvtScript N(EVS_UseMove_ImplC); +extern EvtScript N(EVS_UseMove_Basic); +extern EvtScript N(EVS_UseMove_Super); +extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) @@ -16,11 +16,11 @@ EvtScript N(EVS_UseMove) = { Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar1) CaseEq(0) - ExecWait(N(EVS_UseMove_ImplA)) + ExecWait(N(EVS_UseMove_Basic)) CaseEq(1) - ExecWait(N(EVS_UseMove_ImplB)) + ExecWait(N(EVS_UseMove_Super)) CaseEq(2) - ExecWait(N(EVS_UseMove_ImplC)) + ExecWait(N(EVS_UseMove_Ultra)) EndSwitch Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) Return @@ -41,7 +41,7 @@ EvtScript N(EVS_802A26B4) = { End }; -EvtScript N(EVS_UseMove_ImplA) = { +EvtScript N(EVS_UseMove_Basic) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -50,7 +50,7 @@ EvtScript N(EVS_UseMove_ImplA) = { EndIf ExecWait(N(EVS_802A26B4)) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) @@ -69,7 +69,7 @@ EvtScript N(EVS_UseMove_ImplA) = { End }; -EvtScript N(EVS_UseMove_ImplB) = { +EvtScript N(EVS_UseMove_Super) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -78,7 +78,7 @@ EvtScript N(EVS_UseMove_ImplB) = { EndIf ExecWait(N(EVS_802A26B4)) Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) @@ -97,7 +97,7 @@ EvtScript N(EVS_UseMove_ImplB) = { End }; -EvtScript N(EVS_UseMove_ImplC) = { +EvtScript N(EVS_UseMove_Ultra) = { ExecWait(N(EVS_JumpSupport_ApproachAndJump)) Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) IfEq(LVar0, HIT_RESULT_MISS) @@ -105,7 +105,7 @@ EvtScript N(EVS_UseMove_ImplC) = { Return EndIf Wait(1) - Call(GetPlayerActionSuccess, LVar0) + Call(GetPlayerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) diff --git a/src/battle/partner/bombette.c b/src/battle/partner/bombette.c index 4a137efc5f..0950d48574 100644 --- a/src/battle/partner/bombette.c +++ b/src/battle/partner/bombette.c @@ -982,7 +982,7 @@ EvtScript N(EVS_Attack_BodySlam) = { Set(LVarF, 5) EndSwitch Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BODY_SLAM) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) IfGt(LVar0, 0) Call(SetGoalToTarget, ACTOR_PARTNER) Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) @@ -1025,19 +1025,19 @@ EvtScript N(EVS_Attack_Bomb) = { CaseEq(MOVE_BOMB) Call(GetActorLevel, ACTOR_PARTNER, LVar0) Switch(LVar0) - CaseEq(0) + CaseEq(PARTNER_RANK_NORMAL) Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) - CaseEq(1) + CaseEq(PARTNER_RANK_SUPER) Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) - CaseEq(2) + CaseEq(PARTNER_RANK_ULTRA) Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) EndSwitch CaseEq(MOVE_POWER_BOMB) Call(GetActorLevel, ACTOR_PARTNER, LVar0) Switch(LVar0) - CaseEq(1) + CaseEq(PARTNER_RANK_SUPER) Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) - CaseEq(2) + CaseEq(PARTNER_RANK_ULTRA) Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) EndSwitch CaseEq(MOVE_MEGA_BOMB) @@ -1119,7 +1119,7 @@ EvtScript N(EVS_Attack_Bomb) = { Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES) Call(MoveBattleCamOver, 8) - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) Call(N(GetBombDamage), LVar0) Set(LVarA, LVar0) Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) @@ -1240,7 +1240,7 @@ EvtScript N(EVS_Attack_Bomb) = { IfEq(LVar0, 6) BreakSwitch EndIf - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) Call(N(GetBombDamage), LVar0) Switch(LVar0) CaseGt(0) @@ -1257,7 +1257,7 @@ EvtScript N(EVS_Attack_Bomb) = { IfEq(LVar0, 6) Goto(6) EndIf - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) Call(N(GetPowerBombDamage), LVar0) Switch(LVar0) CaseGt(0) @@ -1279,7 +1279,7 @@ EvtScript N(EVS_Attack_Bomb) = { IfEq(LVar0, 6) Goto(11) EndIf - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) Call(N(GetMegaBombDamage), LVar0) Switch(LVar0) CaseGt(0) diff --git a/src/battle/partner/bow.c b/src/battle/partner/bow.c index ca28892a20..6f907a4acc 100644 --- a/src/battle/partner/bow.c +++ b/src/battle/partner/bow.c @@ -532,7 +532,7 @@ EvtScript N(smack) = { Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0) Wait(1) EndLoop - Call(GetPartnerActionSuccess, LVarB) + Call(GetPartnerActionQuality, LVarB) Call(GetActionResultTier, LVarD) Label(0) Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) @@ -628,7 +628,7 @@ EvtScript N(smack) = { Wait(2) Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_SMACK, 0) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS) @@ -947,7 +947,7 @@ EvtScript N(spook) = { BreakLoop EndIf EndLoop - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) @@ -1044,7 +1044,7 @@ EvtScript N(fanSmack) = { Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0) Wait(1) EndLoop - Call(GetPartnerActionSuccess, LVarB) + Call(GetPartnerActionQuality, LVarB) Call(GetActionResultTier, LVarD) Label(0) Call(PartnerTestEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) @@ -1168,7 +1168,7 @@ EvtScript N(fanSmack) = { Wait(2) Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_FAN_SMACK, 0) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS) diff --git a/src/battle/partner/goombario.c b/src/battle/partner/goombario.c index aaff46730c..75887f1847 100644 --- a/src/battle/partner/goombario.c +++ b/src/battle/partner/goombario.c @@ -964,7 +964,7 @@ EvtScript N(EVS_Attack_Headbonk1) = { Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) EndChildThread Wait(1) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(N(GetChargeAmount)) @@ -992,7 +992,7 @@ EvtScript N(EVS_Attack_Headbonk1) = { Call(SetGoalToTarget, ACTOR_PARTNER) Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2) EndThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -1069,7 +1069,7 @@ EvtScript N(EVS_Attack_Headbonk2) = { Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) EndChildThread Wait(1) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(N(GetChargeAmount)) @@ -1097,7 +1097,7 @@ EvtScript N(EVS_Attack_Headbonk2) = { Call(SetGoalToTarget, ACTOR_PARTNER) Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2) EndThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -1176,7 +1176,7 @@ EvtScript N(EVS_Attack_Headbonk3) = { Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) EndChildThread Wait(1) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(N(GetChargeAmount)) @@ -1204,7 +1204,7 @@ EvtScript N(EVS_Attack_Headbonk3) = { Call(SetGoalToTarget, ACTOR_PARTNER) Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2) EndThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Call(InterruptActionCommand) Call(LoadActionCommand, ACTION_COMMAND_JUMP) Call(action_command_jump_init) @@ -1296,7 +1296,7 @@ EvtScript N(EVS_Move_Multibonk) = { Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) EndChildThread Wait(1) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(N(GetChargeAmount)) @@ -1324,7 +1324,7 @@ EvtScript N(EVS_Move_Multibonk) = { Call(SetGoalToTarget, ACTOR_PARTNER) Call(UseBattleCamPreset, BTL_CAM_GOOMBARIO_BONK_FOLLOWUP_2) EndThread - Call(GetActionResult, LVarF) + Call(GetJumpActionQuality, LVarF) Set(LVarD, 0) Set(LVarF, 0) Set(LFlag0, FALSE) @@ -1389,7 +1389,7 @@ EvtScript N(EVS_Move_Multibonk) = { Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) EndChildThread Wait(1) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) IfEq(LFlag0, FALSE) diff --git a/src/battle/partner/kooper.c b/src/battle/partner/kooper.c index ccc8bbfdce..8d049a9f9b 100644 --- a/src/battle/partner/kooper.c +++ b/src/battle/partner/kooper.c @@ -628,7 +628,7 @@ EvtScript N(shellToss) = { Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) EndSwitch Add(LVar9, 1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -680,7 +680,7 @@ EvtScript N(shellToss) = { Return EndIf Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) @@ -798,7 +798,7 @@ EvtScript N(powerShell) = { Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) EndSwitch Add(LVar9, 1) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) IfEq(LVar0, 0) Goto(0) EndIf @@ -833,7 +833,7 @@ EvtScript N(powerShell) = { Goto(12) EndIf IfEq(LFlag0, FALSE) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) @@ -842,7 +842,7 @@ EvtScript N(powerShell) = { EndSwitch EndIf Set(LFlag0, TRUE) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) @@ -856,7 +856,7 @@ EvtScript N(powerShell) = { Goto(10) EndIf IfEq(LFlag0, FALSE) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) @@ -870,7 +870,7 @@ EvtScript N(powerShell) = { Wait(1) Goto(11) EndIf - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) ExecWait(N(EVS_ReturnHome_Success)) @@ -988,7 +988,7 @@ EvtScript N(dizzyShell) = { Goto(12) EndIf IfEq(LFlag0, FALSE) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) @@ -998,7 +998,7 @@ EvtScript N(dizzyShell) = { EndIf Set(LFlag0, TRUE) Call(GetActionProgress, LVarF) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) IfEq(LVar9, 1) @@ -1025,7 +1025,7 @@ EvtScript N(dizzyShell) = { Goto(10) EndIf IfEq(LFlag0, FALSE) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) @@ -1234,7 +1234,7 @@ EvtScript N(fireShell) = { Goto(12) EndIf IfEq(LFlag0, FALSE) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) @@ -1244,7 +1244,7 @@ EvtScript N(fireShell) = { EndIf Set(LFlag0, TRUE) Call(GetActionProgress, LVar0) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) @@ -1258,7 +1258,7 @@ EvtScript N(fireShell) = { Goto(10) EndIf IfEq(LFlag0, FALSE) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) diff --git a/src/battle/partner/lakilester.c b/src/battle/partner/lakilester.c index bef52f4dc1..b69415e448 100644 --- a/src/battle/partner/lakilester.c +++ b/src/battle/partner/lakilester.c @@ -823,7 +823,7 @@ API_CALLABLE(N(CanTargetBeBlown)) { } get_actor(target->actorID); - if (rand_int(99) < battleStatus->actionSuccess) { + if (rand_int(99) < battleStatus->actionQuality) { *hurricaneChance = -1; script->varTable[0] = target->actorID; } else { @@ -1079,7 +1079,7 @@ EvtScript N(EVS_Move_SpinySurge) = { IfEq(LVar0, HIT_RESULT_MISS) Goto(12) EndIf - Call(GetPartnerActionSuccess, LVarA) + Call(GetPartnerActionQuality, LVarA) Call(N(GetSpinySurgeDamage)) Switch(LVar0) CaseGt(0) @@ -1169,7 +1169,7 @@ EvtScript N(cloudNine_normal) = { Wait(3) Call(AddBattleCamDist, 50) Call(MoveBattleCamOver, 5) - Call(GetPartnerActionSuccess, LVarA) + Call(GetPartnerActionQuality, LVarA) IfGt(LVarA, 0) Call(N(RemoveCloudNineFX)) Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_MAKE_CLOUD_NINE) @@ -1284,7 +1284,7 @@ EvtScript N(cloudNine_immobile) = { Wait(3) Call(AddBattleCamDist, 50) Call(MoveBattleCamOver, 5) - Call(GetPartnerActionSuccess, LVarA) + Call(GetPartnerActionQuality, LVarA) IfGt(LVarA, 0) Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_MAKE_CLOUD_NINE) Call(N(SpawnCloudNineFX)) @@ -1748,14 +1748,14 @@ EvtScript N(EVS_Move_Hurricane) = { IfEq(LVar0, 0) BreakLoop EndIf - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) IfEq(LVar0, 100) BreakLoop EndIf Wait(1) EndLoop Wait(15) - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) diff --git a/src/battle/partner/parakarry.c b/src/battle/partner/parakarry.c index ee3a8fb7aa..bfcd125b37 100644 --- a/src/battle/partner/parakarry.c +++ b/src/battle/partner/parakarry.c @@ -155,7 +155,6 @@ API_CALLABLE(N(ShellShotActionCommand)) { state->bounceDivisor = state->angle; state->dist = 116.0f; state->unk_18.x = state->angle; - i = 0; for (i = 0; i < 30; i++) { state->unk_18.x -= 1.0f; @@ -172,7 +171,6 @@ API_CALLABLE(N(ShellShotActionCommand)) { } state->unk_18.y = state->angle; - i = 0; for (i = 0; i < 30; i++) { state->unk_18.y += 1.0f; @@ -357,13 +355,13 @@ API_CALLABLE(N(GetShellShotDamage)) { s32 damage = 0; switch (battleStatus->partnerActor->actorBlueprint->level) { - case 0: + case PARTNER_RANK_NORMAL: damage = 5; break; - case 1: + case PARTNER_RANK_SUPER: damage = 6; break; - case 2: + case PARTNER_RANK_ULTRA: damage = 7; break; } @@ -987,7 +985,7 @@ EvtScript N(skyDive) = { Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_PostDive) Wait(2) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) @@ -1043,7 +1041,7 @@ EvtScript N(shellShot) = { Call(SetGoalToTarget, ACTOR_PARTNER) Call(AddGoalPos, ACTOR_PARTNER, 50, -50, 0) Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) - Call(FlyToGoal, ACTOR_PARTNER, 7, 0, 0x00000064) + Call(FlyToGoal, ACTOR_PARTNER, 7, 0, 100) Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) CaseEq(0) Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR) @@ -1169,7 +1167,7 @@ EvtScript N(airLift) = { EndLoop EndChildThread Wait(90 * DT) - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) Else Call(InterruptActionCommand) Set(LVar0, 0) @@ -1263,7 +1261,7 @@ EvtScript N(airRaid) = { IfEq(LVar0, 6) Goto(11) EndIf - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) @@ -1278,7 +1276,7 @@ EvtScript N(airRaid) = { IfNe(LVar0, ITER_NO_MORE) Goto(10) EndIf - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) Call(UseBattleCamPreset, BTL_CAM_RETURN_HOME) diff --git a/src/battle/partner/sushie.c b/src/battle/partner/sushie.c index add024ee91..14dfd4abd1 100644 --- a/src/battle/partner/sushie.c +++ b/src/battle/partner/sushie.c @@ -761,7 +761,7 @@ EvtScript N(EVS_Move_BellyFlop) = { EndIf EndLoop Thread - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Call(UseBattleCamPreset, BTL_CAM_PARTNER_MIDAIR) Call(MoveBattleCamOver, 20) EndThread @@ -777,7 +777,7 @@ EvtScript N(EVS_Move_BellyFlop) = { Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 20) EndThread Thread - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) IfGt(LVar0, 0) Call(GetMenuSelection, LVar0, LVar1, LVar2) Switch(LVar2) @@ -856,7 +856,7 @@ EvtScript N(EVS_Move_BellyFlop) = { EndThread Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_SUSHIE_BELLY_FLOP) Call(SetGoalToTarget, ACTOR_PARTNER) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) IfGt(LVar0, 0) Thread Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) @@ -910,7 +910,7 @@ EvtScript N(EVS_Move_BellyFlop) = { Wait(3) Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) EndThread - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) @@ -1061,7 +1061,7 @@ EvtScript N(EVS_Move_WaterBlock) = { Call(action_command_three_chances_start, 0, 100, AC_DIFFICULTY_3) Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_HoldWater) Wait(110) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) IfEq(LVar0, 0) Set(LVarA, LVar0) Goto(10) @@ -1105,7 +1105,7 @@ EvtScript N(EVS_Move_WaterBlock) = { Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) Call(N(PlayWaterBlockFX), LVar0, LVar1, LVar2) Wait(30) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Call(N(ApplyWaterBlock)) Set(LVarA, LVar0) Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) @@ -1197,7 +1197,7 @@ EvtScript N(EVS_Move_TidalWave) = { Wait(15) Call(UseBattleCamPreset, BTL_CAM_VIEW_ENEMIES) Call(MoveBattleCamOver, 20) - Call(GetActionSuccessCopy, LVar0) + Call(GetMashActionQuality, LVar0) Set(LVarE, LVar0) Set(LVarF, LVar0) Call(InitTargetIterator) diff --git a/src/battle/partner/watt.c b/src/battle/partner/watt.c index 5675de7a73..ce31c7a98c 100644 --- a/src/battle/partner/watt.c +++ b/src/battle/partner/watt.c @@ -942,7 +942,7 @@ EvtScript N(EVS_Attack_ElectroDash) = { Set(LVarE, 1) Set(LVarF, 5) EndSwitch - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_SHOCK_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) @@ -1057,7 +1057,7 @@ EvtScript N(EVS_Attack_PowerShock) = { Return EndIf Call(GetActionProgress, LVarF) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(0) Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), 254, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) @@ -1151,7 +1151,7 @@ EvtScript N(EVS_TurboCharge_HealthyPlayer) = { Call(UseBattleCamPreset, BTL_CAM_DEFAULT) Call(MoveBattleCamOver, 10) Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Call(N(ApplyTurboCharge)) Set(LVarE, LVarF) IfGt(LVarA, 0) @@ -1222,7 +1222,7 @@ EvtScript N(EVS_TurboCharge_ImmobilePlayer) = { Call(UseBattleCamPreset, BTL_CAM_DEFAULT) Call(MoveBattleCamOver, 10) Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Call(N(ApplyTurboCharge)) Set(LVarE, LVarF) IfGt(LVarA, 0) @@ -1347,7 +1347,7 @@ EvtScript N(EVS_Attack_MegaShock) = { Call(N(MegaShockFX), LVar0, LVar1, LVar2, LVar3) Loop(0) Call(SetGoalToTarget, ACTOR_SELF) - Call(GetPartnerActionSuccess, LVarF) + Call(GetPartnerActionQuality, LVarF) Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) IfEq(LVar0, HIT_RESULT_MISS) Goto(11) @@ -1367,7 +1367,7 @@ EvtScript N(EVS_Attack_MegaShock) = { Call(N(WattFXEnable)) Call(PartnerYieldTurn) Wait(30) - Call(GetPartnerActionSuccess, LVar0) + Call(GetPartnerActionQuality, LVar0) Switch(LVar0) CaseGt(99) ExecWait(N(EVS_ReturnHome_Success)) diff --git a/src/battle/player_events.c b/src/battle/player_events.c index a0207b05bc..ead895e326 100644 --- a/src/battle/player_events.c +++ b/src/battle/player_events.c @@ -1222,7 +1222,7 @@ EvtScript EVS_RunAwayStart = { Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) Call(PlayerHopToGoal, 8, 0, 0) - Call(GetActionSuccess, LVar0) + Call(GetSmashActionQuality, LVar0) Call(DetermineAutoRunAwaySuccess) IfEq(LVar0, 1) Call(SetFledBattleFlag) diff --git a/src/battle/use_moves.c b/src/battle/use_moves.c index 1aa82dc86b..c3bac30deb 100644 --- a/src/battle/use_moves.c +++ b/src/battle/use_moves.c @@ -15,7 +15,7 @@ extern EvtScript battle_move_auto_smash_EVS_UseMove; extern EvtScript battle_move_power_smash_EVS_UseMove; extern EvtScript battle_move_super_smash_EVS_UseMove; extern EvtScript battle_move_mega_smash_EVS_UseMove; -extern EvtScript battle_move_quake_hammer_EVS_UseMove0; +extern EvtScript battle_move_quake_hammer_EVS_UseMove; extern EvtScript battle_move_power_quake_EVS_UseMove; extern EvtScript battle_move_mega_quake_EVS_UseMove; extern EvtScript battle_move_hammer_throw_EVS_UseMove; @@ -27,12 +27,12 @@ extern EvtScript battle_move_shell_crack_EVS_UseMove; extern EvtScript battle_move_jump_attack_EVS_UseMove; extern EvtScript battle_move_jump_attack_EVS_FirstStrike; extern EvtScript battle_move_jump_attack_EVS_UseBerserker; -extern EvtScript battle_move_jump_charge_0_EVS_UseMove0; -extern EvtScript battle_move_jump_charge_0_EVS_UseMove1; -extern EvtScript battle_move_jump_charge_1_EVS_UseMove0; -extern EvtScript battle_move_jump_charge_1_EVS_UseMove1; -extern EvtScript battle_move_jump_charge_2_EVS_UseMove0; -extern EvtScript battle_move_jump_charge_2_EVS_UseMove1; +extern EvtScript battle_move_jump_charge_0_EVS_UseMove; +extern EvtScript battle_move_jump_charge_0_EVS_UseMove_Unimplemented; +extern EvtScript battle_move_jump_charge_1_EVS_UseMove; +extern EvtScript battle_move_jump_charge_1_EVS_UseMove_Unimplemented; +extern EvtScript battle_move_jump_charge_2_EVS_UseMove; +extern EvtScript battle_move_jump_charge_2_EVS_UseMove_Unimplemented; extern EvtScript battle_move_auto_jump_EVS_UseMove; extern EvtScript battle_move_power_jump_EVS_UseMove; extern EvtScript battle_move_super_jump_EVS_UseMove; @@ -56,7 +56,7 @@ BattleMoveEntry gMoveScriptTable[] = { [MOVE_FIRST_STRIKE_HAMMER] BTL_MOVE(hammer_attack, EVS_FirstStrike), [MOVE_BERSERKER_HAMMER] BTL_MOVE(hammer_attack, EVS_UseBerserker), [MOVE_SPIN_SMASH] BTL_MOVE(spin_smash, EVS_UseMove), - [MOVE_QUAKE_HAMMER] BTL_MOVE(quake_hammer, EVS_UseMove0), + [MOVE_QUAKE_HAMMER] BTL_MOVE(quake_hammer, EVS_UseMove), [MOVE_D_DOWN_POUND] BTL_MOVE(d_down_pound, EVS_UseMove), [MOVE_SMASH_CHARGE0] BTL_MOVE(hammer_charge_0, EVS_UseMove0), [MOVE_UNUSED_HAMMER_0C] BTL_MOVE(hammer_charge_0, EVS_UseMove1), @@ -82,12 +82,12 @@ BattleMoveEntry gMoveScriptTable[] = { [MOVE_POWER_BOUNCE] BTL_MOVE(power_bounce, EVS_UseMove), [MOVE_SLEEP_STOMP] BTL_MOVE(sleep_stomp, EVS_UseMove), [MOVE_DIZZY_STOMP] BTL_MOVE(dizzy_stomp, EVS_UseMove), - [MOVE_JUMP_CHARGE0] BTL_MOVE(jump_charge_0, EVS_UseMove0), - [MOVE_UNUSED_24] BTL_MOVE(jump_charge_0, EVS_UseMove1), - [MOVE_JUMP_CHARGE] BTL_MOVE(jump_charge_1, EVS_UseMove0), - [MOVE_UNUSED_26] BTL_MOVE(jump_charge_1, EVS_UseMove1), - [MOVE_SUPER_JUMP_CHARGE] BTL_MOVE(jump_charge_2, EVS_UseMove0), - [MOVE_UNUSED_28] BTL_MOVE(jump_charge_2, EVS_UseMove1), + [MOVE_JUMP_CHARGE0] BTL_MOVE(jump_charge_0, EVS_UseMove), + [MOVE_UNUSED_24] BTL_MOVE(jump_charge_0, EVS_UseMove_Unimplemented), + [MOVE_JUMP_CHARGE] BTL_MOVE(jump_charge_1, EVS_UseMove), + [MOVE_UNUSED_26] BTL_MOVE(jump_charge_1, EVS_UseMove_Unimplemented), + [MOVE_SUPER_JUMP_CHARGE] BTL_MOVE(jump_charge_2, EVS_UseMove), + [MOVE_UNUSED_28] BTL_MOVE(jump_charge_2, EVS_UseMove_Unimplemented), [MOVE_AUTO_JUMP] BTL_MOVE(auto_jump, EVS_UseMove), [MOVE_AUTO_MULTIBOUNCE] BTL_MOVE(auto_multibounce, EVS_UseMove), [MOVE_POWER_JUMP] BTL_MOVE(power_jump, EVS_UseMove), diff --git a/ver/ique/symbol_addrs.txt b/ver/ique/symbol_addrs.txt index 32fd4ecc2d..0ba256bd95 100644 --- a/ver/ique/symbol_addrs.txt +++ b/ver/ique/symbol_addrs.txt @@ -3688,12 +3688,12 @@ PlayerSuperJumpToGoal = 0x8027526C; PlayerUltraJumpToGoal = 0x80275EC0; GetActionCommandMode = 0x802692D8; GetActionProgress = 0x80269568; -GetActionResult = 0x802694E4; -GetActionSuccess = 0x80269254; -GetActionSuccessCopy = 0x802694B8; +GetJumpActionQuality = 0x802694E4; +GetSmashActionQuality = 0x80269254; +GetMashActionQuality = 0x802694B8; GetCommandAutoSuccess = 0x80269330; GetMenuSelection = 0x80273384; -GetPlayerActionSuccess = 0x80276E74; +GetPlayerActionQuality = 0x80276E74; GetTargetListLength = 0x8026E824; IsMessageBoxDisplayed = 0x8025134C; LoadActionCommand = 0x80268180; @@ -3774,7 +3774,7 @@ GetActorScale = 0x8026CA44; GetBattlePhase = 0x80269DE8; GetDistanceToGoal = 0x8026E9BC; GetLastEvent = 0x8027C4A0; -GetPartnerActionSuccess = 0x80280790; +GetPartnerActionQuality = 0x80280790; GetStatusFlags = 0x8026F1F0; HES_AimBlinkA = 0x802936CC; HES_AimMarkerA = 0x80292CDC; diff --git a/ver/pal/undefined_syms.txt b/ver/pal/undefined_syms.txt index cc4ae0f51f..a772fb990e 100644 --- a/ver/pal/undefined_syms.txt +++ b/ver/pal/undefined_syms.txt @@ -385,7 +385,7 @@ increment_action_command_attempt_count = 0x80269508; increment_action_command_success_count = 0x80269550; SetActionDifficultyTable = 0x8026958C; SetupMashMeter = 0x802695B8; -GetActionSuccess = 0x80269684; +GetSmashActionQuality = 0x80269684; SetActionSuccess = 0x802696B0; SetActionCommandMode = 0x802696DC; GetActionCommandMode = 0x80269708; @@ -394,8 +394,8 @@ SetCommandAutoSuccess = 0x8026978C; InterruptActionCommand = 0x80269800; InterruptLeechActionCommand = 0x80269860; ShowActionHud = 0x80269894; -GetActionSuccessCopy = 0x802698E8; -GetActionResult = 0x80269914; +GetMashActionQuality = 0x802698E8; +GetJumpActionQuality = 0x80269914; SetActionResult = 0x80269940; GetBlockResult = 0x8026996C; GetActionProgress = 0x80269998; @@ -596,7 +596,7 @@ PartnerDamageEnemy = 0x802801A4; PartnerAfflictEnemy = 0x802803F4; PartnerPowerBounceEnemy = 0x80280660; PartnerTestEnemy = 0x802808C0; -GetPartnerActionSuccess = 0x80280BC0; +GetPartnerActionQuality = 0x80280BC0; PartnerYieldTurn = 0x80280C08; GetDamageIntensity = 0x80280C30; LoadStarPowerScript = 0x80280D40; diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 6016569adc..876dd6e50c 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -6862,7 +6862,7 @@ increment_action_command_attempt_count = 0x80269118; // type:func rom:0x1979F8 increment_action_command_success_count = 0x80269160; // type:func rom:0x197A40 SetActionDifficultyTable = 0x8026919C; // type:func rom:0x197A7C SetupMashMeter = 0x802691C8; // type:func rom:0x197AA8 -GetActionSuccess = 0x80269294; // type:func rom:0x197B74 +GetSmashActionQuality = 0x80269294; // type:func rom:0x197B74 SetActionSuccess = 0x802692C0; // type:func rom:0x197BA0 SetActionCommandMode = 0x802692EC; // type:func rom:0x197BCC GetActionCommandMode = 0x80269318; // type:func rom:0x197BF8 @@ -6873,8 +6873,8 @@ func_802693F0 = 0x802693F0; // type:func rom:0x197CD0 InterruptActionCommand = 0x80269410; // type:func rom:0x197CF0 InterruptLeechActionCommand = 0x80269470; // type:func rom:0x197D50 ShowActionHud = 0x802694A4; // type:func rom:0x197D84 -GetActionSuccessCopy = 0x802694F8; // type:func rom:0x197DD8 -GetActionResult = 0x80269524; // type:func rom:0x197E04 +GetMashActionQuality = 0x802694F8; // type:func rom:0x197DD8 +GetJumpActionQuality = 0x80269524; // type:func rom:0x197E04 SetActionResult = 0x80269550; // type:func rom:0x197E30 GetBlockResult = 0x8026957C; // type:func rom:0x197E5C GetActionProgress = 0x802695A8; // type:func rom:0x197E88 @@ -7073,7 +7073,7 @@ ForceDisablePlayerBlurImmediately = 0x802749F8; // type:func rom:0x1A32D8 PlayerBasicJumpToGoal = 0x80274A18; // type:func rom:0x1A32F8 PlayerSuperJumpToGoal = 0x802752AC; // type:func rom:0x1A3B8C PlayerUltraJumpToGoal = 0x80275F00; // type:func rom:0x1A47E0 -GetPlayerActionSuccess = 0x80276EB4; // type:func rom:0x1A5794 +GetPlayerActionQuality = 0x80276EB4; // type:func rom:0x1A5794 PlayerYieldTurn = 0x80276EFC; // type:func rom:0x1A57DC DispatchEventPlayer = 0x80276F1C; // type:func rom:0x1A57FC has_enchanted_part = 0x80276F50; // type:func rom:0x1A5830 @@ -7161,7 +7161,7 @@ PartnerPowerBounceEnemy = 0x80280270; // type:func rom:0x1AEB50 PartnerTestEnemy = 0x802804D0; // type:func rom:0x1AEDB0 func_8028070C = 0x8028070C; // type:func rom:0x1AEFEC DeletePartner = 0x802807A8; // type:func rom:0x1AF088 -GetPartnerActionSuccess = 0x802807D0; // type:func rom:0x1AF0B0 +GetPartnerActionQuality = 0x802807D0; // type:func rom:0x1AF0B0 PartnerYieldTurn = 0x80280818; // type:func rom:0x1AF0F8 GetDamageIntensity = 0x80280840; // type:func rom:0x1AF120 AddEffectOffset = 0x80280880; // type:func rom:0x1AF160 @@ -14498,7 +14498,7 @@ battle_move_jump_charge_1_CalcJumpReboundTime = 0x802A1000; // type:func rom:0x7 battle_move_jump_charge_1_IsJumpMaxCharged = 0x802A10E4; // type:func rom:0x75CA64 func_802A1108_75CA88 = 0x802A1108; // type:func rom:0x75CA88 battle_move_jump_charge_1_UnkMoveFunc2 = 0x802A1228; // type:func rom:0x75CBA8 -func_802A133C_75CCBC = 0x802A133C; // type:func rom:0x75CCBC +battle_move_jump_charge_1_GetChargeMessage = 0x802A133C; // type:func rom:0x75CCBC battle_move_hammer_charge_2_IsBerserkerEquipped = 0x802A1000; // type:func rom:0x75E5D0 battle_move_hammer_charge_2_ShouldMovesAutoSucceed = 0x802A1050; // type:func rom:0x75E620 battle_move_hammer_charge_2_IsHammerMaxCharged = 0x802A10A4; // type:func rom:0x75E674 @@ -14507,9 +14507,9 @@ battle_move_hammer_charge_2_UnkMoveFunc3 = 0x802A11E8; // type:func rom:0x75E7B8 func_802A12FC_75E8CC = 0x802A12FC; // type:func rom:0x75E8CC battle_move_jump_charge_2_CalcJumpReboundTime = 0x802A1000; // type:func rom:0x761920 battle_move_jump_charge_2_IsJumpMaxCharged = 0x802A10E4; // type:func rom:0x761A04 -func_802A1108_761A28 = 0x802A1108; // type:func rom:0x761A28 +battle_move_jump_charge_2_func_802A1108_761A28 = 0x802A1108; // type:func rom:0x761A28 battle_move_jump_charge_2_UnkMoveFunc3 = 0x802A1228; // type:func rom:0x761B48 -func_802A133C_761C5C = 0x802A133C; // type:func rom:0x761C5C +battle_move_jump_charge_2_GetChargeMessage = 0x802A133C; // type:func rom:0x761C5C battle_move_auto_smash_IsBerserkerEquipped = 0x802A1000; // type:func rom:0x763540 battle_move_auto_smash_ShouldMovesAutoSucceed = 0x802A1050; // type:func rom:0x763590 battle_move_auto_jump_CalcJumpReboundTime = 0x802A1000; // type:func rom:0x765C20 @@ -14570,7 +14570,7 @@ battle_move_shell_crack_IsBerserkerEquipped = 0x802A1000; // type:func rom:0x77F battle_move_shell_crack_ShouldMovesAutoSucceed = 0x802A1050; // type:func rom:0x77F290 func_802A10A4_77F2E4 = 0x802A10A4; // type:func rom:0x77F2E4 battle_move_d_down_jump_CalcJumpReboundTime = 0x802A1000; // type:func rom:0x781920 -func_802A10E4_781A04 = 0x802A10E4; // type:func rom:0x781A04 +battle_move_d_down_jump_SpawnImpactFX = 0x802A10E4; // type:func rom:0x781A04 battle_move_shrink_stomp_CalcJumpReboundTime = 0x802A1000; // type:func rom:0x783BA0 battle_move_earthquake_jump_CalcJumpReboundTime = 0x802A1000; // type:func rom:0x785B20 func_802A10E4_785C04 = 0x802A10E4; // type:func rom:0x785C04