Skip to content

Commit 9e6a8e3

Browse files
committed
checkpoint 97: enter station 2. disabled the locks.
1 parent c01c758 commit 9e6a8e3

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

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

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void AutoStory_Checkpoint_96::run_checkpoint(SingleSwitchProgramEnvironment& env
6969

7070
std::string AutoStory_Checkpoint_97::name() const{ return "097 - " + AutoStory_Segment_36().name(); }
7171
std::string AutoStory_Checkpoint_97::start_text() const{ return AutoStory_Checkpoint_96().end_text();}
72-
std::string AutoStory_Checkpoint_97::end_text() const{ return "";}
72+
std::string AutoStory_Checkpoint_97::end_text() const{ return "Inside Area Zero Station 2. Deactivated the locks.";}
7373
void AutoStory_Checkpoint_97::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{
7474
checkpoint_97(env, context, options.notif_status_update, stats);
7575
}
@@ -327,6 +327,37 @@ void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& co
327327
}
328328

329329
void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){
330+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
331+
[&](size_t attempt_number){
332+
333+
YOLOv5Detector yolo_detector(RESOURCE_PATH() + "PokemonSV/YOLO/station-door-1.onnx"); // we can reuse the detector for station door 1.
334+
335+
do_action_until_dialog(env.program_info(), env.console, context,
336+
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
337+
pbf_press_button(context, BUTTON_R, 160ms, 0ms);
338+
move_player_forward(env, context, 20,
339+
[&](){
340+
run_wild_battle_press_A(env.console, context, BattleStopCondition::STOP_OVERWORLD);
341+
move_camera_yolo(env, context, CameraAxis::X, yolo_detector, "station-door-1", 0.5,
342+
[&](){
343+
run_wild_battle_press_A(env.console, context, BattleStopCondition::STOP_OVERWORLD);
344+
pbf_move_left_joystick(context, 128, 0, 10, 50); // move forward to align with camera
345+
}
346+
);
347+
pbf_move_left_joystick(context, 128, 0, 10, 50); // move forward to align with camera
348+
}
349+
);
350+
}
351+
);
352+
353+
mash_button_till_overworld(env.console, context, BUTTON_A); // black dialog
354+
355+
// disable Lock at Station 2
356+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 20);
357+
clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 120, {CallbackEnum::OVERWORLD, CallbackEnum::BLACK_DIALOG_BOX, CallbackEnum::PROMPT_DIALOG, CallbackEnum::WHITE_A_BUTTON});
358+
359+
360+
});
330361
}
331362

332363
// void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class AutoStory_Checkpoint_97 : public AutoStory_Checkpoint{
6262
// end: Outside Area Zero Station 2. Defeated Scream Tail/Iron Bundle.
6363
void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats);
6464

65-
// start:
66-
// end:
65+
// start: Outside Area Zero Station 2. Defeated Scream Tail/Iron Bundle.
66+
// end: Inside Area Zero Station 2. Deactivated the locks.
6767
void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats);
6868

6969
// start:

0 commit comments

Comments
 (0)