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:
committed by
Marcus Huderle
parent
dcbc8db6a3
commit
2dd706ca54
@@ -1177,14 +1177,14 @@ static void sub_81A9834(void)
|
||||
{
|
||||
if (GetMonData(&gSaveBlock1Ptr->playerParty[id], MON_DATA_SPECIES, NULL) == GetMonData(&gPlayerParty[j], MON_DATA_SPECIES, NULL))
|
||||
{
|
||||
for (k = 0; k < 4; k++)
|
||||
for (k = 0; k < MAX_MON_MOVES; k++)
|
||||
{
|
||||
for (l = 0; l < 4; l++)
|
||||
for (l = 0; l < MAX_MON_MOVES; l++)
|
||||
{
|
||||
if (GetMonData(&gSaveBlock1Ptr->playerParty[id], MON_DATA_MOVE1 + l, NULL) == GetMonData(&gPlayerParty[j], MON_DATA_MOVE1 + k, NULL))
|
||||
break;
|
||||
}
|
||||
if (l == 4)
|
||||
if (l == MAX_MON_MOVES)
|
||||
SetMonMoveSlot(&gPlayerParty[j], MOVE_SKETCH, k);
|
||||
}
|
||||
gSaveBlock1Ptr->playerParty[id] = gPlayerParty[j];
|
||||
@@ -1360,7 +1360,7 @@ void GenerateBattlePyramidWildMon(void)
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
SetMonMoveSlot(&gEnemyParty[0], wildMons[id].moves[i], i);
|
||||
|
||||
if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] >= 140) // BUG: Reading outside the array as lvl was used for mon level instead of frontier lvl mode.
|
||||
|
||||
Reference in New Issue
Block a user