summaryrefslogtreecommitdiff
path: root/src/battle_pyramid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_pyramid.c')
-rw-r--r--src/battle_pyramid.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c
index ac6d95338..50efeecb4 100644
--- a/src/battle_pyramid.c
+++ b/src/battle_pyramid.c
@@ -933,7 +933,7 @@ static void SavePyramidChallenge(void)
gSaveBlock2Ptr->frontier.challengeStatus = gSpecialVar_0x8005;
VarSet(VAR_TEMP_0, 0);
gSaveBlock2Ptr->frontier.challengePaused = TRUE;
- save_serialize_map();
+ SaveMapView();
TrySavingData(SAVE_LINK);
}
@@ -1399,8 +1399,12 @@ void GenerateBattlePyramidWildMon(void)
for (i = 0; i < MAX_MON_MOVES; i++)
SetMonMoveSlot(&gEnemyParty[0], wildMons[id].moves[i], i);
- // BUG: Reading outside the array as lvl was used for mon level instead of frontier lvl mode.
+ // UB: Reading outside the array as lvl was used for mon level instead of frontier lvl mode.
+ #ifndef UBFIX
if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] >= 140)
+ #else
+ if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[gSaveBlock2Ptr->frontier.lvlMode] >= 140)
+ #endif
{
id = (Random() % 17) + 15;
for (i = 0; i < NUM_STATS; i++)