From 20190ac85a7f5b744a799567033459052c151f7f Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Thu, 15 Sep 2022 18:34:15 -0400 Subject: [PATCH 1/2] fix ai switch semi invulnerable --- src/battle_ai_switch_items.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 4948113a21..f6ce4622f1 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -370,7 +370,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) //Pass Wish Heal //Semi-Invulnerable - if (gStatuses3[opposingBattler] & STATUS3_SEMI_INVULNERABLE) + if (gStatuses3[opposingBattler] & STATUS3_SEMI_INVULNERABLE) { if (FindMonThatAbsorbsOpponentsMove()) //If find absorber default to switch switchMon = TRUE; if (!AI_OpponentCanFaintAiWithMod(0) @@ -380,6 +380,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) && !WillAIStrikeFirst() && !AI_OpponentCanFaintAiWithMod(0)) switchMon = FALSE; + } } if (switchMon) From 95a3ead254a27afcc1054418f056a660f95d35bf Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Thu, 15 Sep 2022 22:10:39 -0400 Subject: [PATCH 2/2] styling fix --- src/battle_ai_switch_items.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index f6ce4622f1..3c3410e30b 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -370,7 +370,8 @@ static bool8 ShouldSwitchIfGameStatePrompt(void) //Pass Wish Heal //Semi-Invulnerable - if (gStatuses3[opposingBattler] & STATUS3_SEMI_INVULNERABLE) { + if (gStatuses3[opposingBattler] & STATUS3_SEMI_INVULNERABLE) + { if (FindMonThatAbsorbsOpponentsMove()) //If find absorber default to switch switchMon = TRUE; if (!AI_OpponentCanFaintAiWithMod(0)