Skip to content

Commit dddbfb1

Browse files
committed
[ClaimMysteryGift] throw exception when fails to reach Mystery Gift screen after several attempts. adjust which Autostory segments to run.
1 parent 9e7e470 commit dddbfb1

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,6 @@ void AutoStory_Segment_07::run_segment(
5555

5656
checkpoint_12(env, context, options.notif_status_update, stats);
5757

58-
// // Mystery Gift, delete later
59-
// enter_menu_from_overworld(env.program_info(), env.console, context, 2);
60-
// pbf_press_button(context, BUTTON_A, 20, 4 * TICKS_PER_SECOND);
61-
// pbf_press_dpad(context, DPAD_UP, 20, 105);
62-
// pbf_press_button(context, BUTTON_A, 20, 4 * TICKS_PER_SECOND);
63-
// pbf_press_dpad(context, DPAD_DOWN, 20, 105);
64-
// pbf_press_button(context, BUTTON_A, 20, 4 * TICKS_PER_SECOND);
65-
// pbf_press_button(context, BUTTON_A, 20, 10 * TICKS_PER_SECOND);
66-
// clear_dialog(env.console, context, ClearDialogMode::STOP_TIMEOUT, 10);
67-
6858
context.wait_for_all_requests();
6959
env.console.log("End Segment 07: Go to Mesagoza South", COLOR_GREEN);
7060

SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ClaimMysteryGift.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ void ClaimMysteryGift::claim_mystery_gift(SingleSwitchProgramEnvironment& env, P
205205
enter_mystery_gift_code(env, context);
206206
return;
207207
}
208+
209+
OperationFailedException::fire(
210+
ErrorReport::SEND_ERROR_REPORT,
211+
"claim_mystery_gift(): Failed to reach Mystery Gift screen after several attempts.",
212+
env.console
213+
);
208214
}
209215

210216
void ClaimMysteryGift::run_autostory_until_pokeportal_unlocked(SingleSwitchProgramEnvironment& env, ProControllerContext& context){
@@ -214,7 +220,7 @@ void ClaimMysteryGift::run_autostory_until_pokeportal_unlocked(SingleSwitchProgr
214220
NOTIFICATION_STATUS_UPDATE
215221
};
216222
AutoStoryStats stats; // unused
217-
for (size_t segment_index = 0; segment_index <= 7; segment_index++){
223+
for (size_t segment_index = 0; segment_index <= 6; segment_index++){
218224
ALL_AUTO_STORY_SEGMENT_LIST()[segment_index]->run_segment(env, context, options, stats);
219225
}
220226
}
@@ -235,7 +241,7 @@ void ClaimMysteryGift::program(SingleSwitchProgramEnvironment& env, ProControlle
235241
}else{
236242

237243
run_autostory_until_pokeportal_unlocked(env, context);
238-
244+
env.console.log("Done Autostory portion. Pokeportal should now be unlocked.");
239245
claim_mystery_gift(env, context, 2);
240246
}
241247

0 commit comments

Comments
 (0)