Merge pull request #2324 from ghoulslash/be/aiswitch
fix ai switch semi invulnerable
This commit is contained in:
commit
ed81ec41bc
1 changed files with 2 additions and 0 deletions
|
@ -371,6 +371,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void)
|
|||
|
||||
//Semi-Invulnerable
|
||||
if (gStatuses3[opposingBattler] & STATUS3_SEMI_INVULNERABLE)
|
||||
{
|
||||
if (FindMonThatAbsorbsOpponentsMove()) //If find absorber default to switch
|
||||
switchMon = TRUE;
|
||||
if (!AI_OpponentCanFaintAiWithMod(0)
|
||||
|
@ -380,6 +381,7 @@ static bool8 ShouldSwitchIfGameStatePrompt(void)
|
|||
&& !WillAIStrikeFirst()
|
||||
&& !AI_OpponentCanFaintAiWithMod(0))
|
||||
switchMon = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (switchMon)
|
||||
|
|
Loading…
Reference in a new issue