summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Hubmayer-Werner <mongoose41@gmail.com>2022-01-01 22:13:53 +1030
committerLuke Hubmayer-Werner <mongoose41@gmail.com>2022-01-01 22:23:41 +1030
commit92d6d97c654391a82fba605b2af29e2aa99bdc00 (patch)
tree2018660bf98c074452dad5b506d2e3a841bb3473
parent4c023cb8c7fb6e5e8f13867b39c3fbb9f7e7b6b1 (diff)
Fix party size calculations for larger-than-six PARTY_SIZE
-rw-r--r--src/pokemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index 0bbb9f81e..01b06a1af 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -3675,7 +3675,7 @@ u8 CalculatePlayerPartyCount(void)
{
gPlayerPartyCount = 0;
- while (gPlayerPartyCount < 6
+ while (gPlayerPartyCount < PARTY_SIZE
&& GetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE)
{
gPlayerPartyCount++;
@@ -3689,7 +3689,7 @@ u8 CalculateEnemyPartyCount(void)
{
gEnemyPartyCount = 0;
- while (gEnemyPartyCount < 6
+ while (gEnemyPartyCount < PARTY_SIZE
&& GetMonData(&gEnemyParty[gEnemyPartyCount], MON_DATA_SPECIES, NULL) != SPECIES_NONE)
{
gEnemyPartyCount++;