From 7415071b45d5c2540350e18496caa25ab9485001 Mon Sep 17 00:00:00 2001 From: jw098 Date: Thu, 13 Aug 2026 22:45:52 -0700 Subject: [PATCH 1/9] disable download of Area Zero models (for now) --- .../PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index 3765d72163..6be72c965b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -375,7 +375,7 @@ AutoStory_Descriptor::AutoStory_Descriptor() AllowCommandsWhenRunning::DISABLE_COMMANDS, false, { - "PokemonSV/AreaZero", + // "PokemonSV/AreaZero", // "PaddleOCR" // not needed since an OCR library is bundled with this program } ) @@ -1246,6 +1246,8 @@ void AutoStory::test_code(SingleSwitchProgramEnvironment& env, ProControllerCont DirectionDetector direction; + + // YOLOv5Detector yolo_detector(RESOURCE_PATH() + "PokemonSV/YOLO/A0-station-2.onnx"); // move_camera_yolo(env, context, CameraAxis::Y, yolo_detector, "tree-tera", 0.294444); From 9c58b10ebfb64dd50a2208a2e971b4e835775225 Mon Sep 17 00:00:00 2001 From: jw098 Date: Thu, 13 Aug 2026 23:13:16 -0700 Subject: [PATCH 2/9] if-def headers only used for testing --- .../Programs/AutoStory/PokemonSV_AutoStory.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index 6be72c965b..49623a1b5d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -4,15 +4,21 @@ * */ + + +#if 0 +#include "CommonTools/Async/InferenceRoutines.h" +#include "CommonTools/VisualDetectors/BlackScreenDetector.h" +#include "CommonFramework/Exceptions/UnexpectedBattleException.h" +#include "CommonFramework/Exceptions/OperationFailedException.h" +#endif + #include "CommonFramework/StaticGlobals.h" #include "CommonFramework/GlobalAutoPaths.h" #include "CommonFramework/VideoPipeline/VideoFeed.h" -//#include "CommonFramework/Exceptions/UnexpectedBattleException.h" -//#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/Notifications/ProgramNotifications.h" #include "CommonFramework/VideoPipeline/VideoFeed.h" #include "CommonFramework/ProgramStats/StatsTracking.h" -//#include "CommonTools/Async/InferenceRoutines.h" #include "CommonTools/StartupChecks/StartProgramChecks.h" #include "CommonTools/StartupChecks/VideoResolutionCheck.h" #include "ML/Inference/ML_YOLOv5Detector.h" From b7ff01220eca8f91175dad7756002549a964e919 Mon Sep 17 00:00:00 2001 From: jw098 Date: Thu, 13 Aug 2026 23:22:14 -0700 Subject: [PATCH 3/9] checkpoint 86: adjust glide routine from academy to route leading to Pokemon League. --- .../PokemonSV_AutoStory_Segment_33.cpp | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp index cb81c985f8..f4a0a95280 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp @@ -5,6 +5,7 @@ */ #include "CommonFramework/VideoPipeline/VideoFeed.h" #include "CommonTools/Images/SolidColorTest.h" +#include "CommonTools/VisualDetectors/BlackScreenDetector.h" #include "Pokemon/Inference/Pokemon_NameReader.h" #include "CommonFramework/Notifications/ProgramInfo.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" @@ -143,13 +144,30 @@ void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& co pbf_move_left_joystick(context, {0, +1}, 8800ms, 400ms); get_on_ride(env.program_info(), env.console, context); - direction.change_direction(env.program_info(), env.console, context, 1.484555); + direction.change_direction(env.program_info(), env.console, context, 1.761373); - pbf_move_left_joystick(context, {0, +1}, 1506ms, 0ms); + pbf_move_left_joystick(context, {0, +1}, 1300ms, 0ms); pbf_controller_state(context, BUTTON_B, DPAD_NONE, {0, +1}, {0, 0}, 703ms); pbf_move_left_joystick(context, {0, +1}, 233ms, 0ms); pbf_controller_state(context, BUTTON_B, DPAD_NONE, {0, +1}, {0, 0}, 5098ms); - pbf_move_left_joystick(context, {0, +1}, 1000ms, 0ms); + + BlackScreenWatcher black_screen(COLOR_RED); + int ret = run_until( + env.console, context, + [](ProControllerContext& context){ + pbf_move_left_joystick(context, {0, +1}, 10000ms, 0ms); + }, + { black_screen } + ); + if (ret < 0){ + OperationFailedException::fire( + ErrorReport::SEND_ERROR_REPORT, + "Never detected black screen. Failed to glide from the Academy to the route leading to the Pokemon League.", + env.console + ); + } + + env.console.log("Detected black screen. Likely successful glide from the Academy to the route leading to the Pokemon League."); wait_for_overworld(env.program_info(), env.console, context); From 82e8b433c04701981fe8cff49474e77169bfee94 Mon Sep 17 00:00:00 2001 From: jw098 Date: Fri, 14 Aug 2026 13:03:56 -0700 Subject: [PATCH 4/9] add checkpoint_text to checkpoint_reattempt_loop --- .../AutoStory/PokemonSV_AutoStory.cpp | 237 +++++++++--------- .../AutoStory/PokemonSV_AutoStoryTools.cpp | 14 +- .../AutoStory/PokemonSV_AutoStoryTools.h | 14 +- .../PokemonSV_AutoStory_Segment_01.cpp | 31 +-- .../PokemonSV_AutoStory_Segment_01.h | 5 +- .../PokemonSV_AutoStory_Segment_02.cpp | 11 +- .../PokemonSV_AutoStory_Segment_02.h | 3 +- .../PokemonSV_AutoStory_Segment_03.cpp | 33 +-- .../PokemonSV_AutoStory_Segment_03.h | 9 +- .../PokemonSV_AutoStory_Segment_04.cpp | 11 +- .../PokemonSV_AutoStory_Segment_04.h | 3 +- .../PokemonSV_AutoStory_Segment_05.cpp | 22 +- .../PokemonSV_AutoStory_Segment_05.h | 6 +- .../PokemonSV_AutoStory_Segment_06.cpp | 11 +- .../PokemonSV_AutoStory_Segment_06.h | 3 +- .../PokemonSV_AutoStory_Segment_07.cpp | 11 +- .../PokemonSV_AutoStory_Segment_07.h | 3 +- .../PokemonSV_AutoStory_Segment_08.cpp | 33 +-- .../PokemonSV_AutoStory_Segment_08.h | 9 +- .../PokemonSV_AutoStory_Segment_09.cpp | 55 ++-- .../PokemonSV_AutoStory_Segment_09.h | 15 +- .../PokemonSV_AutoStory_Segment_10.cpp | 33 +-- .../PokemonSV_AutoStory_Segment_10.h | 9 +- .../PokemonSV_AutoStory_Segment_11.cpp | 44 ++-- .../PokemonSV_AutoStory_Segment_11.h | 12 +- .../PokemonSV_AutoStory_Segment_12.cpp | 11 +- .../PokemonSV_AutoStory_Segment_12.h | 3 +- .../PokemonSV_AutoStory_Segment_13.cpp | 11 +- .../PokemonSV_AutoStory_Segment_13.h | 3 +- .../PokemonSV_AutoStory_Segment_14.cpp | 22 +- .../PokemonSV_AutoStory_Segment_14.h | 6 +- .../PokemonSV_AutoStory_Segment_15.cpp | 33 +-- .../PokemonSV_AutoStory_Segment_15.h | 9 +- .../PokemonSV_AutoStory_Segment_16.cpp | 22 +- .../PokemonSV_AutoStory_Segment_16.h | 6 +- .../PokemonSV_AutoStory_Segment_17.cpp | 22 +- .../PokemonSV_AutoStory_Segment_17.h | 6 +- .../PokemonSV_AutoStory_Segment_18.cpp | 22 +- .../PokemonSV_AutoStory_Segment_18.h | 6 +- .../PokemonSV_AutoStory_Segment_19.cpp | 22 +- .../PokemonSV_AutoStory_Segment_19.h | 6 +- .../PokemonSV_AutoStory_Segment_20.cpp | 44 ++-- .../PokemonSV_AutoStory_Segment_20.h | 12 +- .../PokemonSV_AutoStory_Segment_21.cpp | 33 +-- .../PokemonSV_AutoStory_Segment_21.h | 9 +- .../PokemonSV_AutoStory_Segment_22.cpp | 44 ++-- .../PokemonSV_AutoStory_Segment_22.h | 12 +- .../PokemonSV_AutoStory_Segment_23.cpp | 11 +- .../PokemonSV_AutoStory_Segment_23.h | 3 +- .../PokemonSV_AutoStory_Segment_24.cpp | 33 +-- .../PokemonSV_AutoStory_Segment_24.h | 9 +- .../PokemonSV_AutoStory_Segment_25.cpp | 33 +-- .../PokemonSV_AutoStory_Segment_25.h | 9 +- .../PokemonSV_AutoStory_Segment_26.cpp | 33 +-- .../PokemonSV_AutoStory_Segment_26.h | 9 +- .../PokemonSV_AutoStory_Segment_27.cpp | 24 +- .../PokemonSV_AutoStory_Segment_27.h | 8 +- .../PokemonSV_AutoStory_Segment_28.cpp | 18 +- .../PokemonSV_AutoStory_Segment_28.h | 6 +- .../PokemonSV_AutoStory_Segment_29.cpp | 24 +- .../PokemonSV_AutoStory_Segment_29.h | 8 +- .../PokemonSV_AutoStory_Segment_30.cpp | 18 +- .../PokemonSV_AutoStory_Segment_30.h | 6 +- .../PokemonSV_AutoStory_Segment_31.cpp | 30 +-- .../PokemonSV_AutoStory_Segment_31.h | 10 +- .../PokemonSV_AutoStory_Segment_32.cpp | 12 +- .../PokemonSV_AutoStory_Segment_32.h | 4 +- .../PokemonSV_AutoStory_Segment_33.cpp | 30 +-- .../PokemonSV_AutoStory_Segment_33.h | 10 +- .../PokemonSV_AutoStory_Segment_34.cpp | 18 +- .../PokemonSV_AutoStory_Segment_34.h | 6 +- .../PokemonSV_AutoStory_Segment_35.cpp | 18 +- .../PokemonSV_AutoStory_Segment_35.h | 6 +- .../PokemonSV_AutoStory_Segment_36.cpp | 12 +- .../PokemonSV_AutoStory_Segment_36.h | 4 +- .../PokemonSV_AutoStory_Segment_37.cpp | 12 +- .../PokemonSV_AutoStory_Segment_37.h | 4 +- .../PokemonSV_AutoStory_Segment_38.cpp | 12 +- .../PokemonSV_AutoStory_Segment_38.h | 4 +- .../PokemonSV_AutoStory_Segment_39.cpp | 12 +- .../PokemonSV_AutoStory_Segment_39.h | 4 +- .../PokemonSV_AutoStory_Segment_40.cpp | 10 +- .../PokemonSV_AutoStory_Segment_40.h | 4 +- 83 files changed, 811 insertions(+), 664 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index 49623a1b5d..4687ec77c0 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -906,116 +906,122 @@ void AutoStory::test_checkpoints( int loop, int start_loop, int end_loop ){ AutoStoryStats& stats = env.current_stats(); - EventNotificationOption& notif_status_update = NOTIFICATION_STATUS_UPDATE; - Language language = LANGUAGE; - StarterChoice starter_choice = STARTERCHOICE; - std::vector> checkpoint_list; - checkpoint_list.push_back([&](){checkpoint_00(env, context);}); - checkpoint_list.push_back([&](){checkpoint_01(env, context, notif_status_update, stats, language);}); - checkpoint_list.push_back([&](){checkpoint_02(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_03(env, context, notif_status_update, stats, language, starter_choice);}); - checkpoint_list.push_back([&](){checkpoint_04(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_05(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_06(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_07(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_08(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_09(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_10(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_11(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_12(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_13(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_14(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_15(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_16(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_17(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_18(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_19(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_20(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_21(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_22(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_23(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_24(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_25(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_26(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_27(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_28(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_29(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_30(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_31(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_32(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_33(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_34(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_35(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_36(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_37(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_38(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_39(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_40(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_41(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_42(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_43(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_44(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_45(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_46(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_47(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_48(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_49(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_50(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_51(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_52(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_53(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_54(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_55(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_56(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_57(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_58(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_59(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_60(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_61(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_62(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_63(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_64(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_65(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_66(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_67(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_68(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_69(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_70(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_71(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_72(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_73(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_74(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_75(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_76(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_77(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_78(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_79(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_80(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_81(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_82(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_83(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_84(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_85(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_86(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_87(env, context, notif_status_update, stats, language, starter_choice);}); - checkpoint_list.push_back([&](){checkpoint_88(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_89(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_90(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_91(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_92(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_93(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_94(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_95(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_96(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_97(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_98(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_99(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_100(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_101(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_102(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_103(env, context, notif_status_update, stats);}); - checkpoint_list.push_back([&](){checkpoint_104(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_105(env, context, notif_status_update, stats);}); + // EventNotificationOption& notif_status_update = NOTIFICATION_STATUS_UPDATE; + // Language language = LANGUAGE; + // StarterChoice starter_choice = STARTERCHOICE; + AutoStoryOptions options{ + LANGUAGE, + STARTERCHOICE, + NOTIFICATION_STATUS_UPDATE + }; + + // std::vector> checkpoint_list; + // checkpoint_list.push_back([&](){checkpoint_00(env, context);}); + // checkpoint_list.push_back([&](){checkpoint_01(env, context, notif_status_update, stats, checkpoint_text, language);}); + // checkpoint_list.push_back([&](){checkpoint_02(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_03(env, context, notif_status_update, stats, checkpoint_text, language, starter_choice);}); + // checkpoint_list.push_back([&](){checkpoint_04(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_05(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_06(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_07(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_08(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_09(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_10(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_11(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_12(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_13(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_14(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_15(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_16(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_17(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_18(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_19(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_20(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_21(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_22(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_23(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_24(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_25(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_26(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_27(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_28(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_29(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_30(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_31(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_32(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_33(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_34(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_35(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_36(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_37(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_38(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_39(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_40(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_41(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_42(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_43(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_44(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_45(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_46(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_47(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_48(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_49(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_50(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_51(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_52(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_53(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_54(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_55(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_56(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_57(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_58(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_59(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_60(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_61(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_62(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_63(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_64(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_65(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_66(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_67(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_68(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_69(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_70(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_71(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_72(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_73(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_74(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_75(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_76(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_77(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_78(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_79(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_80(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_81(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_82(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_83(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_84(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_85(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_86(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_87(env, context, notif_status_update, stats, checkpoint_text, language, starter_choice);}); + // checkpoint_list.push_back([&](){checkpoint_88(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_89(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_90(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_91(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_92(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_93(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_94(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_95(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_96(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_97(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_98(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_99(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_100(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_101(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_102(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_103(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_104(env, context, notif_status_update, stats);}); + // // checkpoint_list.push_back([&](){checkpoint_105(env, context, notif_status_update, stats);}); if (end == 0){ @@ -1025,7 +1031,8 @@ void AutoStory::test_checkpoints( for (int checkpoint = start; checkpoint <= end; checkpoint++){ if (checkpoint == 0){ stream.log("checkpoint_0"); - checkpoint_list[checkpoint](); + ALL_AUTO_STORY_CHECKPOINT_LIST()[checkpoint]->run_checkpoint(env, context, options, stats); + // checkpoint_list[checkpoint](); continue; } bool has_minimap = true; @@ -1058,11 +1065,13 @@ void AutoStory::test_checkpoints( } } stream.log("checkpoint_" + number + ": loop " + std::to_string(i)); - checkpoint_list[checkpoint](); + // checkpoint_list[checkpoint](); + ALL_AUTO_STORY_CHECKPOINT_LIST()[checkpoint]->run_checkpoint(env, context, options, stats); } }else{ stream.log("checkpoint_" + number + "."); - checkpoint_list[checkpoint](); + ALL_AUTO_STORY_CHECKPOINT_LIST()[checkpoint]->run_checkpoint(env, context, options, stats); + // checkpoint_list[checkpoint](); } } @@ -1170,7 +1179,7 @@ void AutoStory::run_autostory(SingleSwitchProgramEnvironment& env, ProController if (ENABLE_ADVANCED_MODE){ for (size_t checkpoint_index = get_start_checkpoint_index(); checkpoint_index <= get_end_checkpoint_index(); checkpoint_index++){ - env.console.log("Start Checkpoint " + ALL_AUTO_STORY_CHECKPOINT_LIST()[checkpoint_index]->name(), COLOR_ORANGE); + // env.console.log("Start Checkpoint " + ALL_AUTO_STORY_CHECKPOINT_LIST()[checkpoint_index]->name(), COLOR_ORANGE); ALL_AUTO_STORY_CHECKPOINT_LIST()[checkpoint_index]->run_checkpoint(env, context, options, stats); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp index 2efa68f6e5..b3814c0f71 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp @@ -1413,10 +1413,11 @@ void check_num_sunflora_found(SingleSwitchProgramEnvironment& env, ProController } void checkpoint_reattempt_loop( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, + const std::string& checkpoint_text, std::function&& action, bool day_skip ){ @@ -1432,6 +1433,8 @@ void checkpoint_reattempt_loop( save_game_from_overworld(env.program_info(), env.console, context); } + env.console.log(checkpoint_text); + context.wait_for_all_requests(); action(i); @@ -1459,10 +1462,11 @@ void checkpoint_reattempt_loop( } void checkpoint_reattempt_loop_tutorial( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, + const std::string& checkpoint_text, std::function&& action ){ size_t max_attempts = 100; @@ -1475,6 +1479,8 @@ void checkpoint_reattempt_loop_tutorial( send_program_status_notification(env, notif_status_update, "Saved at checkpoint."); } + env.console.log(checkpoint_text); + context.wait_for_all_requests(); action(i); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h index 0a565447d3..cae2173883 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h @@ -116,6 +116,10 @@ class AutoStory_Checkpoint { ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const = 0; + + std::string checkpoint_text() const { + return "Checkpoint " + name() + ". Start point:" + start_text(); + } }; @@ -372,19 +376,21 @@ void check_num_sunflora_found(SingleSwitchProgramEnvironment& env, ProController // save prior to first attempt // throw exception if we try to exceed max_attempts. void checkpoint_reattempt_loop( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, + const std::string& checkpoint_text, std::function&& action, bool day_skip = true ); void checkpoint_reattempt_loop_tutorial( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, + const std::string& checkpoint_text, std::function&& action ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp index 57b454f676..62c7326427 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp @@ -71,32 +71,33 @@ std::string AutoStory_Checkpoint_01::name() const{ return "001 - " + AutoStory_S std::string AutoStory_Checkpoint_01::start_text() const{ return "Done cutscene. Stood up from chair. Walked to left side of room.";} std::string AutoStory_Checkpoint_01::end_text() const{ return "Standing in room. Updated settings";} void AutoStory_Checkpoint_01::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_01(env, context, options.notif_status_update, stats, options.language); + checkpoint_01(env, context, options.notif_status_update, stats, checkpoint_text(), options.language); } std::string AutoStory_Checkpoint_02::name() const{ return "002 - " + AutoStory_Segment_01().name(); } std::string AutoStory_Checkpoint_02::start_text() const{ return AutoStory_Checkpoint_01().end_text();} std::string AutoStory_Checkpoint_02::end_text() const{ return "Standing in front of the 'power of science' NPC. Cleared map tutorial.";} void AutoStory_Checkpoint_02::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_02(env, context, options.notif_status_update, stats); + checkpoint_02(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_03::name() const{ return "003 - " + AutoStory_Segment_01().name(); } std::string AutoStory_Checkpoint_03::start_text() const{ return AutoStory_Checkpoint_02().end_text();} std::string AutoStory_Checkpoint_03::end_text() const{ return "Received starter Pokemon. Changed move order. Cleared autoheal tutorial.";} void AutoStory_Checkpoint_03::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_03(env, context, options.notif_status_update, stats, options.language, options.starter_choice); + checkpoint_03(env, context, options.notif_status_update, stats, checkpoint_text(), options.language, options.starter_choice); } void checkpoint_01( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats, + AutoStoryStats& stats, + const std::string& checkpoint_text, Language language ){ - checkpoint_reattempt_loop_tutorial(env, context, notif_status_update, stats, + checkpoint_reattempt_loop_tutorial(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -110,12 +111,13 @@ void checkpoint_01( } void checkpoint_02( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop_tutorial(env, context, notif_status_update, stats, + checkpoint_reattempt_loop_tutorial(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -184,14 +186,15 @@ void checkpoint_02( } void checkpoint_03( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, + const std::string& checkpoint_text, Language language, StarterChoice starter_choice ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.h index 64b68adaca..ea5fc4dd98 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.h @@ -58,6 +58,7 @@ void checkpoint_01( ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, + const std::string& checkpoint_text, Language language ); @@ -67,7 +68,8 @@ void checkpoint_02( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: standing in front of power of science NPC. Cleared map tutorial. @@ -77,6 +79,7 @@ void checkpoint_03( ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, + const std::string& checkpoint_text, Language language, StarterChoice starter_choice ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp index e2075cc258..0289a78ec8 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp @@ -65,17 +65,18 @@ std::string AutoStory_Checkpoint_04::name() const{ return "004 - " + AutoStory_S std::string AutoStory_Checkpoint_04::start_text() const{ return "Received starter Pokemon. Changed move order. Cleared autoheal tutorial.";} std::string AutoStory_Checkpoint_04::end_text() const{ return "Battled Nemona on the beach.";} void AutoStory_Checkpoint_04::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_04(env, context, options.notif_status_update, stats); + checkpoint_04(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_04( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.h index 2e87b2ce59..067b6dc735 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.h @@ -41,7 +41,8 @@ void checkpoint_04( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp index cbc0d472cc..0ea90e63ba 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp @@ -61,30 +61,31 @@ std::string AutoStory_Checkpoint_05::name() const{ return "005 - " + AutoStory_S std::string AutoStory_Checkpoint_05::start_text() const{ return "Battled Nemona on the beach.";} std::string AutoStory_Checkpoint_05::end_text() const{ return "Met mom at gate. Received mom's sandwich.";} void AutoStory_Checkpoint_05::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_05(env, context, options.notif_status_update, stats); + checkpoint_05(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_06::name() const{ return "006 - " + AutoStory_Segment_03().name(); } std::string AutoStory_Checkpoint_06::start_text() const{ return AutoStory_Checkpoint_05().end_text();} std::string AutoStory_Checkpoint_06::end_text() const{ return "Cleared catch tutorial.";} void AutoStory_Checkpoint_06::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_06(env, context, options.notif_status_update, stats); + checkpoint_06(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_07::name() const{ return "007 - " + AutoStory_Segment_03().name(); } std::string AutoStory_Checkpoint_07::start_text() const{ return AutoStory_Checkpoint_06().end_text();} std::string AutoStory_Checkpoint_07::end_text() const{ return "Moved to cliff. Heard mystery cry. Standing in front of Nemona near the cliff.";} void AutoStory_Checkpoint_07::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_07(env, context, options.notif_status_update, stats); + checkpoint_07(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_05( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -103,12 +104,13 @@ void checkpoint_05( } void checkpoint_06( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -141,12 +143,13 @@ void checkpoint_06( } void checkpoint_07( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.h index 2a054bd522..6870f79e34 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.h @@ -56,7 +56,8 @@ void checkpoint_05( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Met mom at gate. Received mom's sandwich. @@ -65,7 +66,8 @@ void checkpoint_06( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Cleared catch tutorial. @@ -74,7 +76,8 @@ void checkpoint_07( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp index 06c8c3346c..8352a1df20 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp @@ -65,18 +65,19 @@ std::string AutoStory_Checkpoint_08::name() const{ return "008 - " + AutoStory_S std::string AutoStory_Checkpoint_08::start_text() const{ return "Moved to cliff. Heard mystery cry. Standing in front of Nemona near the cliff.";} std::string AutoStory_Checkpoint_08::end_text() const{ return "Rescued Koraidon/Miraidon and escaped from the Houndoom Cave. Standing next to Koraidon/Miraidon just outside the cave exit.";} void AutoStory_Checkpoint_08::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_08(env, context, options.notif_status_update, stats); + checkpoint_08(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_08( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.h index 81c1eee219..0915d83142 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.h @@ -40,7 +40,8 @@ void checkpoint_08( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp index 24fef747a4..977265bb92 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp @@ -65,7 +65,7 @@ std::string AutoStory_Checkpoint_09::name() const{ return "009 - " + AutoStory_S std::string AutoStory_Checkpoint_09::start_text() const{ return "Rescued Koraidon/Miraidon and escaped from the Houndoom Cave. Standing next to Koraidon/Miraidon just outside the cave exit.";} std::string AutoStory_Checkpoint_09::end_text() const{ return "Battled Arven and received Legendary's Pokeball.";} void AutoStory_Checkpoint_09::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_09(env, context, options.notif_status_update, stats); + checkpoint_09(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -73,18 +73,19 @@ std::string AutoStory_Checkpoint_10::name() const{ return "010 - " + AutoStory_S std::string AutoStory_Checkpoint_10::start_text() const{ return AutoStory_Checkpoint_09().end_text();} std::string AutoStory_Checkpoint_10::end_text() const{ return "Talked to Nemona at roof of the Lighthouse.";} void AutoStory_Checkpoint_10::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_10(env, context, options.notif_status_update, stats); + checkpoint_10(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_09( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -118,12 +119,13 @@ void checkpoint_09( } void checkpoint_10( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.h index e7b621bf05..3a91070a79 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.h @@ -48,7 +48,8 @@ void checkpoint_09( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Battled Arven and received Legendary's Pokeball. @@ -57,7 +58,8 @@ void checkpoint_10( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp index 90b17512dc..3a3e66f48b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp @@ -63,18 +63,19 @@ std::string AutoStory_Checkpoint_11::name() const{ return "011 - " + AutoStory_S std::string AutoStory_Checkpoint_11::start_text() const{ return "Talked to Nemona at roof of the Lighthouse.";} std::string AutoStory_Checkpoint_11::end_text() const{ return "Arrived at Los Platos pokecenter. Cleared Let's go tutorial.";} void AutoStory_Checkpoint_11::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_11(env, context, options.notif_status_update, stats); + checkpoint_11(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_11( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.h index 5f66894d08..45a3c67d5c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.h @@ -41,7 +41,8 @@ void checkpoint_11( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp index 05a14b2ebb..e26436134c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp @@ -64,22 +64,23 @@ std::string AutoStory_Checkpoint_12::name() const{ return "012 - " + AutoStory_S std::string AutoStory_Checkpoint_12::start_text() const{ return "Arrived at Los Platos pokecenter. Cleared Let's go tutorial.";} std::string AutoStory_Checkpoint_12::end_text() const{ return "Arrived at Mesagoza (South) Pokecenter.";} void AutoStory_Checkpoint_12::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_12(env, context, options.notif_status_update, stats); + checkpoint_12(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_12( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ // reset rate: ~25%. 12 resets out of 52. // resets due to: getting attacked by wild pokemon, either from behind, // or when lead pokemon not strong enough to clear them with Let's go - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ fly_to_overlapping_flypoint(env.program_info(), env.console, context); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.h index ec231fa94e..dbe2aab2ba 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.h @@ -41,7 +41,8 @@ void checkpoint_12( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp index 73faab9b50..622e33ce8d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp @@ -64,7 +64,7 @@ std::string AutoStory_Checkpoint_13::name() const{ return "013 - " + AutoStory_S std::string AutoStory_Checkpoint_13::start_text() const{ return "Arrived at Mesagoza (South) Pokecenter.";} std::string AutoStory_Checkpoint_13::end_text() const{ return "Battled Nemona at Mesagoza gate. Entered Mesagoza.";} void AutoStory_Checkpoint_13::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_13(env, context, options.notif_status_update, stats); + checkpoint_13(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -73,7 +73,7 @@ std::string AutoStory_Checkpoint_14::name() const{ return "014 - " + AutoStory_S std::string AutoStory_Checkpoint_14::start_text() const{ return AutoStory_Checkpoint_13().end_text();} std::string AutoStory_Checkpoint_14::end_text() const{ return "Battled Team Star at school entrance.";} void AutoStory_Checkpoint_14::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_14(env, context, options.notif_status_update, stats); + checkpoint_14(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -82,20 +82,21 @@ std::string AutoStory_Checkpoint_15::name() const{ return "015 - " + AutoStory_S std::string AutoStory_Checkpoint_15::start_text() const{ return AutoStory_Checkpoint_14().end_text();} std::string AutoStory_Checkpoint_15::end_text() const{ return "Talked to Jacq in classroom. Standing in classroom.";} void AutoStory_Checkpoint_15::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_15(env, context, options.notif_status_update, stats); + checkpoint_15(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_13( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ // reset rate: 0%. 0 resets out of 70. - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ do_action_and_monitor_for_battles(env.program_info(), env.console, context, [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ @@ -126,13 +127,14 @@ void checkpoint_13( } void checkpoint_14( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -173,13 +175,14 @@ void checkpoint_14( } void checkpoint_15( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.h index a63d3a602e..936b7b37af 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.h @@ -56,7 +56,8 @@ void checkpoint_13( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Battled Nemona at Mesagoza gate. Entered Mesagoza. @@ -65,7 +66,8 @@ void checkpoint_14( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Battled Team Star at school entrance. @@ -74,7 +76,8 @@ void checkpoint_15( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp index 5a276e8f23..cf1bf87e93 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp @@ -66,7 +66,7 @@ std::string AutoStory_Checkpoint_16::name() const{ return "016 - " + AutoStory_S std::string AutoStory_Checkpoint_16::start_text() const{ return "Talked to Jacq in classroom. Standing in classroom.";} std::string AutoStory_Checkpoint_16::end_text() const{ return "Talked to Arven. Received Titan questline (Path of Legends). Talked to Cassiopeia. Standing in main hall.";} void AutoStory_Checkpoint_16::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_16(env, context, options.notif_status_update, stats); + checkpoint_16(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -74,41 +74,42 @@ std::string AutoStory_Checkpoint_17::name() const{ return "017 - " + AutoStory_S std::string AutoStory_Checkpoint_17::start_text() const{ return AutoStory_Checkpoint_16().end_text();} std::string AutoStory_Checkpoint_17::end_text() const{ return "Talked to Cassiopeia. Saw Geeta. Talked to Nemona. Received Gym/Elite Four questline (Victory Road). Standing in staff room.";} void AutoStory_Checkpoint_17::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_17(env, context, options.notif_status_update, stats); + checkpoint_17(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_18::name() const{ return "018 - " + AutoStory_Segment_09().name(); } std::string AutoStory_Checkpoint_18::start_text() const{ return AutoStory_Checkpoint_17().end_text();} std::string AutoStory_Checkpoint_18::end_text() const{ return "Talked to Clavell and the professor.";} void AutoStory_Checkpoint_18::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_18(env, context, options.notif_status_update, stats); + checkpoint_18(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_19::name() const{ return "019 - " + AutoStory_Segment_09().name(); } std::string AutoStory_Checkpoint_19::start_text() const{ return AutoStory_Checkpoint_18().end_text();} std::string AutoStory_Checkpoint_19::end_text() const{ return "Talked to Nemona, visited dorm, time passed.";} void AutoStory_Checkpoint_19::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_19(env, context, options.notif_status_update, stats); + checkpoint_19(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_20::name() const{ return "020 - " + AutoStory_Segment_09().name(); } std::string AutoStory_Checkpoint_20::start_text() const{ return AutoStory_Checkpoint_19().end_text();} std::string AutoStory_Checkpoint_20::end_text() const{ return "Get on ride for first time.";} void AutoStory_Checkpoint_20::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_20(env, context, options.notif_status_update, stats); + checkpoint_20(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_16( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -144,13 +145,14 @@ void checkpoint_16( } void checkpoint_17( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -188,13 +190,14 @@ void checkpoint_17( } void checkpoint_18( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -224,13 +227,14 @@ void checkpoint_18( } void checkpoint_19( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -258,13 +262,14 @@ void checkpoint_19( void checkpoint_20( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.h index ae049e42f7..3b98cb2730 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.h @@ -74,7 +74,8 @@ void checkpoint_16( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Talked to Arven. Received Titan questline (Path of Legends). @@ -83,7 +84,8 @@ void checkpoint_17( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Talked to Cassiopeia. Saw Geeta. Talked to Nemona. Received Gym/Elite Four questline (Victory Road). Standing in staff room. @@ -92,7 +94,8 @@ void checkpoint_18( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Talked to Clavell and the professor. @@ -101,7 +104,8 @@ void checkpoint_19( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Talked to Nemona, visited dorm, time passed. @@ -110,7 +114,8 @@ void checkpoint_20( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp index a50d04d51a..39ed307dfd 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp @@ -67,33 +67,34 @@ std::string AutoStory_Checkpoint_21::name() const{ return "021 - " + AutoStory_S std::string AutoStory_Checkpoint_21::start_text() const{ return "After the break, with level 100 Gardevoir. At Mesagoza West pokecenter.";} std::string AutoStory_Checkpoint_21::end_text() const{ return "At Mesagoza West gate flypoint.";} void AutoStory_Checkpoint_21::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_21(env, context, options.notif_status_update, stats); + checkpoint_21(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_22::name() const{ return "022 - " + AutoStory_Segment_10().name(); } std::string AutoStory_Checkpoint_22::start_text() const{ return AutoStory_Checkpoint_21().end_text();} std::string AutoStory_Checkpoint_22::end_text() const{ return "At South Province Area Two Pokecenter.";} void AutoStory_Checkpoint_22::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_22(env, context, options.notif_status_update, stats); + checkpoint_22(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_23::name() const{ return "023 - " + AutoStory_Segment_10().name(); } std::string AutoStory_Checkpoint_23::start_text() const{ return AutoStory_Checkpoint_22().end_text();} std::string AutoStory_Checkpoint_23::end_text() const{ return "At Cortondo East Pokecenter";} void AutoStory_Checkpoint_23::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_23(env, context, options.notif_status_update, stats); + checkpoint_23(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_21( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ fly_to_overlapping_flypoint(env.program_info(), env.console, context); @@ -141,13 +142,14 @@ void checkpoint_21( } void checkpoint_22( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -203,13 +205,14 @@ void checkpoint_22( void checkpoint_23( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.h index a444085087..ede7c33e13 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.h @@ -59,7 +59,8 @@ void checkpoint_21( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At Mesagoza West gate flypoint @@ -68,7 +69,8 @@ void checkpoint_22( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At South Province Area Two Pokecenter. @@ -77,7 +79,8 @@ void checkpoint_23( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp index dd5eda4d19..10ef7b93cf 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp @@ -78,40 +78,41 @@ std::string AutoStory_Checkpoint_24::name() const{ return "024 - " + AutoStory_S std::string AutoStory_Checkpoint_24::start_text() const{ return "At Cortondo East Pokecenter";} std::string AutoStory_Checkpoint_24::end_text() const{ return "Spoke to Cortondo Gym reception. At Cortondo West Pokecenter.";} void AutoStory_Checkpoint_24::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_24(env, context, options.notif_status_update, stats); + checkpoint_24(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_25::name() const{ return "025 - " + AutoStory_Segment_11().name(); } std::string AutoStory_Checkpoint_25::start_text() const{ return AutoStory_Checkpoint_24().end_text();} std::string AutoStory_Checkpoint_25::end_text() const{ return "Defeated the trainers at Olive Roll, but left Olive unmoved. Then backed out, standing in front of the Olive Roll NPC.";} void AutoStory_Checkpoint_25::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_25(env, context, options.notif_status_update, stats); + checkpoint_25(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_26::name() const{ return "026 - " + AutoStory_Segment_11().name(); } std::string AutoStory_Checkpoint_26::start_text() const{ return AutoStory_Checkpoint_25().end_text();} std::string AutoStory_Checkpoint_26::end_text() const{ return "Completed Olive roll gym challenge.";} void AutoStory_Checkpoint_26::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_26(env, context, options.notif_status_update, stats); + checkpoint_26(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_27::name() const{ return "027 - " + AutoStory_Segment_11().name(); } std::string AutoStory_Checkpoint_27::start_text() const{ return AutoStory_Checkpoint_26().end_text();} std::string AutoStory_Checkpoint_27::end_text() const{ return "At Cortondo East Pokecenter.";} void AutoStory_Checkpoint_27::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_27(env, context, options.notif_status_update, stats); + checkpoint_27(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_24( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); DirectionDetector direction; @@ -165,13 +166,14 @@ void checkpoint_24( void checkpoint_25( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -245,13 +247,14 @@ void checkpoint_25( } void checkpoint_26( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -608,13 +611,14 @@ void checkpoint_26( } void checkpoint_27( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, +1, 0, 320ms}); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.h index 55bd66b7b8..90ec196291 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.h @@ -66,7 +66,8 @@ void checkpoint_24( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Spoke to Cortondo Gym reception. At Cortondo West Pokecenter. @@ -75,7 +76,8 @@ void checkpoint_25( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Defeated the trainers at Olive Roll, but left Olive unmoved. Then backed out, standing in front of the Olive Roll NPC. @@ -84,7 +86,8 @@ void checkpoint_26( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Completed Olive roll gym challenge. @@ -93,7 +96,8 @@ void checkpoint_27( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp index f20adb2dd1..3b11fbf2b1 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp @@ -70,18 +70,19 @@ std::string AutoStory_Checkpoint_28::name() const{ return "028 - " + AutoStory_S std::string AutoStory_Checkpoint_28::start_text() const{ return "At Cortondo East Pokecenter.";} std::string AutoStory_Checkpoint_28::end_text() const{ return "Beat Cortondo Gym. At Cortondo West Pokecenter.";} void AutoStory_Checkpoint_28::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_28(env, context, options.notif_status_update, stats); + checkpoint_28(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_28( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); DirectionDetector direction; diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.h index 6b5fe46e37..ed5b263c42 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.h @@ -42,7 +42,8 @@ void checkpoint_28( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp index 4111addd21..bb64e01e08 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp @@ -63,17 +63,18 @@ std::string AutoStory_Checkpoint_29::name() const{ return "029 - " + AutoStory_S std::string AutoStory_Checkpoint_29::start_text() const{ return "At Cortondo West Pokecenter.";} std::string AutoStory_Checkpoint_29::end_text() const{ return "At West Province Area One Central Pokecenter.";} void AutoStory_Checkpoint_29::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_29(env, context, options.notif_status_update, stats); + checkpoint_29(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_29( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.h index 1d806d93ed..584e259e8a 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.h @@ -42,7 +42,8 @@ void checkpoint_29( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp index 46925da493..ea990bf4ac 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp @@ -65,24 +65,25 @@ std::string AutoStory_Checkpoint_30::name() const{ return "030 - " + AutoStory_S std::string AutoStory_Checkpoint_30::start_text() const{ return "At West Province Area One Central Pokecenter.";} std::string AutoStory_Checkpoint_30::end_text() const{ return "Defeated Bombirdier.";} void AutoStory_Checkpoint_30::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_30(env, context, options.notif_status_update, stats); + checkpoint_30(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_31::name() const{ return "031 - " + AutoStory_Segment_14().name(); } std::string AutoStory_Checkpoint_31::start_text() const{ return AutoStory_Checkpoint_30().end_text();} std::string AutoStory_Checkpoint_31::end_text() const{ return "At West Province Area One North Pokecenter.";} void AutoStory_Checkpoint_31::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_31(env, context, options.notif_status_update, stats); + checkpoint_31(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_30( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ if (attempt_number > 0 || ENABLE_TEST){ @@ -259,13 +260,14 @@ void checkpoint_30( void checkpoint_31( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); // section 1. fall down the mountain diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.h index 0494f81eee..d11b95dbdc 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.h @@ -50,7 +50,8 @@ void checkpoint_30( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Defeated Bombirdier @@ -59,7 +60,8 @@ void checkpoint_31( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp index b8a750b22f..d6c9225c28 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp @@ -72,32 +72,33 @@ std::string AutoStory_Checkpoint_32::name() const{ return "032 - " + AutoStory_S std::string AutoStory_Checkpoint_32::start_text() const{ return "At West Province Area One North Pokecenter";} std::string AutoStory_Checkpoint_32::end_text() const{ return "At West Province Area One North Pokecenter";} void AutoStory_Checkpoint_32::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_32(env, context, options.notif_status_update, stats); + checkpoint_32(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_33::name() const{ return "033 - " + AutoStory_Segment_15().name(); } std::string AutoStory_Checkpoint_33::start_text() const{ return AutoStory_Checkpoint_32().end_text();} std::string AutoStory_Checkpoint_33::end_text() const{ return "Defeated Team Star (Dark) boss";} void AutoStory_Checkpoint_33::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_33(env, context, options.notif_status_update, stats); + checkpoint_33(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_34::name() const{ return "034 - " + AutoStory_Segment_15().name(); } std::string AutoStory_Checkpoint_34::start_text() const{ return AutoStory_Checkpoint_33().end_text();} std::string AutoStory_Checkpoint_34::end_text() const{ return "At Cascarrafa (West) Pokecenter.";} void AutoStory_Checkpoint_34::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_34(env, context, options.notif_status_update, stats); + checkpoint_34(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_32( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering @@ -106,13 +107,14 @@ void checkpoint_32( } void checkpoint_33( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -284,13 +286,14 @@ void checkpoint_33( } void checkpoint_34( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.h index 4427b0f8af..e807f0938b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.h @@ -58,7 +58,8 @@ void checkpoint_32( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At West Province Area One North Pokecenter @@ -67,7 +68,8 @@ void checkpoint_33( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Defeated Team Star (Dark) boss @@ -76,7 +78,8 @@ void checkpoint_34( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp index 037a5fa5dd..198a025560 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp @@ -67,24 +67,25 @@ std::string AutoStory_Checkpoint_35::name() const{ return "035 - " + AutoStory_S std::string AutoStory_Checkpoint_35::start_text() const{ return "At Cascarrafa (West) Pokecenter.";} std::string AutoStory_Checkpoint_35::end_text() const{ return "At Cascarrafa Gym. Received Kofu's wallet.";} void AutoStory_Checkpoint_35::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_35(env, context, options.notif_status_update, stats); + checkpoint_35(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_36::name() const{ return "036 - " + AutoStory_Segment_16().name(); } std::string AutoStory_Checkpoint_36::start_text() const{ return AutoStory_Checkpoint_35().end_text();} std::string AutoStory_Checkpoint_36::end_text() const{ return "At Porto Marinada Pokecenter.";} void AutoStory_Checkpoint_36::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_36(env, context, options.notif_status_update, stats); + checkpoint_36(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_35( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); DirectionDetector direction; @@ -123,13 +124,14 @@ void checkpoint_35( } void checkpoint_36( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.h index bf5f050487..0a60b2fe04 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.h @@ -50,7 +50,8 @@ void checkpoint_35( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At Cascarrafa Gym. Received Kofu's wallet. @@ -59,7 +60,8 @@ void checkpoint_36( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp index c4a7dd99f2..7696cb1f8c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp @@ -67,24 +67,25 @@ std::string AutoStory_Checkpoint_37::name() const{ return "037 - " + AutoStory_S std::string AutoStory_Checkpoint_37::start_text() const{ return "At Porto Marinada Pokecenter.";} std::string AutoStory_Checkpoint_37::end_text() const{ return "Won auction at Porto Marinada, passed Gym challenge.";} void AutoStory_Checkpoint_37::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_37(env, context, options.notif_status_update, stats); + checkpoint_37(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_38::name() const{ return "038 - " + AutoStory_Segment_17().name(); } std::string AutoStory_Checkpoint_38::start_text() const{ return AutoStory_Checkpoint_37().end_text();} std::string AutoStory_Checkpoint_38::end_text() const{ return "Defeat Cascarrafa Gym. At Porto Marinada Pokecenter.";} void AutoStory_Checkpoint_38::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_38(env, context, options.notif_status_update, stats); + checkpoint_38(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_37( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); DirectionDetector direction; @@ -126,13 +127,14 @@ void checkpoint_37( } void checkpoint_38( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, +1, -0.409, 1360ms}); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.h index aad2496e71..c72e758e26 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.h @@ -50,7 +50,8 @@ void checkpoint_37( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Won auction at Porto Marinada, passed Gym challenge. @@ -59,7 +60,8 @@ void checkpoint_38( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp index 162e2fb1f7..8255d7227e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp @@ -66,27 +66,28 @@ std::string AutoStory_Checkpoint_39::name() const{ return "039 - " + AutoStory_S std::string AutoStory_Checkpoint_39::start_text() const{ return "Defeated Cascarrafa Gym (Water). At Porto Marinada Pokecenter.";} std::string AutoStory_Checkpoint_39::end_text() const{ return "Defeated Great Tusk/Iron Treads.";} void AutoStory_Checkpoint_39::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_39(env, context, options.notif_status_update, stats); + checkpoint_39(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_40::name() const{ return "040 - " + AutoStory_Segment_18().name(); } std::string AutoStory_Checkpoint_40::start_text() const{ return AutoStory_Checkpoint_39().end_text();} std::string AutoStory_Checkpoint_40::end_text() const{ return "At South Province (Area Three) Pokecenter.";} void AutoStory_Checkpoint_40::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_40(env, context, options.notif_status_update, stats); + checkpoint_40(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_39( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -248,13 +249,14 @@ void checkpoint_39( } void checkpoint_40( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); // fly to Mesagoza East from Great Tusk/Iron Treads diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.h index 0fa3e1042b..e7797cb8f0 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.h @@ -50,7 +50,8 @@ void checkpoint_39( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Defeated Great Tusk/Iron Treads. @@ -59,7 +60,8 @@ void checkpoint_40( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp index 0c71ff2e6b..cd252ce994 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp @@ -67,14 +67,14 @@ std::string AutoStory_Checkpoint_41::name() const{ return "041 - " + AutoStory_S std::string AutoStory_Checkpoint_41::start_text() const{ return "At South Province (Area Three) Pokecenter.";} std::string AutoStory_Checkpoint_41::end_text() const{ return "Defeated Klawf.";} void AutoStory_Checkpoint_41::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_41(env, context, options.notif_status_update, stats); + checkpoint_41(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_42::name() const{ return "042 - " + AutoStory_Segment_19().name(); } std::string AutoStory_Checkpoint_42::start_text() const{ return AutoStory_Checkpoint_41().end_text();} std::string AutoStory_Checkpoint_42::end_text() const{ return "Defeated Klawf. At Artazon (West) Pokecenter.";} void AutoStory_Checkpoint_42::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_42(env, context, options.notif_status_update, stats); + checkpoint_42(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -82,13 +82,14 @@ void AutoStory_Checkpoint_42::run_checkpoint(SingleSwitchProgramEnvironment& env void checkpoint_41( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -290,13 +291,14 @@ void checkpoint_41( } void checkpoint_42( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.h index 7399f3750f..518e65785e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.h @@ -50,7 +50,8 @@ void checkpoint_41( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Defeated Klawf. @@ -59,7 +60,8 @@ void checkpoint_42( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp index 1d18bfd745..409fe7a412 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp @@ -71,41 +71,42 @@ std::string AutoStory_Checkpoint_43::name() const{ return "043 - " + AutoStory_S std::string AutoStory_Checkpoint_43::start_text() const{ return "Defeated Klawf. At Artazon (West) Pokecenter.";} std::string AutoStory_Checkpoint_43::end_text() const{ return "At Artazon Gym building. Battled Nemona. Received Sunflora gym challenge.";} void AutoStory_Checkpoint_43::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_43(env, context, options.notif_status_update, stats); + checkpoint_43(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_44::name() const{ return "044 - " + AutoStory_Segment_20().name(); } std::string AutoStory_Checkpoint_44::start_text() const{ return AutoStory_Checkpoint_43().end_text();} std::string AutoStory_Checkpoint_44::end_text() const{ return "Finished Sunflora gym challenge.";} void AutoStory_Checkpoint_44::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_44(env, context, options.notif_status_update, stats); + checkpoint_44(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_45::name() const{ return "045 - " + AutoStory_Segment_20().name(); } std::string AutoStory_Checkpoint_45::start_text() const{ return AutoStory_Checkpoint_44().end_text();} std::string AutoStory_Checkpoint_45::end_text() const{ return "Defeated Artazon Gym (Grass). Inside gym building.";} void AutoStory_Checkpoint_45::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_45(env, context, options.notif_status_update, stats); + checkpoint_45(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_46::name() const{ return "046 - " + AutoStory_Segment_20().name(); } std::string AutoStory_Checkpoint_46::start_text() const{ return AutoStory_Checkpoint_45().end_text();} std::string AutoStory_Checkpoint_46::end_text() const{ return "At East Province (Area One) Pokecenter.";} void AutoStory_Checkpoint_46::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_46(env, context, options.notif_status_update, stats); + checkpoint_46(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_43( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -166,13 +167,14 @@ void checkpoint_43( } void checkpoint_44( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -494,13 +496,14 @@ void checkpoint_44( } void checkpoint_45( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -542,13 +545,14 @@ void checkpoint_45( void checkpoint_46( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.h index 8fd6b6cdc6..57b2cdb386 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.h @@ -65,7 +65,8 @@ void checkpoint_43( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At Artazon Gym building. Battled Nemona. Received Sunflora gym challenge. @@ -74,7 +75,8 @@ void checkpoint_44( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Finished Sunflora gym challenge. @@ -83,7 +85,8 @@ void checkpoint_45( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Defeated Artazon Gym (Grass). Inside gym building. @@ -92,7 +95,8 @@ void checkpoint_46( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp index 457af3341c..95815bcda4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp @@ -67,33 +67,34 @@ std::string AutoStory_Checkpoint_47::name() const{ return "047 - " + AutoStory_S std::string AutoStory_Checkpoint_47::start_text() const{ return "At East Province (Area One) Pokecenter.";} std::string AutoStory_Checkpoint_47::end_text() const{ return "At East Province (Area One) Pokecenter.";} void AutoStory_Checkpoint_47::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_47(env, context, options.notif_status_update, stats); + checkpoint_47(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_48::name() const{ return "048 - " + AutoStory_Segment_21().name(); } std::string AutoStory_Checkpoint_48::start_text() const{ return AutoStory_Checkpoint_47().end_text();} std::string AutoStory_Checkpoint_48::end_text() const{ return "Beat Team Star (Fire)";} void AutoStory_Checkpoint_48::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_48(env, context, options.notif_status_update, stats); + checkpoint_48(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_49::name() const{ return "049 - " + AutoStory_Segment_21().name(); } std::string AutoStory_Checkpoint_49::start_text() const{ return AutoStory_Checkpoint_48().end_text();} std::string AutoStory_Checkpoint_49::end_text() const{ return "At East Province (Area Two) Pokecenter.";} void AutoStory_Checkpoint_49::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_49(env, context, options.notif_status_update, stats); + checkpoint_49(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_47( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering @@ -103,13 +104,14 @@ void checkpoint_47( void checkpoint_48( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -289,13 +291,14 @@ void checkpoint_48( void checkpoint_49( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // the landmark Pokecenter is far enough away from current location, that the map Pokemon don't cover it. diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.h index 299fbc1bb2..9bc303ccfe 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.h @@ -58,7 +58,8 @@ void checkpoint_47( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At East Province (Area One) Pokecenter. @@ -67,7 +68,8 @@ void checkpoint_48( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Beat Team Star (Fire) @@ -76,7 +78,8 @@ void checkpoint_49( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp index 1bf4075342..41bd70cb7d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp @@ -69,14 +69,14 @@ std::string AutoStory_Checkpoint_50::name() const{ return "050 - " + AutoStory_S std::string AutoStory_Checkpoint_50::start_text() const{ return "Defeated Team Star (Fire). At East Province (Area Two) Pokecenter.";} std::string AutoStory_Checkpoint_50::end_text() const{ return "At Levincia (South) Pokecenter.";} void AutoStory_Checkpoint_50::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_50(env, context, options.notif_status_update, stats); + checkpoint_50(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_51::name() const{ return "051 - " + AutoStory_Segment_22().name(); } std::string AutoStory_Checkpoint_51::start_text() const{ return AutoStory_Checkpoint_50().end_text();} std::string AutoStory_Checkpoint_51::end_text() const{ return "At Levincia gym building. Talked to Hassel, met Rika.";} void AutoStory_Checkpoint_51::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_51(env, context, options.notif_status_update, stats); + checkpoint_51(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -84,7 +84,7 @@ std::string AutoStory_Checkpoint_52::name() const{ return "052 - " + AutoStory_S std::string AutoStory_Checkpoint_52::start_text() const{ return AutoStory_Checkpoint_51().end_text();} std::string AutoStory_Checkpoint_52::end_text() const{ return "Finished Levincia gym challenge.";} void AutoStory_Checkpoint_52::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_52(env, context, options.notif_status_update, stats); + checkpoint_52(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -92,18 +92,19 @@ std::string AutoStory_Checkpoint_53::name() const{ return "053 - " + AutoStory_S std::string AutoStory_Checkpoint_53::start_text() const{ return AutoStory_Checkpoint_52().end_text();} std::string AutoStory_Checkpoint_53::end_text() const{ return "Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";} void AutoStory_Checkpoint_53::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_53(env, context, options.notif_status_update, stats); + checkpoint_53(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_50( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -184,12 +185,13 @@ void checkpoint_50( void checkpoint_51( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -218,12 +220,13 @@ void checkpoint_51( } void checkpoint_52( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // talk to receptionist env.console.log("Talk to Levincia gym receptionist."); @@ -351,12 +354,13 @@ void checkpoint_52( } void checkpoint_53( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // realign camera. diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h index 364acb4a50..a1d71763a0 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h @@ -67,7 +67,8 @@ void checkpoint_50( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At Levincia (South) Pokecenter. @@ -76,7 +77,8 @@ void checkpoint_51( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); @@ -86,7 +88,8 @@ void checkpoint_52( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); @@ -96,7 +99,8 @@ void checkpoint_53( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp index eaf2375587..d713bf8943 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp @@ -66,17 +66,18 @@ std::string AutoStory_Checkpoint_54::name() const{ return "054 - " + AutoStory_S std::string AutoStory_Checkpoint_54::start_text() const{ return "Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";} std::string AutoStory_Checkpoint_54::end_text() const{ return "Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";} void AutoStory_Checkpoint_54::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_54(env, context, options.notif_status_update, stats); + checkpoint_54(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_54( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h index 6e3a69bab2..b4f5d51fcb 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h @@ -42,7 +42,8 @@ void checkpoint_54( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp index 524e3aed63..7c0ee53640 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp @@ -68,7 +68,7 @@ std::string AutoStory_Checkpoint_55::name() const{ return "055 - " + AutoStory_S std::string AutoStory_Checkpoint_55::start_text() const{ return "Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";} std::string AutoStory_Checkpoint_55::end_text() const{ return "Beat Orthworm phase 1 and 2";} void AutoStory_Checkpoint_55::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_55(env, context, options.notif_status_update, stats); + checkpoint_55(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -76,7 +76,7 @@ std::string AutoStory_Checkpoint_56::name() const{ return "056 - " + AutoStory_S std::string AutoStory_Checkpoint_56::start_text() const{ return AutoStory_Checkpoint_55().end_text();} std::string AutoStory_Checkpoint_56::end_text() const{ return "At East Province (Area Three) Pokecenter.";} void AutoStory_Checkpoint_56::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_56(env, context, options.notif_status_update, stats); + checkpoint_56(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -84,18 +84,19 @@ std::string AutoStory_Checkpoint_57::name() const{ return "057 - " + AutoStory_S std::string AutoStory_Checkpoint_57::start_text() const{ return AutoStory_Checkpoint_56().end_text();} std::string AutoStory_Checkpoint_57::end_text() const{ return "At East Province (Area Three) Pokecenter.";} void AutoStory_Checkpoint_57::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_57(env, context, options.notif_status_update, stats); + checkpoint_57(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_55( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; @@ -472,12 +473,13 @@ void checkpoint_55( } void checkpoint_56( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // fly back to East Province (Area Three) Watchtower. from Orthworm // this clears Pokemon in minimap @@ -592,12 +594,13 @@ void checkpoint_56( } void checkpoint_57( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering }, false); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h index a74a8c2680..2ad4e05608 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h @@ -58,7 +58,8 @@ void checkpoint_55( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Beat Orthworm phase 1 and 2 @@ -67,7 +68,8 @@ void checkpoint_56( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At East Province (Area Three) Pokecenter. @@ -76,7 +78,8 @@ void checkpoint_57( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp index bfffc5c141..395568615d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp @@ -71,7 +71,7 @@ std::string AutoStory_Checkpoint_58::name() const{ return "058 - " + AutoStory_S std::string AutoStory_Checkpoint_58::start_text() const{ return "Beat Orthworm. At East Province (Area Three) Pokecenter.";} std::string AutoStory_Checkpoint_58::end_text() const{ return "Beat Orthworm. At East Province (Area Three) Pokecenter.";} void AutoStory_Checkpoint_58::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_58(env, context, options.notif_status_update, stats); + checkpoint_58(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -79,23 +79,24 @@ std::string AutoStory_Checkpoint_59::name() const{ return "059 - " + AutoStory_S std::string AutoStory_Checkpoint_59::start_text() const{ return AutoStory_Checkpoint_58().end_text();} std::string AutoStory_Checkpoint_59::end_text() const{ return "Beat Team Star (Poison)";} void AutoStory_Checkpoint_59::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_59(env, context, options.notif_status_update, stats); + checkpoint_59(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_60::name() const{ return "060 - " + AutoStory_Segment_25().name(); } std::string AutoStory_Checkpoint_60::start_text() const{ return AutoStory_Checkpoint_59().end_text();} std::string AutoStory_Checkpoint_60::end_text() const{ return "At Medali Pokecenter.";} void AutoStory_Checkpoint_60::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_60(env, context, options.notif_status_update, stats); + checkpoint_60(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_58( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering @@ -104,12 +105,13 @@ void checkpoint_58( } void checkpoint_59( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -315,12 +317,13 @@ void checkpoint_59( } void checkpoint_60( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // fly back to Porto Marinada Pokecenter from Team Star Poison // this clears Pokemon in minimap diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h index 21b0928d35..d06b94d00b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h @@ -58,7 +58,8 @@ void checkpoint_58( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Beat Orthworm. At East Province (Area Three) Pokecenter. @@ -67,7 +68,8 @@ void checkpoint_59( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: Beat Team Star (Poison) @@ -76,7 +78,8 @@ void checkpoint_60( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // moves player from Porto Marinada Pokecenter to Medali West Pokecenter diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp index 7c8a4b7140..51ac1a0137 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp @@ -69,7 +69,7 @@ std::string AutoStory_Checkpoint_61::name() const{ return "061 - " + AutoStory_S std::string AutoStory_Checkpoint_61::start_text() const{ return "At Medali Pokecenter.";} std::string AutoStory_Checkpoint_61::end_text() const{ return "At Medali Gym";} void AutoStory_Checkpoint_61::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_61(env, context, options.notif_status_update, stats); + checkpoint_61(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -77,26 +77,27 @@ std::string AutoStory_Checkpoint_62::name() const{ return "062 - " + AutoStory_S std::string AutoStory_Checkpoint_62::start_text() const{ return AutoStory_Checkpoint_61().end_text();} std::string AutoStory_Checkpoint_62::end_text() const{ return "Beat Medali Gym";} void AutoStory_Checkpoint_62::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_62(env, context, options.notif_status_update, stats); + checkpoint_62(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_63::name() const{ return "063 - " + AutoStory_Segment_26().name(); } std::string AutoStory_Checkpoint_63::start_text() const{ return AutoStory_Checkpoint_62().end_text();} std::string AutoStory_Checkpoint_63::end_text() const{ return "At Glaseado Mountain Pokecenter";} void AutoStory_Checkpoint_63::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_63(env, context, options.notif_status_update, stats); + checkpoint_63(env, context, options.notif_status_update, stats, checkpoint_text()); } void checkpoint_61( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // first, clear Pokemon in Minimap. @@ -157,12 +158,13 @@ void checkpoint_61( } void checkpoint_62( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); @@ -240,12 +242,13 @@ void checkpoint_62( } void checkpoint_63( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // Gym leader defeated. Standing in Gym building diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h index 48eb6db284..36cba9da76 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h @@ -59,7 +59,8 @@ void checkpoint_61( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // start: At Medali Gym @@ -68,7 +69,8 @@ void checkpoint_62( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); @@ -78,7 +80,8 @@ void checkpoint_63( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, - AutoStoryStats& stats + AutoStoryStats& stats, + const std::string& checkpoint_text ); // moves player from Medali East Pokecenter to Glaseado Mountain Pokecenter diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp index 97d0d55ffd..98bcd87e1f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_64::name() const{ return "064 - " + AutoStory_S std::string AutoStory_Checkpoint_64::start_text() const{ return "At Glaseado Mountain Pokecenter";} std::string AutoStory_Checkpoint_64::end_text() const{ return "At Glaseado Mountain Pokecenter";} void AutoStory_Checkpoint_64::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_64(env, context, options.notif_status_update, stats); + checkpoint_64(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -78,7 +78,7 @@ std::string AutoStory_Checkpoint_65::name() const{ return "065 - " + AutoStory_S std::string AutoStory_Checkpoint_65::start_text() const{ return AutoStory_Checkpoint_64().end_text();} std::string AutoStory_Checkpoint_65::end_text() const{ return "Defeat Dondozo Titan phase 1.";} void AutoStory_Checkpoint_65::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_65(env, context, options.notif_status_update, stats); + checkpoint_65(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -86,7 +86,7 @@ std::string AutoStory_Checkpoint_66::name() const{ return "066 - " + AutoStory_S std::string AutoStory_Checkpoint_66::start_text() const{ return AutoStory_Checkpoint_65().end_text();} std::string AutoStory_Checkpoint_66::end_text() const{ return "Defeat Dondozo Titan phase 2-3.";} void AutoStory_Checkpoint_66::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_66(env, context, options.notif_status_update, stats); + checkpoint_66(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -94,13 +94,13 @@ std::string AutoStory_Checkpoint_67::name() const{ return "067 - " + AutoStory_S std::string AutoStory_Checkpoint_67::start_text() const{ return AutoStory_Checkpoint_66().end_text();} std::string AutoStory_Checkpoint_67::end_text() const{ return "At North Province Area Three Pokecenter";} void AutoStory_Checkpoint_67::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_67(env, context, options.notif_status_update, stats); + checkpoint_67(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -109,8 +109,8 @@ void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -127,8 +127,8 @@ void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); move_from_dondozo_titan_phase1_to_phase2(env, context); @@ -136,8 +136,8 @@ void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); // fly to Glaseado Mountain Pokecenter from Dondozo diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h index 0781e2085a..f210dbccd2 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h @@ -62,19 +62,19 @@ class AutoStory_Checkpoint_67 : public AutoStory_Checkpoint{ // start: At Glaseado Mountain Pokecenter // end: At Glaseado Mountain Pokecenter -void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At Glaseado Mountain Pokecenter // end: Defeat Dondozo Titan phase 1. -void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Defeat Dondozo Titan phase 1. // end: Defeat Dondozo Titan phase 2-3. -void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Defeat Dondozo Titan phase 2-3. // end: At North Province Area Three Pokecenter -void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp index a53e2c46b2..d3f78b654f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_68::name() const{ return "068 - " + AutoStory_S std::string AutoStory_Checkpoint_68::start_text() const{ return "At North Province Area Three Pokecenter";} std::string AutoStory_Checkpoint_68::end_text() const{ return "At North Province Area Three Pokecenter";} void AutoStory_Checkpoint_68::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_68(env, context, options.notif_status_update, stats); + checkpoint_68(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -78,20 +78,20 @@ std::string AutoStory_Checkpoint_69::name() const{ return "069 - " + AutoStory_S std::string AutoStory_Checkpoint_69::start_text() const{ return AutoStory_Checkpoint_68().end_text();} std::string AutoStory_Checkpoint_69::end_text() const{ return "Beat Team Star (Fairy)";} void AutoStory_Checkpoint_69::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_69(env, context, options.notif_status_update, stats); + checkpoint_69(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_70::name() const{ return "070 - " + AutoStory_Segment_28().name(); } std::string AutoStory_Checkpoint_70::start_text() const{ return AutoStory_Checkpoint_69().end_text();} std::string AutoStory_Checkpoint_70::end_text() const{ return "At Montenevera Pokecenter";} void AutoStory_Checkpoint_70::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_70(env, context, options.notif_status_update, stats); + checkpoint_70(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering @@ -100,8 +100,8 @@ void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -302,8 +302,8 @@ void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); // fly back to North Province Area Three diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h index 55ef76b946..4207d1d72c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h @@ -54,15 +54,15 @@ class AutoStory_Checkpoint_70 : public AutoStory_Checkpoint{ // start: At North Province Area Three Pokecenter // end: At North Province Area Three Pokecenter -void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At North Province Area Three Pokecenter // end: Beat Team Star (Fairy) -void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Team Star (Fairy) // end: At Montenevera Pokecenter -void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // moves player from Glaseado Mountain Pokecenter to Montenevera Pokecenter diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp index 5b2b902787..c3472da1f5 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_71::name() const{ return "071 - " + AutoStory_S std::string AutoStory_Checkpoint_71::start_text() const{ return "At Montenevera Pokecenter";} std::string AutoStory_Checkpoint_71::end_text() const{ return "Spoke to Montenevera gym receptionist";} void AutoStory_Checkpoint_71::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_71(env, context, options.notif_status_update, stats); + checkpoint_71(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -78,7 +78,7 @@ std::string AutoStory_Checkpoint_72::name() const{ return "072 - " + AutoStory_S std::string AutoStory_Checkpoint_72::start_text() const{ return AutoStory_Checkpoint_71().end_text();} std::string AutoStory_Checkpoint_72::end_text() const{ return "Passed gym test with MC Sledge.";} void AutoStory_Checkpoint_72::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_72(env, context, options.notif_status_update, stats); + checkpoint_72(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -86,7 +86,7 @@ std::string AutoStory_Checkpoint_73::name() const{ return "073 - " + AutoStory_S std::string AutoStory_Checkpoint_73::start_text() const{ return AutoStory_Checkpoint_72().end_text();} std::string AutoStory_Checkpoint_73::end_text() const{ return "Beat Montenevera Gym. Inside gym building.";} void AutoStory_Checkpoint_73::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_73(env, context, options.notif_status_update, stats); + checkpoint_73(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -94,13 +94,13 @@ std::string AutoStory_Checkpoint_74::name() const{ return "074 - " + AutoStory_S std::string AutoStory_Checkpoint_74::start_text() const{ return AutoStory_Checkpoint_73().end_text();} std::string AutoStory_Checkpoint_74::end_text() const{ return "At Glaseado gym Pokecenter.";} void AutoStory_Checkpoint_74::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_74(env, context, options.notif_status_update, stats); + checkpoint_74(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; @@ -155,8 +155,8 @@ void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); @@ -187,8 +187,8 @@ void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; @@ -210,8 +210,8 @@ void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); pbf_wait(context, 3000ms); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h index 2c32832eb5..3928d84ed3 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h @@ -62,19 +62,19 @@ class AutoStory_Checkpoint_74 : public AutoStory_Checkpoint{ // start: At Montenevera Pokecenter // end: Spoke to Montenevera gym receptionist -void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Spoke to Montenevera gym receptionist // end: Passed gym test with MC Sledge. -void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Passed gym test with MC Sledge. // end: Beat Montenevera Gym. Inside gym building. -void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Montenevera Gym. Inside gym building. // end: At Glaseado gym Pokecenter. -void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // moves player from Montenevera Pokecenter to Glaseado Gym Pokecenter void move_from_montenevera_to_glaseado_gym(SingleSwitchProgramEnvironment& env, ProControllerContext& context); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp index de8c497c5f..4c7a0b192c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_75::name() const{ return "075 - " + AutoStory_S std::string AutoStory_Checkpoint_75::start_text() const{ return "At Glaseado gym Pokecenter.";} std::string AutoStory_Checkpoint_75::end_text() const{ return "Battled Nemona. Spoke to Glaseado Gym receptionist";} void AutoStory_Checkpoint_75::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_75(env, context, options.notif_status_update, stats); + checkpoint_75(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -78,7 +78,7 @@ std::string AutoStory_Checkpoint_76::name() const{ return "076 - " + AutoStory_S std::string AutoStory_Checkpoint_76::start_text() const{ return AutoStory_Checkpoint_75().end_text();} std::string AutoStory_Checkpoint_76::end_text() const{ return "Beat Glaseado Gym Challenge. Beat Glaseado Gym (Ice).";} void AutoStory_Checkpoint_76::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_76(env, context, options.notif_status_update, stats); + checkpoint_76(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -86,13 +86,13 @@ std::string AutoStory_Checkpoint_77::name() const{ return "077 - " + AutoStory_S std::string AutoStory_Checkpoint_77::start_text() const{ return AutoStory_Checkpoint_76().end_text();} std::string AutoStory_Checkpoint_77::end_text() const{ return "At North Province Area One Pokecenter";} void AutoStory_Checkpoint_77::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_77(env, context, options.notif_status_update, stats); + checkpoint_77(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; @@ -156,8 +156,8 @@ void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); @@ -276,8 +276,8 @@ void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_77(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_77(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h index e82a294ab8..a5f08d5881 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h @@ -55,15 +55,15 @@ class AutoStory_Checkpoint_77 : public AutoStory_Checkpoint{ // start: At Glaseado Gym Pokecenter // end: Battled Nemona. Spoke to Glaseado Gym receptionist -void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Spoke to Glaseado Gym receptionist. // end: Beat Glaseado Gym Challenge. Beat Glaseado Gym (Ice). -void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Glaseado Gym Challenge. Beat Glaseado Gym (Ice). // end: At North Province Area One Pokecenter -void checkpoint_77(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_77(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp index 0edff8c78c..b6a488ce68 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp @@ -72,7 +72,7 @@ std::string AutoStory_Checkpoint_78::name() const{ return "078 - " + AutoStory_S std::string AutoStory_Checkpoint_78::start_text() const{ return "At North Province Area One Pokecenter";} std::string AutoStory_Checkpoint_78::end_text() const{ return "At North Province Area Two Pokecenter";} void AutoStory_Checkpoint_78::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_78(env, context, options.notif_status_update, stats); + checkpoint_78(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -80,34 +80,34 @@ std::string AutoStory_Checkpoint_79::name() const{ return "079 - " + AutoStory_S std::string AutoStory_Checkpoint_79::start_text() const{ return AutoStory_Checkpoint_78().end_text();} std::string AutoStory_Checkpoint_79::end_text() const{ return "At North Province Area Two Pokecenter";} void AutoStory_Checkpoint_79::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_79(env, context, options.notif_status_update, stats); + checkpoint_79(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_80::name() const{ return "080 - " + AutoStory_Segment_31().name(); } std::string AutoStory_Checkpoint_80::start_text() const{ return AutoStory_Checkpoint_79().end_text();} std::string AutoStory_Checkpoint_80::end_text() const{ return "Beat Team Star (Fighting)";} void AutoStory_Checkpoint_80::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_80(env, context, options.notif_status_update, stats); + checkpoint_80(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_81::name() const{ return "081 - " + AutoStory_Segment_31().name(); } std::string AutoStory_Checkpoint_81::start_text() const{ return AutoStory_Checkpoint_80().end_text();} std::string AutoStory_Checkpoint_81::end_text() const{ return "At Alfornada Pokecenter.";} void AutoStory_Checkpoint_81::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_81(env, context, options.notif_status_update, stats); + checkpoint_81(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_82::name() const{ return "082 - " + AutoStory_Segment_31().name(); } std::string AutoStory_Checkpoint_82::start_text() const{ return AutoStory_Checkpoint_81().end_text();} std::string AutoStory_Checkpoint_82::end_text() const{ return "At Alfornada Pokecenter.";} void AutoStory_Checkpoint_82::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_82(env, context, options.notif_status_update, stats); + checkpoint_82(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ heal_at_pokecenter(env.program_info(), env.console, context); @@ -118,24 +118,24 @@ void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint }, false); } -void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ beat_team_star_fighting1(env, context, attempt_number); beat_team_star_fighting2(env, context); }); } -void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ move_cursor_towards_flypoint_and_go_there( env.program_info(), @@ -148,8 +148,8 @@ void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h index 2174628169..7da58e3716 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h @@ -70,25 +70,25 @@ class AutoStory_Checkpoint_82 : public AutoStory_Checkpoint{ // start: At North Province Area One Pokecenter. // end: At North Province Area Two Pokecenter -void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At North Province Area Two Pokecenter // end: At North Province Area Two Pokecenter -void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At North Province Area Two Pokecenter // end: Beat Team Star (Fighting) -void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Team Star (Fighting) // end: At Alfornada Pokecenter. -void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At Alfornada Pokecenter. // end: At Alfornada Pokecenter. -void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp index d6bf393924..7fcd35fdff 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_83::name() const{ return "083 - " + AutoStory_S std::string AutoStory_Checkpoint_83::start_text() const{ return "At Alfornada Pokecenter.";} std::string AutoStory_Checkpoint_83::end_text() const{ return "At Alfornada Pokecenter.";} void AutoStory_Checkpoint_83::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_83(env, context, options.notif_status_update, stats); + checkpoint_83(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -78,13 +78,13 @@ std::string AutoStory_Checkpoint_84::name() const{ return "084 - " + AutoStory_S std::string AutoStory_Checkpoint_84::start_text() const{ return AutoStory_Checkpoint_83().end_text();} std::string AutoStory_Checkpoint_84::end_text() const{ return "Beat Alfornada gym challenge. Beat Alfornada gym. At Alfronada Pokecenter.";} void AutoStory_Checkpoint_84::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_84(env, context, options.notif_status_update, stats); + checkpoint_84(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint @@ -92,8 +92,8 @@ void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& co }, false); } -void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h index 43351146f5..9cca1d941e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h @@ -47,11 +47,11 @@ class AutoStory_Checkpoint_84 : public AutoStory_Checkpoint{ // start: At Alfornada Pokecenter. // end: At Alfornada Pokecenter. -void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At Alfornada Pokecenter. // end: Beat Alfornada gym challenge. Beat Alfornada gym. At Alfronada Pokecenter. -void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp index f4a0a95280..59c7ec39fb 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp @@ -76,7 +76,7 @@ std::string AutoStory_Checkpoint_85::name() const{ return "085 - " + AutoStory_S std::string AutoStory_Checkpoint_85::start_text() const{ return "Beat Alfornada gym challenge. Beat Alfornada gym. At Alfronada Pokecenter.";} std::string AutoStory_Checkpoint_85::end_text() const{ return "Beat Clavell. At Academy fly point.";} void AutoStory_Checkpoint_85::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_85(env, context, options.notif_status_update, stats); + checkpoint_85(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -84,7 +84,7 @@ std::string AutoStory_Checkpoint_86::name() const{ return "086 - " + AutoStory_S std::string AutoStory_Checkpoint_86::start_text() const{ return AutoStory_Checkpoint_85().end_text();} std::string AutoStory_Checkpoint_86::end_text() const{ return "At Pokemon League entrance.";} void AutoStory_Checkpoint_86::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_86(env, context, options.notif_status_update, stats); + checkpoint_86(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -92,7 +92,7 @@ std::string AutoStory_Checkpoint_87::name() const{ return "087 - " + AutoStory_S std::string AutoStory_Checkpoint_87::start_text() const{ return AutoStory_Checkpoint_86().end_text();} std::string AutoStory_Checkpoint_87::end_text() const{ return "Finished the Entrance quiz. Standing in front of Rika.";} void AutoStory_Checkpoint_87::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_87(env, context, options.notif_status_update, stats, options.language, options.starter_choice); + checkpoint_87(env, context, options.notif_status_update, stats, checkpoint_text(), options.language, options.starter_choice); } @@ -100,7 +100,7 @@ std::string AutoStory_Checkpoint_88::name() const{ return "088 - " + AutoStory_S std::string AutoStory_Checkpoint_88::start_text() const{ return AutoStory_Checkpoint_87().end_text();} std::string AutoStory_Checkpoint_88::end_text() const{ return "Beat Elite Four.";} void AutoStory_Checkpoint_88::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_88(env, context, options.notif_status_update, stats); + checkpoint_88(env, context, options.notif_status_update, stats, checkpoint_text()); } @@ -108,14 +108,14 @@ std::string AutoStory_Checkpoint_89::name() const{ return "089 - " + AutoStory_S std::string AutoStory_Checkpoint_89::start_text() const{ return AutoStory_Checkpoint_88().end_text();} std::string AutoStory_Checkpoint_89::end_text() const{ return "Beat Geeta. At Pokemon League Pokecenter.";} void AutoStory_Checkpoint_89::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_89(env, context, options.notif_status_update, stats); + checkpoint_89(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, +1, +0.609, 2560ms}, FlyPoint::FAST_TRAVEL); @@ -133,8 +133,8 @@ void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, -1, 0, 400ms); @@ -233,9 +233,9 @@ void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, Language language, StarterChoice starter_choice){ +void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text, Language language, StarterChoice starter_choice){ GameTitle game_title = GameTitle::UNKNOWN; - checkpoint_reattempt_loop(env, context, notif_status_update, stats, + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ if (game_title == GameTitle::UNKNOWN){ game_title = get_game_title(env, context); @@ -341,8 +341,8 @@ void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // standing in front of Rika // now done talking to Rika. walk around Rika's desk. @@ -425,8 +425,8 @@ void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60000ms); clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW, CallbackEnum::PROMPT_DIALOG}); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h index 7cf7190ef2..51ee30c2dc 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h @@ -75,23 +75,23 @@ class AutoStory_Checkpoint_89 : public AutoStory_Checkpoint{ // start: Beat Alfornada gym challenge. Beat Alfornada gym. At Alfronada Pokecenter. // end: Beat Clavell. At Academy fly point. -void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Clavell. At Academy fly point. // end: At Pokemon League entrance. -void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At Pokemon League entrance. // end: Finished the Entrance quiz. Standing in front of Rika. -void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, Language language, StarterChoice starter_choice); +void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text, Language language, StarterChoice starter_choice); // start: Finished the Entrance quiz. Standing in front of Rika. // end: Beat Elite Four. -void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Elite Four. // end: Beat Geeta. At Pokemon League Pokecenter. -void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); GameTitle get_game_title(SingleSwitchProgramEnvironment& env, ProControllerContext& context); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp index 30bc3edcbb..afa1b38492 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp @@ -66,27 +66,27 @@ std::string AutoStory_Checkpoint_90::name() const{ return "090 - " + AutoStory_S std::string AutoStory_Checkpoint_90::start_text() const{ return "Beat Geeta. At Pokemon League Pokecenter.";} std::string AutoStory_Checkpoint_90::end_text() const{ return "Beat Nemona. At dormitory room, next to bed.";} void AutoStory_Checkpoint_90::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_90(env, context, options.notif_status_update, stats); + checkpoint_90(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_91::name() const{ return "091 - " + AutoStory_Segment_34().name(); } std::string AutoStory_Checkpoint_91::start_text() const{ return AutoStory_Checkpoint_90().end_text();} std::string AutoStory_Checkpoint_91::end_text() const{ return "Beat Penny. At Academy fly point.";} void AutoStory_Checkpoint_91::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_91(env, context, options.notif_status_update, stats); + checkpoint_91(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_92::name() const{ return "092 - " + AutoStory_Segment_34().name(); } std::string AutoStory_Checkpoint_92::start_text() const{ return AutoStory_Checkpoint_91().end_text();} std::string AutoStory_Checkpoint_92::end_text() const{ return "Beat Arven. At Los Platos Pokecenter.";} void AutoStory_Checkpoint_92::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_92(env, context, options.notif_status_update, stats); + checkpoint_92(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // Fly to Academy move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, +1, -0.803, 640ms}, FlyPoint::FAST_TRAVEL); @@ -114,8 +114,8 @@ void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // walk down @@ -208,8 +208,8 @@ void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_92(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_92(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::ZOOM_IN, +0.134, -1, 2800ms}, FlyPoint::FAST_TRAVEL); handle_unexpected_battles(env.program_info(), env.console, context, diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h index 361b12f0eb..62f626e66e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h @@ -54,15 +54,15 @@ class AutoStory_Checkpoint_92 : public AutoStory_Checkpoint{ // start: Beat Geeta. At Pokemon League Pokecenter. // end: Beat Nemona. At dormitory room, next to bed. -void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Nemona. At dormitory room, next to bed." // end: Beat Penny. At Academy fly point. -void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Penny. At Academy fly point. // end: Beat Arven. At Los Platos Pokecenter. -void checkpoint_92(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_92(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp index b4cd24e270..21d1360be7 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp @@ -67,26 +67,26 @@ std::string AutoStory_Checkpoint_93::name() const{ return "093 - " + AutoStory_S std::string AutoStory_Checkpoint_93::start_text() const{ return "Beat Arven. At Los Platos Pokecenter.";} std::string AutoStory_Checkpoint_93::end_text() const{ return "Entered Area Zero Gate. Flew down to Area Zero from the platform.";} void AutoStory_Checkpoint_93::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_93(env, context, options.notif_status_update, stats); + checkpoint_93(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_94::name() const{ return "094 - " + AutoStory_Segment_35().name(); } std::string AutoStory_Checkpoint_94::start_text() const{ return AutoStory_Checkpoint_93().end_text();} std::string AutoStory_Checkpoint_94::end_text() const{ return "Inside Area Zero Station 1. Deactivated the locks.";} void AutoStory_Checkpoint_94::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_94(env, context, options.notif_status_update, stats); + checkpoint_94(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_95::name() const{ return "095 - " + AutoStory_Segment_35().name(); } std::string AutoStory_Checkpoint_95::start_text() const{ return AutoStory_Checkpoint_94().end_text();} std::string AutoStory_Checkpoint_95::end_text() const{ return "Inside Area Zero Station 1. Deactivated the locks.";} void AutoStory_Checkpoint_95::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_95(env, context, options.notif_status_update, stats); + checkpoint_95(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // fly to Medali West from Los Platos Pokecenter // this clears Pokemon in minimap @@ -229,8 +229,8 @@ void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ @@ -635,8 +635,8 @@ void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& co }, false); } -void checkpoint_95(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_95(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h index efaf8630b4..5f2291186d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h @@ -52,15 +52,15 @@ class AutoStory_Checkpoint_95 : public AutoStory_Checkpoint{ // start: Beat Arven. At Los Platos Pokecenter. // end: Entered Area Zero Gate. Flew down to Area Zero from the platform. -void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Entered Area Zero Gate. Flew down to Area Zero from the platform. // end: Inside Area Zero Station 1. Deactivated the locks. -void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Inside Area Zero Station 1. Deactivated the locks. // end: Inside Area Zero Station 1. Deactivated the locks. -void checkpoint_95(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_95(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.cpp index 800600f121..84d6257bd8 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.cpp @@ -65,21 +65,21 @@ std::string AutoStory_Checkpoint_96::name() const{ return "096 - " + AutoStory_S std::string AutoStory_Checkpoint_96::start_text() const{ return "Inside Area Zero Station 1. Deactivated the locks.";} std::string AutoStory_Checkpoint_96::end_text() const{ return "Inside Area Zero Station 2. Deactivated the locks.";} void AutoStory_Checkpoint_96::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_96(env, context, options.notif_status_update, stats); + checkpoint_96(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_97::name() const{ return "097 - " + AutoStory_Segment_36().name(); } std::string AutoStory_Checkpoint_97::start_text() const{ return AutoStory_Checkpoint_96().end_text();} std::string AutoStory_Checkpoint_97::end_text() const{ return "Inside Area Zero Station 2. Deactivated the locks.";} void AutoStory_Checkpoint_97::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_97(env, context, options.notif_status_update, stats); + checkpoint_97(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ YOLOv5Detector yolo_detector(RESOURCE_PATH() + "PokemonSV/YOLO/A0-station-2.onnx"); @@ -306,8 +306,8 @@ void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& co }, false); } -void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h index 971da824e1..7b3fe9f406 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h @@ -45,11 +45,11 @@ class AutoStory_Checkpoint_97 : public AutoStory_Checkpoint{ // start: Inside Area Zero Station 1. Deactivated the locks. // end: Inside Area Zero Station 2. Deactivated the locks. -void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Inside Area Zero Station 2. Deactivated the locks. // end: Inside Area Zero Station 2. Deactivated the locks. -void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.cpp index d08fe591bc..b49d276312 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.cpp @@ -65,18 +65,18 @@ std::string AutoStory_Checkpoint_98::name() const{ return "098 - " + AutoStory_S std::string AutoStory_Checkpoint_98::start_text() const{ return "Inside Area Zero Station 2. Deactivated the locks.";} std::string AutoStory_Checkpoint_98::end_text() const{ return "Inside Area Zero Station 3. Deactivated the locks.";} void AutoStory_Checkpoint_98::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_98(env, context, options.notif_status_update, stats); + checkpoint_98(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_99::name() const{ return "099 - " + AutoStory_Segment_37().name(); } std::string AutoStory_Checkpoint_99::start_text() const{ return AutoStory_Checkpoint_98().end_text();} std::string AutoStory_Checkpoint_99::end_text() const{ return "Inside Area Zero Station 3. Deactivated the locks.";} void AutoStory_Checkpoint_99::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_99(env, context, options.notif_status_update, stats); + checkpoint_99(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ YOLOv5Detector yolo_detector(RESOURCE_PATH() + "PokemonSV/YOLO/A0-station-3.onnx"); @@ -348,8 +348,8 @@ void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& co }, false); } -void checkpoint_99(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_99(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.h index dda9e2c400..117e0dc76c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.h @@ -45,11 +45,11 @@ class AutoStory_Checkpoint_99 : public AutoStory_Checkpoint{ // start: Inside Area Zero Station 2. Deactivated the locks. // end: Inside Area Zero Station 3. Deactivated the locks. -void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Inside Area Zero Station 3. Deactivated the locks. // end: Inside Area Zero Station 3. Deactivated the locks. -void checkpoint_99(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_99(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp index 88a02e65d1..74a38835b8 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp @@ -65,19 +65,19 @@ std::string AutoStory_Checkpoint_100::name() const{ return "100 - " + AutoStory_ std::string AutoStory_Checkpoint_100::start_text() const{ return "Inside Area Zero Station 3. Deactivated the locks.";} std::string AutoStory_Checkpoint_100::end_text() const{ return "Entered inner cave. Finished cutscene, admiring the waterfall/large crystals.";} void AutoStory_Checkpoint_100::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_100(env, context, options.notif_status_update, stats); + checkpoint_100(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_101::name() const{ return "101 - " + AutoStory_Segment_38().name(); } std::string AutoStory_Checkpoint_101::start_text() const{ return AutoStory_Checkpoint_100().end_text();} std::string AutoStory_Checkpoint_101::end_text() const{ return "Inside Area Zero Station 4. Deactivated the locks.";} void AutoStory_Checkpoint_101::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_101(env, context, options.notif_status_update, stats); + checkpoint_101(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ YOLOv5Detector yolo_detector(RESOURCE_PATH() + "PokemonSV/YOLO/A0-station-4a.onnx"); @@ -243,8 +243,8 @@ void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& c }, false); } -void checkpoint_101(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_101(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.h index a5b26e44ee..a502079a32 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.h @@ -46,11 +46,11 @@ class AutoStory_Checkpoint_101 : public AutoStory_Checkpoint{ // start: Inside Area Zero Station 3. Deactivated the locks. // end: Entered inner cave. Finished cutscene, admiring the waterfall/large crystals. -void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Entered inner cave. Finished cutscene, admiring the waterfall/large crystals. // end: Inside Area Zero Station 4. Deactivated the locks. -void checkpoint_101(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_101(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.cpp index 345e0003ce..829b7335cc 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.cpp @@ -65,19 +65,19 @@ std::string AutoStory_Checkpoint_102::name() const{ return "102 - " + AutoStory_ std::string AutoStory_Checkpoint_102::start_text() const{ return "Inside Area Zero Station 4. Deactivated the locks.";} std::string AutoStory_Checkpoint_102::end_text() const{ return "Opened Zero lab. Defeated Paradox Pokemon.";} void AutoStory_Checkpoint_102::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_102(env, context, options.notif_status_update, stats); + checkpoint_102(env, context, options.notif_status_update, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_103::name() const{ return "103 - " + AutoStory_Segment_39().name(); } std::string AutoStory_Checkpoint_103::start_text() const{ return AutoStory_Checkpoint_102().end_text();} std::string AutoStory_Checkpoint_103::end_text() const{ return "";} void AutoStory_Checkpoint_103::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_103(env, context, options.notif_status_update, stats); + checkpoint_103(env, context, options.notif_status_update, stats, checkpoint_text()); } -void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ YOLOv5Detector yolo_detector(RESOURCE_PATH() + "PokemonSV/YOLO/A0-lab.onnx"); @@ -274,8 +274,8 @@ void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& c }, false); } -void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ do_action_and_monitor_for_battles(env.program_info(), env.console, context, diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.h index 801f04ca10..71c3caec68 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.h @@ -46,11 +46,11 @@ class AutoStory_Checkpoint_103 : public AutoStory_Checkpoint{ // start: Inside Area Zero Station 4. Deactivated the locks. // end: Opened Zero lab. Defeated Paradox Pokemon. -void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Opened Zero lab. Defeated Paradox Pokemon. // end: Entered Zero Lab. Spoke to AI Professor. -void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.cpp index d88e69b48d..4eb996e12c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.cpp @@ -66,18 +66,18 @@ std::string AutoStory_Checkpoint_104::name() const{ return "104 - " + AutoStory_ std::string AutoStory_Checkpoint_104::start_text() const{ return "Entered Zero Lab. Spoke to AI Professor.";} std::string AutoStory_Checkpoint_104::end_text() const{ return "Battled the AI Professor. Completed the game.";} void AutoStory_Checkpoint_104::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_104(env, context, options.notif_status_update, stats); + checkpoint_104(env, context, options.notif_status_update, stats, checkpoint_text()); } // std::string AutoStory_Checkpoint_105::name() const{ return "105 - " + AutoStory_Segment_40().name(); } // std::string AutoStory_Checkpoint_105::start_text() const{ return "";} // std::string AutoStory_Checkpoint_105::end_text() const{ return "";} // void AutoStory_Checkpoint_105::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ -// checkpoint_105(env, context, options.notif_status_update, stats); +// checkpoint_105(env, context, options.notif_status_update, stats, checkpoint_text()); // } -void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, +void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, [&](size_t attempt_number){ pbf_press_button(context, BUTTON_L, 240ms, 80ms); @@ -174,7 +174,7 @@ void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& c }, false); } -// void checkpoint_105(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +// void checkpoint_105(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ // } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.h index fb4a9e1ffe..eb9e5d6369 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.h @@ -46,11 +46,11 @@ class AutoStory_Checkpoint_104 : public AutoStory_Checkpoint{ // start: Entered Zero Lab. Spoke to AI Professor. // end: Battled the AI Professor. Completed the game. -void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); // // start: // // end: -// void checkpoint_105(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +// void checkpoint_105(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); From c4b0e0c0bacfb1d8447ec2a9597a1cf591f4f2b2 Mon Sep 17 00:00:00 2001 From: jw098 Date: Fri, 14 Aug 2026 13:33:38 -0700 Subject: [PATCH 5/9] adjusting logging for checkpoint_reattempt_loop --- .../Programs/AutoStory/PokemonSV_AutoStoryTools.cpp | 6 +++--- .../PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp index b3814c0f71..0766352778 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp @@ -1433,7 +1433,7 @@ void checkpoint_reattempt_loop( save_game_from_overworld(env.program_info(), env.console, context); } - env.console.log(checkpoint_text); + env.console.log(checkpoint_text + " Num attempts: " + std::to_string(i)); context.wait_for_all_requests(); action(i); @@ -1479,8 +1479,8 @@ void checkpoint_reattempt_loop_tutorial( send_program_status_notification(env, notif_status_update, "Saved at checkpoint."); } - env.console.log(checkpoint_text); - + env.console.log(checkpoint_text + " Num attempts: " + std::to_string(i)); + context.wait_for_all_requests(); action(i); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h index cae2173883..7421a1e067 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h @@ -118,7 +118,7 @@ class AutoStory_Checkpoint { AutoStoryStats& stats) const = 0; std::string checkpoint_text() const { - return "Checkpoint " + name() + ". Start point:" + start_text(); + return "Checkpoint: " + name() + ". Start point:" + start_text(); } }; From 824163eddddfa8bfbb8d19ebe4a99a3016f04157 Mon Sep 17 00:00:00 2001 From: jw098 Date: Fri, 14 Aug 2026 23:01:09 -0700 Subject: [PATCH 6/9] send error report after 10 failed attempts --- .../Programs/AutoStory/PokemonSV_AutoStoryTools.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp index 0766352778..e9d0996846 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp @@ -1442,6 +1442,15 @@ void checkpoint_reattempt_loop( break; }catch (OperationFailedException& e){ + if (i == 10){ // send an error report for debugging if 10 failed attempts for a given checkpoint. + OperationFailedException exception( + ErrorReport::SEND_ERROR_REPORT, + "10 failed attempts. " + checkpoint_text, + env.console + ); + exception.send_recoverable_notification(env); + } + if (i > max_attempts){ OperationFailedException::fire( ErrorReport::SEND_ERROR_REPORT, From b548a6f1d24918e445e044404a998c7333bdb3c7 Mon Sep 17 00:00:00 2001 From: jw098 Date: Fri, 14 Aug 2026 23:04:49 -0700 Subject: [PATCH 7/9] minor update --- .../PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h index 7421a1e067..99e5b22241 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h @@ -118,7 +118,7 @@ class AutoStory_Checkpoint { AutoStoryStats& stats) const = 0; std::string checkpoint_text() const { - return "Checkpoint: " + name() + ". Start point:" + start_text(); + return "Checkpoint:: " + name() + ". Start point:" + start_text(); } }; From 5fbbf805812001519d497c1e4996fabca7485b9e Mon Sep 17 00:00:00 2001 From: jw098 Date: Fri, 14 Aug 2026 23:26:21 -0700 Subject: [PATCH 8/9] adjust checkpoint: entering Medali eatery --- .../PokemonSV_AutoStory_Segment_26.cpp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp index 51ac1a0137..d33a81772e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp @@ -6,6 +6,7 @@ #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "CommonFramework/VideoPipeline/VideoFeed.h" +#include "CommonTools/VisualDetectors/BlackScreenDetector.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonTools/Async/InferenceRoutines.h" @@ -192,7 +193,27 @@ void checkpoint_62( direction.change_direction(env.program_info(), env.console, context, 5.114177); // old 4.975295 - pbf_move_left_joystick(context, {0, +1}, 2400ms, 400ms); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + BlackScreenWatcher black_screen(COLOR_RED); + int ret = run_until( + env.console, context, + [](ProControllerContext& context){ + pbf_move_left_joystick(context, {0, +1}, 10000ms, 0ms); + }, + { black_screen } + ); + if (ret == 0){ + env.console.log("Detected black screen. Assume entered Eatery."); + return; + } + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, {+1, +1}, 800ms, 400ms); + }, + 5, 5 + ); pbf_wait(context, 3000ms); // wait for overworld after entering Eatery From 305e6231eebc237e6e6e34a15f77202412ee0b9e Mon Sep 17 00:00:00 2001 From: jw098 Date: Sat, 15 Aug 2026 00:02:48 -0700 Subject: [PATCH 9/9] more checkpoint adjustments: entering Medali eatery --- .../AutoStory/PokemonSV_AutoStory_Segment_26.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp index d33a81772e..a2e480ffa9 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp @@ -194,6 +194,8 @@ void checkpoint_62( direction.change_direction(env.program_info(), env.console, context, 5.114177); // old 4.975295 + + env.console.log("Attempt to enter Eatery."); handle_when_stationary_in_overworld(env.program_info(), env.console, context, [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ BlackScreenWatcher black_screen(COLOR_RED); @@ -206,7 +208,13 @@ void checkpoint_62( ); if (ret == 0){ env.console.log("Detected black screen. Assume entered Eatery."); - return; + } + if (ret < 0){ + OperationFailedException::fire( + ErrorReport::SEND_ERROR_REPORT, + "Never detected black screen. Failed to enter Eatery.", + env.console + ); } }, [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){