From 607134181ff9ec8d84795b4c64411d7d9d970f78 Mon Sep 17 00:00:00 2001 From: jw098 Date: Mon, 8 Sep 2025 20:54:26 -0700 Subject: [PATCH 1/3] checkpoint 54: At East Province (Area Three) Watchtower. --- .../PokemonSV_AutoStory_Segment_23.cpp | 325 +++++++++++++++++- .../PokemonSV_AutoStory_Segment_23.h | 4 +- 2 files changed, 325 insertions(+), 4 deletions(-) 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 6994d2c0b7..30cea6b49c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp @@ -4,6 +4,8 @@ * */ +#include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" + #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonTools/Async/InferenceRoutines.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" @@ -28,11 +30,11 @@ namespace PokemonSV{ std::string AutoStory_Segment_23::name() const{ - return ""; + return "23: Orthworm Titan"; } std::string AutoStory_Segment_23::start_text() const{ - return "Start: "; + return "Start: Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter."; } std::string AutoStory_Segment_23::end_text() const{ @@ -69,6 +71,268 @@ void checkpoint_54( [&](size_t attempt_number){ + DirectionDetector direction; + direction.change_direction(env.program_info(), env.console, context, 1.341); + pbf_move_left_joystick(context, 128, 0, 450, 100); + + // marker 1 + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 160, 0, 35); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 24, 8, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 2 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + {ZoomChange::ZOOM_IN, 200, 0, 80} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 3 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + {ZoomChange::ZOOM_IN, 190, 0, 115} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 24, 8, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 4 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 128, 255, 50}, + {ZoomChange::ZOOM_IN, 150, 0, 112} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 20, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 5 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 128, 255, 50}, + {ZoomChange::ZOOM_IN, 135, 0, 107} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 16, 8, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 6 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 128, 255, 50}, + {ZoomChange::ZOOM_IN, 120, 0, 95} + ); + + // walk forward until dialog + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_DIALOG, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 16, 8, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + mash_button_till_overworld(env.console, context, BUTTON_A); + + // resume marker 6 + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 16, 8, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 7 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 128, 255, 50}, + {ZoomChange::ZOOM_IN, 110, 0, 55} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 20, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 8 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + {ZoomChange::ZOOM_IN, 0, 50, 60} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 30, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 9. at crossroads + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + {ZoomChange::ZOOM_IN, 0, 110, 115} + ); + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 40, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 10 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + {ZoomChange::ZOOM_IN, 0, 80, 125} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 10, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 0, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 11 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 255, 128, 50}, + {ZoomChange::ZOOM_IN, 0, 85, 135} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 24, 8, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 12 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 255, 128, 50}, + {ZoomChange::ZOOM_IN, 0, 70, 140} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 24, 8, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 13 + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 255, 128, 50}, + {ZoomChange::ZOOM_IN, 0, 45, 130} + ); + + handle_when_stationary_in_overworld(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 0, 20, 10, false); + }, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + pbf_move_left_joystick(context, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + fly_to_overlapping_flypoint(env.program_info(), env.console, context); + + }); } @@ -81,6 +345,63 @@ void checkpoint_55( ){ checkpoint_reattempt_loop(env, context, notif_status_update, stats, [&](size_t attempt_number){ + ///////////////////// + + // get_off_ride(env.program_info(), env.console, context); + + + // direction.change_direction(env.program_info(), env.console, context, 0.261); + // pbf_move_left_joystick(context, 128, 0, 500, 100); + // pbf_move_left_joystick(context, 0, 0, 500, 100); + + // // now aligned to corner. + + // direction.change_direction(env.program_info(), env.console, context, 3.736); + // pbf_move_left_joystick(context, 128, 0, 400, 100); + + // direction.change_direction(env.program_info(), env.console, context, 5.306); + // pbf_move_left_joystick(context, 128, 0, 700, 100); + + + // direction.change_direction(env.program_info(), env.console, context, 4.988); + // pbf_move_left_joystick(context, 128, 0, 800, 100); + // pbf_move_left_joystick(context, 255, 0, 500, 100); + + // // now aligned to the wall next to the hole/passage + + // // walk away from wall slightly + // pbf_move_left_joystick(context, 128, 255, 50, 100); + // get_on_ride(env.program_info(), env.console, context); + + // direction.change_direction(env.program_info(), env.console, context, 0.366); + // pbf_move_left_joystick(context, 128, 0, 250, 100); + + // direction.change_direction(env.program_info(), env.console, context, 2.565); + // // run at Orthworm. run into its second position as well. + // pbf_move_left_joystick(context, 128, 0, 50, 0); + // pbf_controller_state(context, BUTTON_LCLICK, DPAD_NONE, 128, 0, 128, 128, 500); + // pbf_move_left_joystick(context, 255, 0, 500, 500); + + // get_off_ride(env.program_info(), env.console, context); + + // direction.change_direction(env.program_info(), env.console, context, 0.261); + // pbf_move_left_joystick(context, 128, 0, 500, 100); + // pbf_move_left_joystick(context, 0, 0, 500, 100); + + // // now aligned to corner. + + // direction.change_direction(env.program_info(), env.console, context, 3.736); + // pbf_move_left_joystick(context, 128, 0, 400, 100); + + // direction.change_direction(env.program_info(), env.console, context, 5.306); + // pbf_move_left_joystick(context, 128, 0, 700, 100); + + + // direction.change_direction(env.program_info(), env.console, context, 4.988); + // pbf_move_left_joystick(context, 128, 0, 800, 100); + // pbf_move_left_joystick(context, 255, 0, 500, 100); + + // // now aligned to the wall next to the hole/passage }); 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 a284f144cf..83fbde4afa 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h @@ -27,8 +27,8 @@ class AutoStory_Segment_23 : public AutoStory_Segment{ }; -// start: -// end: +// start: Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter. +// end: At East Province (Area Three) Watchtower. void checkpoint_54( SingleSwitchProgramEnvironment& env, ProControllerContext& context, From 5a1177f0ca79bf7a4b594564553f08c97686a401 Mon Sep 17 00:00:00 2001 From: jw098 Date: Mon, 8 Sep 2025 21:04:33 -0700 Subject: [PATCH 2/3] partially complete checkpoint 55 --- .../Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp | 3 +++ .../Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 30cea6b49c..0dec7db90d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp @@ -345,6 +345,9 @@ void checkpoint_55( ){ checkpoint_reattempt_loop(env, context, notif_status_update, stats, [&](size_t attempt_number){ + + // todo: try to align to left side of tunnel. then charge at Orthworm + // reset if caught in battle. ///////////////////// // get_off_ride(env.program_info(), env.console, context); 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 83fbde4afa..7e50f81ef7 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h @@ -37,7 +37,7 @@ void checkpoint_54( ); -// start: +// start: At East Province (Area Three) Watchtower. // end: void checkpoint_55( SingleSwitchProgramEnvironment& env, From 95d0849aab1f7c15ceabff185ca14d07580f8041 Mon Sep 17 00:00:00 2001 From: jw098 Date: Tue, 9 Sep 2025 12:22:32 -0700 Subject: [PATCH 3/3] add blank Autostory segments --- .../AutoStory/PokemonSV_AutoStory.cpp | 12 +- .../PokemonSV_AutoStory_Segment_23.cpp | 152 +----------------- .../PokemonSV_AutoStory_Segment_23.h | 56 ------- .../PokemonSV_AutoStory_Segment_24.cpp | 147 +++++++++++++++++ .../PokemonSV_AutoStory_Segment_24.h | 56 +++++++ .../PokemonSV_AutoStory_Segment_25.cpp | 66 ++++++++ .../PokemonSV_AutoStory_Segment_25.h | 35 ++++ .../PokemonSV_AutoStory_Segment_26.cpp | 66 ++++++++ .../PokemonSV_AutoStory_Segment_26.h | 35 ++++ .../PokemonSV_AutoStory_Segment_27.cpp | 66 ++++++++ .../PokemonSV_AutoStory_Segment_27.h | 35 ++++ .../PokemonSV_AutoStory_Segment_28.cpp | 66 ++++++++ .../PokemonSV_AutoStory_Segment_28.h | 35 ++++ .../PokemonSV_AutoStory_Segment_29.cpp | 66 ++++++++ .../PokemonSV_AutoStory_Segment_29.h | 35 ++++ 15 files changed, 722 insertions(+), 206 deletions(-) create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp create mode 100644 SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index 21d8e1fa0d..592df5efe8 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -46,6 +46,11 @@ #include "PokemonSV_AutoStory_Segment_22.h" #include "PokemonSV_AutoStory_Segment_23.h" #include "PokemonSV_AutoStory_Segment_24.h" +#include "PokemonSV_AutoStory_Segment_25.h" +#include "PokemonSV_AutoStory_Segment_26.h" +#include "PokemonSV_AutoStory_Segment_27.h" +#include "PokemonSV_AutoStory_Segment_28.h" +#include "PokemonSV_AutoStory_Segment_29.h" #include "PokemonSV_AutoStory.h" #include @@ -88,8 +93,13 @@ std::vector> make_autoStory_segment_list(){ segment_list.emplace_back(std::make_unique()); segment_list.emplace_back(std::make_unique()); segment_list.emplace_back(std::make_unique()); - // segment_list.emplace_back(std::make_unique()); + segment_list.emplace_back(std::make_unique()); // segment_list.emplace_back(std::make_unique()); + // segment_list.emplace_back(std::make_unique()); + // segment_list.emplace_back(std::make_unique()); + // segment_list.emplace_back(std::make_unique()); + // segment_list.emplace_back(std::make_unique()); + // segment_list.emplace_back(std::make_unique()); return segment_list; }; 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 0dec7db90d..b78efb9911 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp @@ -30,7 +30,7 @@ namespace PokemonSV{ std::string AutoStory_Segment_23::name() const{ - return "23: Orthworm Titan"; + return "23: Orthworm Titan: Go to East Province (Area Three) Watchtower."; } std::string AutoStory_Segment_23::start_text() const{ @@ -38,7 +38,7 @@ std::string AutoStory_Segment_23::start_text() const{ } std::string AutoStory_Segment_23::end_text() const{ - return "End: "; + return "End: At East Province (Area Three) Watchtower."; } void AutoStory_Segment_23::run_segment( @@ -54,7 +54,7 @@ void AutoStory_Segment_23::run_segment( context.wait_for_all_requests(); env.console.log("Start Segment " + name(), COLOR_ORANGE); - // checkpoint_(env, context, options.notif_status_update, stats); + checkpoint_54(env, context, options.notif_status_update, stats); context.wait_for_all_requests(); env.console.log("End Segment " + name(), COLOR_GREEN); @@ -337,152 +337,6 @@ void checkpoint_54( } -void checkpoint_55( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - // todo: try to align to left side of tunnel. then charge at Orthworm - // reset if caught in battle. - ///////////////////// - - // get_off_ride(env.program_info(), env.console, context); - - - // direction.change_direction(env.program_info(), env.console, context, 0.261); - // pbf_move_left_joystick(context, 128, 0, 500, 100); - // pbf_move_left_joystick(context, 0, 0, 500, 100); - - // // now aligned to corner. - - // direction.change_direction(env.program_info(), env.console, context, 3.736); - // pbf_move_left_joystick(context, 128, 0, 400, 100); - - // direction.change_direction(env.program_info(), env.console, context, 5.306); - // pbf_move_left_joystick(context, 128, 0, 700, 100); - - - // direction.change_direction(env.program_info(), env.console, context, 4.988); - // pbf_move_left_joystick(context, 128, 0, 800, 100); - // pbf_move_left_joystick(context, 255, 0, 500, 100); - - // // now aligned to the wall next to the hole/passage - - // // walk away from wall slightly - // pbf_move_left_joystick(context, 128, 255, 50, 100); - // get_on_ride(env.program_info(), env.console, context); - - // direction.change_direction(env.program_info(), env.console, context, 0.366); - // pbf_move_left_joystick(context, 128, 0, 250, 100); - - // direction.change_direction(env.program_info(), env.console, context, 2.565); - // // run at Orthworm. run into its second position as well. - // pbf_move_left_joystick(context, 128, 0, 50, 0); - // pbf_controller_state(context, BUTTON_LCLICK, DPAD_NONE, 128, 0, 128, 128, 500); - // pbf_move_left_joystick(context, 255, 0, 500, 500); - - // get_off_ride(env.program_info(), env.console, context); - - // direction.change_direction(env.program_info(), env.console, context, 0.261); - // pbf_move_left_joystick(context, 128, 0, 500, 100); - // pbf_move_left_joystick(context, 0, 0, 500, 100); - - // // now aligned to corner. - - // direction.change_direction(env.program_info(), env.console, context, 3.736); - // pbf_move_left_joystick(context, 128, 0, 400, 100); - - // direction.change_direction(env.program_info(), env.console, context, 5.306); - // pbf_move_left_joystick(context, 128, 0, 700, 100); - - - // direction.change_direction(env.program_info(), env.console, context, 4.988); - // pbf_move_left_joystick(context, 128, 0, 800, 100); - // pbf_move_left_joystick(context, 255, 0, 500, 100); - - // // now aligned to the wall next to the hole/passage - - - }); - -} - -void checkpoint_56( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - - }); - -} - -void checkpoint_57( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - - }); - -} - -void checkpoint_58( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - - }); - -} - -void checkpoint_59( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - - }); - -} - -void checkpoint_60( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, - [&](size_t attempt_number){ - - - }); - -} - - - } } 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 7e50f81ef7..a04075810b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h @@ -37,62 +37,6 @@ void checkpoint_54( ); -// start: At East Province (Area Three) Watchtower. -// end: -void checkpoint_55( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); - -// start: -// end: -void checkpoint_56( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); - -// start: -// end: -void checkpoint_57( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); - -// start: -// end: -void checkpoint_58( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); - -// start: -// end: -void checkpoint_59( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); - -// start: -// end: -void checkpoint_60( - SingleSwitchProgramEnvironment& env, - ProControllerContext& context, - EventNotificationOption& notif_status_update, - AutoStoryStats& stats -); - - - } } 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 91b37de11e..f55e48b3bb 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp @@ -60,6 +60,153 @@ void AutoStory_Segment_24::run_segment( } +void checkpoint_55( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + // todo: try to align to left side of tunnel. then charge at Orthworm + // reset if caught in battle. + ///////////////////// + + // get_off_ride(env.program_info(), env.console, context); + + + // direction.change_direction(env.program_info(), env.console, context, 0.261); + // pbf_move_left_joystick(context, 128, 0, 500, 100); + // pbf_move_left_joystick(context, 0, 0, 500, 100); + + // // now aligned to corner. + + // direction.change_direction(env.program_info(), env.console, context, 3.736); + // pbf_move_left_joystick(context, 128, 0, 400, 100); + + // direction.change_direction(env.program_info(), env.console, context, 5.306); + // pbf_move_left_joystick(context, 128, 0, 700, 100); + + + // direction.change_direction(env.program_info(), env.console, context, 4.988); + // pbf_move_left_joystick(context, 128, 0, 800, 100); + // pbf_move_left_joystick(context, 255, 0, 500, 100); + + // // now aligned to the wall next to the hole/passage + + // // walk away from wall slightly + // pbf_move_left_joystick(context, 128, 255, 50, 100); + // get_on_ride(env.program_info(), env.console, context); + + // direction.change_direction(env.program_info(), env.console, context, 0.366); + // pbf_move_left_joystick(context, 128, 0, 250, 100); + + // direction.change_direction(env.program_info(), env.console, context, 2.565); + // // run at Orthworm. run into its second position as well. + // pbf_move_left_joystick(context, 128, 0, 50, 0); + // pbf_controller_state(context, BUTTON_LCLICK, DPAD_NONE, 128, 0, 128, 128, 500); + // pbf_move_left_joystick(context, 255, 0, 500, 500); + + // get_off_ride(env.program_info(), env.console, context); + + // direction.change_direction(env.program_info(), env.console, context, 0.261); + // pbf_move_left_joystick(context, 128, 0, 500, 100); + // pbf_move_left_joystick(context, 0, 0, 500, 100); + + // // now aligned to corner. + + // direction.change_direction(env.program_info(), env.console, context, 3.736); + // pbf_move_left_joystick(context, 128, 0, 400, 100); + + // direction.change_direction(env.program_info(), env.console, context, 5.306); + // pbf_move_left_joystick(context, 128, 0, 700, 100); + + + // direction.change_direction(env.program_info(), env.console, context, 4.988); + // pbf_move_left_joystick(context, 128, 0, 800, 100); + // pbf_move_left_joystick(context, 255, 0, 500, 100); + + // // now aligned to the wall next to the hole/passage + + + }); + +} + +void checkpoint_56( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + + }); + +} + +void checkpoint_57( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + + }); + +} + +void checkpoint_58( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + + }); + +} + +void checkpoint_59( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + + }); + +} + +void checkpoint_60( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + + }); + +} + + + + } } 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 54ff1408b2..148dc778dc 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h @@ -27,6 +27,62 @@ class AutoStory_Segment_24 : public AutoStory_Segment{ }; +// start: At East Province (Area Three) Watchtower. +// end: +void checkpoint_55( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + +// start: +// end: +void checkpoint_56( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + +// start: +// end: +void checkpoint_57( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + +// start: +// end: +void checkpoint_58( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + +// start: +// end: +void checkpoint_59( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + +// start: +// end: +void checkpoint_60( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + EventNotificationOption& notif_status_update, + AutoStoryStats& stats +); + + + } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp new file mode 100644 index 0000000000..96089c204d --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_25.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_25::name() const{ + return ""; +} + +std::string AutoStory_Segment_25::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_25::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_25::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h new file mode 100644 index 0000000000..b462ad20a7 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_25_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_25_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_25 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp new file mode 100644 index 0000000000..e66e8b1aeb --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_26.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_26::name() const{ + return ""; +} + +std::string AutoStory_Segment_26::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_26::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_26::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h new file mode 100644 index 0000000000..064c022c50 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_26_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_26_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_26 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp new file mode 100644 index 0000000000..1ee9b81888 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_27.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_27::name() const{ + return ""; +} + +std::string AutoStory_Segment_27::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_27::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_27::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h new file mode 100644 index 0000000000..199d070db5 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_27_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_27_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_27 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp new file mode 100644 index 0000000000..0aa0694f3b --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_28.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_28::name() const{ + return ""; +} + +std::string AutoStory_Segment_28::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_28::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_28::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h new file mode 100644 index 0000000000..ac23705b7b --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_28_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_28_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_28 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp new file mode 100644 index 0000000000..289ae6ea7e --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp @@ -0,0 +1,66 @@ +/* AutoStory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#include "CommonFramework/Exceptions/OperationFailedException.h" +#include "CommonTools/Async/InferenceRoutines.h" +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" +#include "PokemonSV/Programs/PokemonSV_GameEntry.h" +#include "PokemonSV/Programs/PokemonSV_SaveGame.h" +#include "PokemonSV/Programs/PokemonSV_MenuNavigation.h" +#include "PokemonSV/Programs/PokemonSV_WorldNavigation.h" +#include "PokemonSV_AutoStoryTools.h" +#include "PokemonSV_AutoStory_Segment_29.h" + +//#include +//using std::cout; +//using std::endl; +//#include +//#include + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + + + + +std::string AutoStory_Segment_29::name() const{ + return ""; +} + +std::string AutoStory_Segment_29::start_text() const{ + return "Start: "; +} + +std::string AutoStory_Segment_29::end_text() const{ + return "End: "; +} + +void AutoStory_Segment_29::run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats +) const{ + + + stats.m_segment++; + env.update_stats(); + context.wait_for_all_requests(); + env.console.log("Start Segment " + name(), COLOR_ORANGE); + + // checkpoint_(env, context, options.notif_status_update, stats); + + context.wait_for_all_requests(); + env.console.log("End Segment " + name(), COLOR_GREEN); + +} + + + +} +} +} diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h new file mode 100644 index 0000000000..f2bb7885d0 --- /dev/null +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h @@ -0,0 +1,35 @@ +/* Autostory + * + * From: https://github.com/PokemonAutomation/ + * + */ + +#ifndef PokemonAutomation_PokemonSV_AutoStory_Segment_29_H +#define PokemonAutomation_PokemonSV_AutoStory_Segment_29_H + +#include "PokemonSV_AutoStoryTools.h" + +namespace PokemonAutomation{ +namespace NintendoSwitch{ +namespace PokemonSV{ + +class AutoStory_Segment_29 : public AutoStory_Segment{ +public: + virtual std::string name() const override; + virtual std::string start_text() const override; + virtual std::string end_text() const override; + virtual void run_segment( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + AutoStoryOptions options, + AutoStoryStats& stats + ) const override; +}; + + + + +} +} +} +#endif