diff options
Diffstat (limited to 'src/pokemon.c')
-rw-r--r-- | src/pokemon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pokemon.c b/src/pokemon.c index ec29af02d..87ea2551f 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4394,7 +4394,7 @@ u8 CalculatePlayerPartyCount(void) { gPlayerPartyCount = 0; - while (gPlayerPartyCount < 6 + while (gPlayerPartyCount < PARTY_SIZE && GetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE) { gPlayerPartyCount++; @@ -4407,7 +4407,7 @@ u8 CalculateEnemyPartyCount(void) { gEnemyPartyCount = 0; - while (gEnemyPartyCount < 6 + while (gEnemyPartyCount < PARTY_SIZE && GetMonData(&gEnemyParty[gEnemyPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE) { gEnemyPartyCount++; @@ -4494,7 +4494,7 @@ void CreateSecretBaseEnemyParty(struct SecretBase *secretBaseRecord) SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleResources->secretBase->party.heldItems[i]); - for (j = 0; j < 6; j++) + for (j = 0; j < NUM_STATS; j++) SetMonData(&gEnemyParty[i], MON_DATA_HP_EV + j, &gBattleResources->secretBase->party.EVs[i]); for (j = 0; j < MAX_MON_MOVES; j++) |