diff options
author | Diegoisawesome <Diegoisawesome@users.noreply.github.com> | 2018-11-18 13:36:34 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-18 13:36:34 -0600 |
commit | 963989d760a09eab46607efe1cbc1029f00e1842 (patch) | |
tree | 736036a1a493ad2d10b9418996350a247c0ff637 /src/battle_script_commands.c | |
parent | 0bbe03f17030c8009508714fc2b41703f1a1310a (diff) | |
parent | f58cc47e173900537200c796501386f4e3a1f0d6 (diff) |
Merge pull request #389 from DizzyEggg/num_stats
Use PARTY_SIZE and rename BATTLE_STATS_NO to NUM_BATTLE_STATS
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r-- | src/battle_script_commands.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ae397159a..07ab81a02 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3283,7 +3283,7 @@ static void atk23_getexp(void) u16 calculatedExp; s32 viaSentIn; - for (viaSentIn = 0, i = 0; i < 6; i++) + for (viaSentIn = 0, i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) == SPECIES_NONE || GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0) continue; @@ -3541,7 +3541,7 @@ static void atk24(void) } else { - for (i = 0; i < 6; i++) + for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostPlayerMons & gBitTable[i]))) @@ -3554,7 +3554,7 @@ static void atk24(void) if (HP_count == 0) gBattleOutcome |= B_OUTCOME_LOST; - for (HP_count = 0, i = 0; i < 6; i++) + for (HP_count = 0, i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG) && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostOpponentMons & gBitTable[i]))) @@ -4950,7 +4950,7 @@ static void atk4D_switchindataupdate(void) if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS) { - for (i = 0; i < BATTLE_STATS_NO; i++) + for (i = 0; i < NUM_BATTLE_STATS; i++) { gBattleMons[gActiveBattler].statStages[i] = oldData.statStages[i]; } @@ -7404,7 +7404,7 @@ static void atk8A_normalisebuffs(void) // haze for (i = 0; i < gBattlersCount; i++) { - for (j = 0; j < BATTLE_STATS_NO; j++) + for (j = 0; j < NUM_BATTLE_STATS; j++) gBattleMons[i].statStages[j] = 6; } @@ -9032,7 +9032,7 @@ static void atkBD_copyfoestats(void) // psych up { s32 i; - for (i = 0; i < BATTLE_STATS_NO; i++) + for (i = 0; i < NUM_BATTLE_STATS; i++) { gBattleMons[gBattlerAttacker].statStages[i] = gBattleMons[gBattlerTarget].statStages[i]; } |