mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Add some missing PARTY_SIZE usage
This commit is contained in:
parent
6d6a876dbd
commit
5b3596108d
@ -751,7 +751,7 @@ u8 GetMostSuitableMonToSwitchInto(void)
|
||||
gMoveResultFlags = 0;
|
||||
gCritMultiplier = 1;
|
||||
bestDmg = 0;
|
||||
bestMonId = 6;
|
||||
bestMonId = PARTY_SIZE;
|
||||
|
||||
// If we couldn't find the best mon in terms of typing, find the one that deals most damage.
|
||||
for (i = firstId; i < lastId; i++)
|
||||
|
@ -1151,7 +1151,7 @@ static void OpponentHandleLoadMonSprite(void)
|
||||
|
||||
static void OpponentHandleSwitchInAnim(void)
|
||||
{
|
||||
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = 6;
|
||||
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
gBattlerPartyIndexes[gActiveBattler] = gBattleBufferA[gActiveBattler][1];
|
||||
StartSendOutAnim(gActiveBattler, gBattleBufferA[gActiveBattler][2]);
|
||||
gBattlerControllerFuncs[gActiveBattler] = SwitchIn_TryShinyAnim;
|
||||
@ -1635,13 +1635,13 @@ static void OpponentHandleChoosePokemon(void)
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_TOWER_LINK_MULTI))
|
||||
{
|
||||
if (gActiveBattler == 1)
|
||||
firstId = 0, lastId = 3;
|
||||
firstId = 0, lastId = PARTY_SIZE / 2;
|
||||
else
|
||||
firstId = 3, lastId = 6;
|
||||
firstId = PARTY_SIZE / 2, lastId = PARTY_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
firstId = 0, lastId = 6;
|
||||
firstId = 0, lastId = PARTY_SIZE;
|
||||
}
|
||||
|
||||
for (chosenMonId = firstId; chosenMonId < lastId; chosenMonId++)
|
||||
|
@ -1540,12 +1540,12 @@ static void PlayerPartnerHandleChoosePokemon(void)
|
||||
{
|
||||
s32 chosenMonId = GetMostSuitableMonToSwitchInto();
|
||||
|
||||
if (chosenMonId == 6) // just switch to the next mon
|
||||
if (chosenMonId == PARTY_SIZE) // just switch to the next mon
|
||||
{
|
||||
u8 playerMonIdentity = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
u8 selfIdentity = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||
|
||||
for (chosenMonId = 3; chosenMonId < 6; chosenMonId++)
|
||||
for (chosenMonId = PARTY_SIZE / 2; chosenMonId < PARTY_SIZE; chosenMonId++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[chosenMonId], MON_DATA_HP) != 0
|
||||
&& chosenMonId != gBattlerPartyIndexes[playerMonIdentity]
|
||||
|
Loading…
Reference in New Issue
Block a user