Merge pull request #2544 from LOuroboros/miscs

Applied minor tweaks
This commit is contained in:
Eduardo Quezada D'Ottone authored and GitHub committed 2022-12-30 17:51:55 -03:00
commit 2d222ad0a9
2 files changed
+9 -8

No files matched your search

+5 -5
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);
+4 -3
View File
@@ -10092,7 +10092,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();
@@ -12026,8 +12026,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;
}