Applied minor tweaks

-Made setbeakblast affect a specified battler instead of the gBattlerAttacker to justify the macro's layout.
-Added Shell Trap to the list of moves unaffected by Encore.
-Renamed CheckFocusPunch_ClearVarsBeforeTurnStarts into CheckChosenMoveForEffectsBeforeTurnStarts because that function doesn't just check for Focus Punch anymore, and it doesn't clear any variables either.
This commit is contained in:
LOuroboros 2022-12-28 08:33:31 -03:00
parent d120f2f183
commit 9bad91b167
2 changed files with 9 additions and 8 deletions

View File

@ -101,7 +101,7 @@ static void SetActionsAndBattlersTurnOrder(void);
static void UpdateBattlerPartyOrdersOnSwitch(void);
static bool8 AllAtActionConfirmed(void);
static void TryChangeTurnOrder(void);
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void);
static void CheckChosenMoveForEffectsBeforeTurnStarts(void);
static void CheckMegaEvolutionBeforeTurn(void);
static void CheckQuickClaw_CustapBerryActivation(void);
static void FreeResetData_ReturnToOvOrDoEvolutions(void);
@ -4879,7 +4879,7 @@ static void CheckMegaEvolutionBeforeTurn(void)
}
#if B_MEGA_EVO_TURN_ORDER <= GEN_6
gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts;
gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts;
gBattleStruct->focusPunchBattlerId = 0;
#else
gBattleMainFunc = TryChangeTurnOrder; // This will just do nothing if no mon has mega evolved
@ -4904,11 +4904,11 @@ static void TryChangeTurnOrder(void)
}
}
}
gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts;
gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts;
gBattleStruct->focusPunchBattlerId = 0;
}
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
static void CheckChosenMoveForEffectsBeforeTurnStarts(void)
{
u32 i;
@ -4922,7 +4922,7 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
&& !(gDisableStructs[gBattlerAttacker].truantCounter)
&& !(gProtectStructs[gActiveBattler].noValidMoves))
{
switch(gChosenMoveByBattler[gActiveBattler])
switch (gChosenMoveByBattler[gActiveBattler])
{
case MOVE_FOCUS_PUNCH:
BattleScriptExecute(BattleScript_FocusPunchSetUp);

View File

@ -10031,7 +10031,7 @@ static void Cmd_various(void)
gBattleMons[gActiveBattler].item = gLastUsedItem;
break;
case VARIOUS_SET_BEAK_BLAST:
gProtectStructs[gBattlerAttacker].beakBlastCharge = TRUE;
gProtectStructs[gActiveBattler].beakBlastCharge = TRUE;
break;
case VARIOUS_SWAP_SIDE_STATUSES:
CourtChangeSwapSideStatuses();
@ -11926,8 +11926,9 @@ static void Cmd_trysetencore(void)
}
if (gLastMoves[gBattlerTarget] == MOVE_STRUGGLE
|| gLastMoves[gBattlerTarget] == MOVE_ENCORE
|| gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE)
|| gLastMoves[gBattlerTarget] == MOVE_ENCORE
|| gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE
|| gLastMoves[gBattlerTarget] == MOVE_SHELL_TRAP)
{
i = MAX_MON_MOVES;
}