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 void UpdateBattlerPartyOrdersOnSwitch(void);
static bool8 AllAtActionConfirmed(void); static bool8 AllAtActionConfirmed(void);
static void TryChangeTurnOrder(void); static void TryChangeTurnOrder(void);
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void); static void CheckChosenMoveForEffectsBeforeTurnStarts(void);
static void CheckMegaEvolutionBeforeTurn(void); static void CheckMegaEvolutionBeforeTurn(void);
static void CheckQuickClaw_CustapBerryActivation(void); static void CheckQuickClaw_CustapBerryActivation(void);
static void FreeResetData_ReturnToOvOrDoEvolutions(void); static void FreeResetData_ReturnToOvOrDoEvolutions(void);
@ -4879,7 +4879,7 @@ static void CheckMegaEvolutionBeforeTurn(void)
} }
#if B_MEGA_EVO_TURN_ORDER <= GEN_6 #if B_MEGA_EVO_TURN_ORDER <= GEN_6
gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts;
gBattleStruct->focusPunchBattlerId = 0; gBattleStruct->focusPunchBattlerId = 0;
#else #else
gBattleMainFunc = TryChangeTurnOrder; // This will just do nothing if no mon has mega evolved 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; gBattleStruct->focusPunchBattlerId = 0;
} }
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) static void CheckChosenMoveForEffectsBeforeTurnStarts(void)
{ {
u32 i; u32 i;

View file

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