summaryrefslogtreecommitdiff
path: root/src/daycare.c
diff options
context:
space:
mode:
authormelthelesbian <44884535+melthelesbian@users.noreply.github.com>2018-12-25 12:50:15 -0500
committerMarcus Huderle <huderlem@gmail.com>2018-12-25 11:50:15 -0600
commit2dd706ca5410d98ad214ceff7026d6db276f4d5a (patch)
tree20d184fb4f7e48d965c6c88b39dfd7fc11d3dd86 /src/daycare.c
parentdcbc8db6a32e70651163a132950d486d93a58254 (diff)
use max mon moves constant where able (#480)
* use max mon moves constant where able * fix errors in script commands file * fix more errors
Diffstat (limited to 'src/daycare.c')
-rw-r--r--src/daycare.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/daycare.c b/src/daycare.c
index 26fa0251e..6bdbd987e 100644
--- a/src/daycare.c
+++ b/src/daycare.c
@@ -636,7 +636,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
u16 i, j;
numSharedParentMoves = 0;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
sHatchedEggMotherMoves[i] = 0;
sHatchedEggFatherMoves[i] = 0;
@@ -648,7 +648,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
sHatchedEggLevelUpMoves[i] = 0;
numLevelUpMoves = GetLevelUpMovesBySpecies(GetMonData(egg, MON_DATA_SPECIES), sHatchedEggLevelUpMoves);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
sHatchedEggFatherMoves[i] = GetBoxMonData(father, MON_DATA_MOVE1 + i);
sHatchedEggMotherMoves[i] = GetBoxMonData(mother, MON_DATA_MOVE1 + i);
@@ -656,7 +656,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
numEggMoves = GetEggMoves(egg, sHatchedEggEggMoves);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
if (sHatchedEggFatherMoves[i] != MOVE_NONE)
{
@@ -675,7 +675,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
break;
}
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
if (sHatchedEggFatherMoves[i] != MOVE_NONE)
{
@@ -689,18 +689,18 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
}
}
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
if (sHatchedEggFatherMoves[i] == MOVE_NONE)
break;
- for (j = 0; j < 4; j++)
+ for (j = 0; j < MAX_MON_MOVES; j++)
{
if (sHatchedEggFatherMoves[i] == sHatchedEggMotherMoves[j] && sHatchedEggFatherMoves[i] != MOVE_NONE)
sHatchedEggFinalMoves[numSharedParentMoves++] = sHatchedEggFatherMoves[i];
}
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
if (sHatchedEggFinalMoves[i] == MOVE_NONE)
break;