mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-30 05:53:57 -05:00
use IsValidForBattle
This commit is contained in:
@@ -1707,8 +1707,7 @@ static void OpponentHandleChoosePokemon(void)
|
||||
|
||||
for (chosenMonId = (lastId-1); chosenMonId >= firstId; chosenMonId--)
|
||||
{
|
||||
if (GetMonData(&gEnemyParty[chosenMonId], MON_DATA_HP) != 0
|
||||
&& GetMonData(&gEnemyParty[chosenMonId], MON_DATA_SPECIES) != SPECIES_NONE
|
||||
if (IsValidForBattle(&gEnemyParty[chosenMonId])
|
||||
&& chosenMonId != gBattlerPartyIndexes[battler1]
|
||||
&& chosenMonId != gBattlerPartyIndexes[battler2]
|
||||
&& (!(AI_THINKING_STRUCT->aiFlags & AI_FLAG_ACE_POKEMON)
|
||||
|
||||
Reference in New Issue
Block a user