Fix party size calculations for larger-than-six PARTY_SIZE

This commit is contained in:
Luke Hubmayer-Werner
2022-01-01 22:13:53 +10:30
parent 4c023cb8c7
commit 92d6d97c65
+2 -2
View File
@@ -3675,7 +3675,7 @@ u8 CalculatePlayerPartyCount(void)
{ {
gPlayerPartyCount = 0; gPlayerPartyCount = 0;
while (gPlayerPartyCount < 6 while (gPlayerPartyCount < PARTY_SIZE
&& GetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE) && GetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE)
{ {
gPlayerPartyCount++; gPlayerPartyCount++;
@@ -3689,7 +3689,7 @@ u8 CalculateEnemyPartyCount(void)
{ {
gEnemyPartyCount = 0; gEnemyPartyCount = 0;
while (gEnemyPartyCount < 6 while (gEnemyPartyCount < PARTY_SIZE
&& GetMonData(&gEnemyParty[gEnemyPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE) && GetMonData(&gEnemyParty[gEnemyPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE)
{ {
gEnemyPartyCount++; gEnemyPartyCount++;