summaryrefslogtreecommitdiff
path: root/src/frontier_util.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/frontier_util.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/frontier_util.c')
-rw-r--r--src/frontier_util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/frontier_util.c b/src/frontier_util.c
index 2fc58241a..c722230cd 100644
--- a/src/frontier_util.c
+++ b/src/frontier_util.c
@@ -2185,15 +2185,15 @@ static void sub_81A447C(void)
u16 monId = gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1;
if (monId < PARTY_SIZE)
{
- for (j = 0; j < 4; j++)
+ for (j = 0; j < MAX_MON_MOVES; j++)
{
- for (k = 0; k < 4; k++)
+ for (k = 0; k < MAX_MON_MOVES; k++)
{
if (GetMonData(&gSaveBlock1Ptr->playerParty[gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1], MON_DATA_MOVE1 + k, NULL)
== GetMonData(&gPlayerParty[i], MON_DATA_MOVE1 + j, NULL))
break;
}
- if (k == 4)
+ if (k == MAX_MON_MOVES)
SetMonMoveSlot(&gPlayerParty[i], MOVE_SKETCH, j);
}
gSaveBlock1Ptr->playerParty[gSaveBlock2Ptr->frontier.selectedPartyMons[i] - 1] = gPlayerParty[i];
@@ -2511,7 +2511,7 @@ void CreateFrontierBrainPokemon(void)
for (j = 0; j < NUM_STATS; j++)
SetMonData(&gEnemyParty[monPartyId], MON_DATA_HP_EV + j, &sFrontierBrainsMons[facility][symbol][i].evs[j]);
friendship = 0xFF;
- for (j = 0; j < 4; j++)
+ for (j = 0; j < MAX_MON_MOVES; j++)
{
SetMonMoveSlot(&gEnemyParty[monPartyId], sFrontierBrainsMons[facility][symbol][i].moves[j], j);
if (sFrontierBrainsMons[facility][symbol][i].moves[j] == MOVE_FRUSTRATION)