From 2dd706ca5410d98ad214ceff7026d6db276f4d5a Mon Sep 17 00:00:00 2001 From: melthelesbian <44884535+melthelesbian@users.noreply.github.com> Date: Tue, 25 Dec 2018 12:50:15 -0500 Subject: use max mon moves constant where able (#480) * use max mon moves constant where able * fix errors in script commands file * fix more errors --- src/frontier_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/frontier_util.c') 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) -- cgit v1.2.3 From d59f5a8e5649ad09a41b65edcc68f701320ca52e Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Thu, 27 Dec 2018 16:30:47 -0600 Subject: Misc overworld documentation --- src/frontier_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/frontier_util.c') diff --git a/src/frontier_util.c b/src/frontier_util.c index c722230cd..40b1edbe3 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -2407,9 +2407,9 @@ void sub_81A4C30(void) i = gPlayerPartyCount; LoadPlayerParty(); - sub_8076D5C(); + SetContinueGameWarpStatusToDynamicWarp(); TrySavingData(SAVE_LINK); - sav2_gender2_inplace_and_xFE(); + ClearContinueGameWarpStatus2(); gPlayerPartyCount = i; for (i = 0; i < PARTY_SIZE; i++) -- cgit v1.2.3