Merge pull request #479 from Birdulon/PartySize

Fix party size calculations for larger-than-six PARTY_SIZE
This commit is contained in:
GriffinR
2022-01-01 10:20:01 -05:00
committed by GitHub
+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++;