Skip to content

Commit

Permalink
fix ai switch semi invulnerable
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoulslash committed Sep 15, 2022
1 parent 133aa9e commit 20190ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/battle_ai_switch_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -380,6 +380,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void)
&& !WillAIStrikeFirst()
&& !AI_OpponentCanFaintAiWithMod(0))
switchMon = FALSE;
}
}

if (switchMon)
Expand Down

0 comments on commit 20190ac

Please sign in to comment.