diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2020-04-10 14:05:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-10 14:05:35 -0400 |
commit | c08b4ff3e1bf49ca1d94a0daf3c8b17581893083 (patch) | |
tree | b608515803784b47af6c69f8931e6dcaeda165c8 /src/pokemon.c | |
parent | 8188615db8e1e84dbd14bc74eb2ca096c69ea14b (diff) | |
parent | 7a5deff0bc0f9ab00981e34680015c84618155b9 (diff) |
Merge pull request #1019 from GriffinRichards/constants-party
Add misc party constant usage
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++) |