From 43821d606fef3b367297f5d8158688165307a7a8 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:11:06 +0200 Subject: [PATCH] Fix Baton Pass for when Ace mon is the last alive (#3067) * Updated preproc config for Diamond Storm * Fix baton pass bug with IsAceMon remove not needed check --------- Co-authored-by: LOuroboros --- src/battle_ai_switch_items.c | 5 ++--- src/data/battle_moves.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index d7fd062ba2..9ef3477877 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -989,9 +989,8 @@ u8 GetMostSuitableMonToSwitchInto(void) if (bestMonId != PARTY_SIZE) return bestMonId; - // If ace mon is the last available Pokemon and U-Turn/Volt Switch was used - switch to the mon. - if (aceMonId != PARTY_SIZE - && (gBattleMoves[gLastUsedMove].effect == EFFECT_HIT_ESCAPE || gBattleMoves[gLastUsedMove].effect == EFFECT_PARTING_SHOT)) + // If ace mon is the last available Pokemon and switch move was used - switch to the mon. + if (aceMonId != PARTY_SIZE) return aceMonId; return PARTY_SIZE; diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index ef6ad52a1c..ebd64ae10b 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -9895,7 +9895,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_DIAMOND_STORM] = { - #if B_UPDATED_MOVE_DATA >= GEN_4 + #if B_UPDATED_MOVE_DATA >= GEN_7 .effect = EFFECT_DEFENSE_UP2_HIT, #else .effect = EFFECT_DEFENSE_UP_HIT,