diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-11-06 15:41:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-06 15:41:25 -0500 |
commit | 8b1c2c946b3b58cc938f0496a9af11a641749a1e (patch) | |
tree | 4db08c6d6a2d585a0a42ee6f023faa9f6e8d13fb /src | |
parent | 75b12b86dcf5525371e2a8394b41e1cbd7c0c744 (diff) | |
parent | e31158d017c71110d421864beee166d1facbebd9 (diff) |
Merge pull request #1247 from PidgeyALT/attemptcountfix
use constants for ball throw count
Diffstat (limited to 'src')
-rw-r--r-- | src/tv.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -32,6 +32,7 @@ #include "decoration.h" #include "secret_base.h" #include "tv.h" +#include "pokeball.h" #include "data.h" #include "constants/battle_frontier.h" #include "constants/contest.h" @@ -963,7 +964,7 @@ void GabbyAndTyBeforeInterview(void) } if (!gBattleResults.usedMasterBall) { - for (i = 0; i < 11; i ++) + for (i = 0; i < POKEBALL_COUNT - 1; i ++) { if (gBattleResults.catchAttempts[i]) { @@ -1135,7 +1136,7 @@ void PutPokemonTodayCaughtOnAir(void) sCurTVShowSlot = FindEmptyTVSlotBeyondFirstFiveShowsOfArray(gSaveBlock1Ptr->tvShows); if (sCurTVShowSlot != -1 && HasMixableShowAlreadyBeenSpawnedWithPlayerID(TVSHOW_POKEMON_TODAY_CAUGHT, FALSE) != TRUE) { - for (i = 0; i < 11; i ++) + for (i = 0; i < POKEBALL_COUNT - 1; i ++) { ct += gBattleResults.catchAttempts[i]; } @@ -1152,7 +1153,7 @@ void PutPokemonTodayCaughtOnAir(void) } else { - for (i = 0; i < 11; i ++) + for (i = 0; i < POKEBALL_COUNT - 1; i ++) { ct += gBattleResults.catchAttempts[i]; } @@ -1203,7 +1204,7 @@ void PutPokemonTodayFailedOnTheAir(void) if (!rbernoulli(1, 1)) { - for (i = 0, ct = 0; i < 11; i ++) + for (i = 0, ct = 0; i < POKEBALL_COUNT - 1; i ++) { ct += gBattleResults.catchAttempts[i]; } @@ -2228,7 +2229,7 @@ void sub_80EE184(void) show->breakingNews.kind = TVSHOW_BREAKING_NEWS; show->breakingNews.active = FALSE; balls = 0; - for (i = 0; i < 11; i ++) + for (i = 0; i < POKEBALL_COUNT - 1; i ++) { balls += gBattleResults.catchAttempts[i]; } |