use max mon moves constant where able (#480)

* use max mon moves constant where able

* fix errors in script commands file

* fix more errors
This commit is contained in:
melthelesbian
2018-12-25 12:50:15 -05:00
committed by Marcus Huderle
parent dcbc8db6a3
commit 2dd706ca54
33 changed files with 265 additions and 260 deletions
+7 -7
View File
@@ -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;