Merge pull request #2544 from LOuroboros/miscs

Applied minor tweaks
This commit is contained in:
Eduardo Quezada D'Ottone 2022-12-30 17:51:55 -03:00 committed by GitHub
commit 2d222ad0a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
@ -4922,7 +4922,7 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
&& !(gDisableStructs[gBattlerAttacker].truantCounter) && !(gDisableStructs[gBattlerAttacker].truantCounter)
&& !(gProtectStructs[gActiveBattler].noValidMoves)) && !(gProtectStructs[gActiveBattler].noValidMoves))
{ {
switch(gChosenMoveByBattler[gActiveBattler]) switch (gChosenMoveByBattler[gActiveBattler])
{ {
case MOVE_FOCUS_PUNCH: case MOVE_FOCUS_PUNCH:
BattleScriptExecute(BattleScript_FocusPunchSetUp); BattleScriptExecute(BattleScript_FocusPunchSetUp);

View file

@ -10092,7 +10092,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();
@ -12026,8 +12026,9 @@ 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;
} }