diff options
author | Tetrable <atiftetra@gmail.com> | 2018-09-01 12:36:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-01 12:36:33 +0100 |
commit | 5a53d6d1fb304736c1fb3c222192a3b722707bca (patch) | |
tree | eb1794c8da8a8b51caa4abc0de8b797c49ead358 /src/battle_controller_opponent.c | |
parent | d8f6da035015393339ea6391d293e5ff88558844 (diff) | |
parent | 1895383352da3bd5a4f4990fab045ae3610937fc (diff) |
Merge pull request #2 from pret/master
Update
Diffstat (limited to 'src/battle_controller_opponent.c')
-rw-r--r-- | src/battle_controller_opponent.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 1eaa9da18..6148587f8 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -1606,22 +1606,22 @@ static void OpponentHandleChoosePokemon(void) { s32 chosenMonId; - if (*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) == 6) + if (*(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) == PARTY_SIZE) { chosenMonId = GetMostSuitableMonToSwitchInto(); - if (chosenMonId == 6) + if (chosenMonId == PARTY_SIZE) { - s32 bank1, bank2, firstId, lastId; + s32 battler1, battler2, firstId, lastId; if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) { - bank2 = bank1 = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + battler2 = battler1 = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); } else { - bank1 = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); - bank2 = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); + battler1 = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); + battler2 = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); } if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_x800000)) @@ -1639,8 +1639,8 @@ static void OpponentHandleChoosePokemon(void) for (chosenMonId = firstId; chosenMonId < lastId; chosenMonId++) { if (GetMonData(&gEnemyParty[chosenMonId], MON_DATA_HP) != 0 - && chosenMonId != gBattlerPartyIndexes[bank1] - && chosenMonId != gBattlerPartyIndexes[bank2]) + && chosenMonId != gBattlerPartyIndexes[battler1] + && chosenMonId != gBattlerPartyIndexes[battler2]) { break; } @@ -1650,7 +1650,7 @@ static void OpponentHandleChoosePokemon(void) else { chosenMonId = *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler); - *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = 6; + *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; } |