From 5568895b043dc37e95be0e99787541d78a7c6fee Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Sat, 3 Aug 2019 23:59:41 +0800 Subject: ported battle_ai_switch_items from pokeem --- src/battle_controller_opponent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/battle_controller_opponent.c') diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 535715999..cd0cc70ad 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -1439,7 +1439,7 @@ static void OpponentHandleChoosePokemon(void) battler1 = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); battler2 = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); } - for (chosenMonId = 0; chosenMonId < 6; ++chosenMonId) + for (chosenMonId = 0; chosenMonId < PARTY_SIZE; ++chosenMonId) if (GetMonData(&gEnemyParty[chosenMonId], MON_DATA_HP) != 0 && chosenMonId != gBattlerPartyIndexes[battler1] && chosenMonId != gBattlerPartyIndexes[battler2]) -- cgit v1.2.3