From 358130fde6f3d2273b8bc4e9c068aa4f58d7e097 Mon Sep 17 00:00:00 2001 From: jw098 Date: Mon, 13 Oct 2025 23:13:07 -0700 Subject: [PATCH 1/5] update descriptions of checkectpoin 76 and 77 --- .../Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 c4dc56ca3f..f938cb1555 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h @@ -32,12 +32,12 @@ class AutoStory_Segment_30 : public AutoStory_Segment{ // end: Battled Nemona. Spoke to Glaseado Gym receptionist void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); -// start: Spoke to Glaseado Gym receptionist. Beat Glaseado Gym Challenge -// end: Beat Glaseado Gym (Ice). +// 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); -// start: Spoke to Glaseado Gym receptionist. Beat Glaseado Gym Challenge -// end: Beat Glaseado Gym (Ice). At North Province Area One Pokecenter +// 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); From e5c56101ac986b28c5f735e29037a6415f321d30 Mon Sep 17 00:00:00 2001 From: jw098 Date: Mon, 13 Oct 2025 23:28:12 -0700 Subject: [PATCH 2/5] move routines related to Team Star Fighting from autostorytools to Segment 31 --- .../AutoStory/PokemonSV_AutoStoryTools.cpp | 454 ----------------- .../AutoStory/PokemonSV_AutoStoryTools.h | 9 - .../PokemonSV_AutoStory_Segment_31.cpp | 463 +++++++++++++++++- .../PokemonSV_AutoStory_Segment_31.h | 19 +- 4 files changed, 474 insertions(+), 471 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp index 6283d52726..9754bedc72 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp @@ -1202,460 +1202,6 @@ void checkpoint_reattempt_loop_tutorial( - -void move_from_north_province_area_one_to_fighting_base(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ - DirectionDetector direction; - do_action_and_monitor_for_battles(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - - direction.change_direction(env.program_info(), env.console, context, 1.798578); - pbf_move_left_joystick(context, 128, 0, 200, 50); - - - }); - - // marker 1 {0.825, 0.361111} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 255, 255, 30}, - FlyPoint::POKECENTER, - {0.825, 0.361111} - ); - 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 2 {0.839062, 0.267593} {0.834896, 0.267593} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.834896, 0.267593} - ); - 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 3 {0.764583, 0.244444} (0.775000, 0.250000). - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.775000, 0.250000} - ); - 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 4 {0.604167, 0.326852} {0.597396, 0.32037} {0.600521, 0.325} {0.589583, 0.319444} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_OUT, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.597396, 0.32037} - ); - 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, 255, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - // marker 5 enter bamboo forest keep zoom{0.679688, 0.19537} zoom out {0.571875, 0.360185} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_OUT, 0, 0, 0}, - FlyPoint::POKECENTER, - {0.571875, 0.360185} - ); - 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 6 {0.668229, 0.336111} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::KEEP_ZOOM, 128, 0, 20}, - FlyPoint::POKECENTER, - {0.668229, 0.336111} - ); - 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 7 {0.496354, 0.20463} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_IN, 255, 100, 80}, - FlyPoint::POKECENTER, - {0.496354, 0.20463} - ); - 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, 255, 255, 40, 50); - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); - } - ); - - // marker 8 {0.428125, 0.483333} - place_marker_offset_from_flypoint(env.program_info(), env.console, context, - {ZoomChange::ZOOM_IN, 255, 0, 50}, - FlyPoint::POKECENTER, - {0.428125, 0.483333} - ); - 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, 30, 30, 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); - } - ); - - // speak to Clavell at Fighting base - mash_button_till_overworld(env.console, context, BUTTON_A, 360); - - -} - - -void beat_team_star_fighting1(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ - - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 255, 220, 50); - - 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, 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); - } - ); - - clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::PROMPT_DIALOG, CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW}); - env.console.log("Battle team star grunt."); - run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG); - mash_button_till_overworld(env.console, context, BUTTON_A); - - - - -} - -void beat_team_star_fighting2(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ - context.wait_for_all_requests(); - do_action_and_monitor_for_battles(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 220, 255, 50); - walk_forward_while_clear_front_path(env.program_info(), env.console, context, 100); - walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A); - } - ); - clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG}); - - - AdvanceDialogWatcher dialog(COLOR_RED); - int ret = run_until( - env.console, context, - [&](ProControllerContext& context){ - - DirectionDetector direction; - uint16_t seconds_wait = 3; - - direction.change_direction(env.program_info(), env.console, context, 3.837821); - pbf_move_left_joystick(context, 128, 0, 400, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 3.577868); - pbf_move_left_joystick(context, 128, 0, 500, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 500, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 200, 50); - - direction.change_direction(env.program_info(), env.console, context, 4.103129); - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 300, 50); - - direction.change_direction(env.program_info(), env.console, context, 3.316950); - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - - direction.change_direction(env.program_info(), env.console, context, 3.472393); - pbf_move_left_joystick(context, 128, 0, 700, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 3.039084); - pbf_move_left_joystick(context, 128, 0, 400, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - - direction.change_direction(env.program_info(), env.console, context, 3.839029); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 500, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 4.048405); - pbf_move_left_joystick(context, 128, 0, 400, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - - pbf_move_left_joystick(context, 128, 0, 200, 50); - - direction.change_direction(env.program_info(), env.console, context, 4.624776); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 6.035424); - pbf_move_left_joystick(context, 128, 0, 25, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 400, 50); - - direction.change_direction(env.program_info(), env.console, context, 5.620459); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 6.038329); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 6.281440); - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 5.565887); - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 5.515809); - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 0.889223); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - - direction.change_direction(env.program_info(), env.console, context, 2.934897); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 2.617821); - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 2.827481); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 2.883368); - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 2.094273); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 1.619823); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 0.886674); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 600, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 0.468837); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - - - }, - {dialog} - ); - context.wait_for(std::chrono::milliseconds(100)); - if (ret < 0){ - OperationFailedException::fire( - ErrorReport::SEND_ERROR_REPORT, - "checkpoint_48(): Failed to kill 30 pokemon with Let's go.", - env.console - ); - } - clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW}); - env.console.log("Battle the Team Star (Fire) boss."); - run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG); - mash_button_till_overworld(env.console, context, BUTTON_A, 360); - - -} - - -void move_from_fighting_base_to_north_province_area_two(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ - context.wait_for_all_requests(); - - // marker 1. set marker to pokecenter - realign_player_from_landmark( - env.program_info(), env.console, context, - {ZoomChange::ZOOM_IN, 0, 0, 0}, - {ZoomChange::KEEP_ZOOM, 0, 0, 0} - ); - 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 2. set marker past pokecenter - handle_unexpected_battles(env.program_info(), env.console, context, - [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ - realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 0, 60, 50); - }); - overworld_navigation(env.program_info(), env.console, context, - NavigationStopCondition::STOP_TIME, NavigationMovementMode::DIRECTIONAL_ONLY, - 128, 15, 12, 12, false); // can't wrap in handle_when_stationary_in_overworld(), since we expect to be stationary when walking into the pokecenter - - - fly_to_overlapping_flypoint(env.program_info(), env.console, context); - -} - - void move_from_west_province_area_one_north_to_alfornada(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ context.wait_for_all_requests(); DirectionDetector direction; diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h index 7578fec1b2..23ccaa81ba 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h @@ -326,15 +326,6 @@ void checkpoint_reattempt_loop_tutorial( -// moves player from North Province Area One to Team Star Fighting base -void move_from_north_province_area_one_to_fighting_base(SingleSwitchProgramEnvironment& env, ProControllerContext& context); - - -void beat_team_star_fighting1(SingleSwitchProgramEnvironment& env, ProControllerContext& context); - -void beat_team_star_fighting2(SingleSwitchProgramEnvironment& env, ProControllerContext& context); - -void move_from_fighting_base_to_north_province_area_two(SingleSwitchProgramEnvironment& env, ProControllerContext& context); void move_from_west_province_area_one_north_to_alfornada(SingleSwitchProgramEnvironment& env, ProControllerContext& context); 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 018f4bc11c..b5f16b6bb4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp @@ -4,6 +4,9 @@ * */ +#include "PokemonSV/Inference/Dialogs/PokemonSV_DialogDetector.h" +#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,15 +31,15 @@ namespace PokemonSV{ std::string AutoStory_Segment_31::name() const{ - return ""; + return "31: Team Star (Fighting)"; } std::string AutoStory_Segment_31::start_text() const{ - return "Start: "; + return "Start: Beat Glaseado Gym (Ice). At North Province Area One Pokecenter."; } std::string AutoStory_Segment_31::end_text() const{ - return "End: "; + return "End: Beat Team Star (Fighting). At North Province Area Two Pokecenter."; } void AutoStory_Segment_31::run_segment( @@ -76,6 +79,460 @@ void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& co +void move_from_north_province_area_one_to_fighting_base(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ + DirectionDetector direction; + do_action_and_monitor_for_battles(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + + direction.change_direction(env.program_info(), env.console, context, 1.798578); + pbf_move_left_joystick(context, 128, 0, 200, 50); + + + }); + + // marker 1 {0.825, 0.361111} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 255, 255, 30}, + FlyPoint::POKECENTER, + {0.825, 0.361111} + ); + 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 2 {0.839062, 0.267593} {0.834896, 0.267593} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.834896, 0.267593} + ); + 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 3 {0.764583, 0.244444} (0.775000, 0.250000). + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.775000, 0.250000} + ); + 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 4 {0.604167, 0.326852} {0.597396, 0.32037} {0.600521, 0.325} {0.589583, 0.319444} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_OUT, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.597396, 0.32037} + ); + 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, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 5 enter bamboo forest keep zoom{0.679688, 0.19537} zoom out {0.571875, 0.360185} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_OUT, 0, 0, 0}, + FlyPoint::POKECENTER, + {0.571875, 0.360185} + ); + 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 6 {0.668229, 0.336111} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::KEEP_ZOOM, 128, 0, 20}, + FlyPoint::POKECENTER, + {0.668229, 0.336111} + ); + 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 7 {0.496354, 0.20463} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_IN, 255, 100, 80}, + FlyPoint::POKECENTER, + {0.496354, 0.20463} + ); + 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, 255, 255, 40, 50); + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER); + } + ); + + // marker 8 {0.428125, 0.483333} + place_marker_offset_from_flypoint(env.program_info(), env.console, context, + {ZoomChange::ZOOM_IN, 255, 0, 50}, + FlyPoint::POKECENTER, + {0.428125, 0.483333} + ); + 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, 30, 30, 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); + } + ); + + // speak to Clavell at Fighting base + mash_button_till_overworld(env.console, context, BUTTON_A, 360); + + +} + + +void beat_team_star_fighting1(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ + + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 255, 220, 50); + + 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, 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); + } + ); + + clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::PROMPT_DIALOG, CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW}); + env.console.log("Battle team star grunt."); + run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG); + mash_button_till_overworld(env.console, context, BUTTON_A); + + + + +} + +void beat_team_star_fighting2(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ + context.wait_for_all_requests(); + do_action_and_monitor_for_battles(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 220, 255, 50); + walk_forward_while_clear_front_path(env.program_info(), env.console, context, 100); + walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A); + } + ); + clear_dialog(env.console, context, ClearDialogMode::STOP_OVERWORLD, 60, {CallbackEnum::OVERWORLD, CallbackEnum::PROMPT_DIALOG}); + + + AdvanceDialogWatcher dialog(COLOR_RED); + int ret = run_until( + env.console, context, + [&](ProControllerContext& context){ + + DirectionDetector direction; + uint16_t seconds_wait = 3; + + direction.change_direction(env.program_info(), env.console, context, 3.837821); + pbf_move_left_joystick(context, 128, 0, 400, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 3.577868); + pbf_move_left_joystick(context, 128, 0, 500, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 500, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 200, 50); + + direction.change_direction(env.program_info(), env.console, context, 4.103129); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 300, 50); + + direction.change_direction(env.program_info(), env.console, context, 3.316950); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + direction.change_direction(env.program_info(), env.console, context, 3.472393); + pbf_move_left_joystick(context, 128, 0, 700, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 3.039084); + pbf_move_left_joystick(context, 128, 0, 400, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + direction.change_direction(env.program_info(), env.console, context, 3.839029); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 500, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 4.048405); + pbf_move_left_joystick(context, 128, 0, 400, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + pbf_move_left_joystick(context, 128, 0, 200, 50); + + direction.change_direction(env.program_info(), env.console, context, 4.624776); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 6.035424); + pbf_move_left_joystick(context, 128, 0, 25, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 400, 50); + + direction.change_direction(env.program_info(), env.console, context, 5.620459); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 6.038329); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 6.281440); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 5.565887); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 5.515809); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 0.889223); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + direction.change_direction(env.program_info(), env.console, context, 2.934897); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 2.617821); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 2.827481); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 2.883368); + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 2.094273); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 1.619823); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 0.886674); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 600, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + direction.change_direction(env.program_info(), env.console, context, 0.468837); + pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_press_button(context, BUTTON_R, 20, 20); + pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + + + }, + {dialog} + ); + context.wait_for(std::chrono::milliseconds(100)); + if (ret < 0){ + OperationFailedException::fire( + ErrorReport::SEND_ERROR_REPORT, + "checkpoint_48(): Failed to kill 30 pokemon with Let's go.", + env.console + ); + } + clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW}); + env.console.log("Battle the Team Star (Fire) boss."); + run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG); + mash_button_till_overworld(env.console, context, BUTTON_A, 360); + + +} + + +void move_from_fighting_base_to_north_province_area_two(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ + context.wait_for_all_requests(); + + // marker 1. set marker to pokecenter + realign_player_from_landmark( + env.program_info(), env.console, context, + {ZoomChange::ZOOM_IN, 0, 0, 0}, + {ZoomChange::KEEP_ZOOM, 0, 0, 0} + ); + 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 2. set marker past pokecenter + handle_unexpected_battles(env.program_info(), env.console, context, + [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ + realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 0, 60, 50); + }); + overworld_navigation(env.program_info(), env.console, context, + NavigationStopCondition::STOP_TIME, NavigationMovementMode::DIRECTIONAL_ONLY, + 128, 15, 12, 12, false); // can't wrap in handle_when_stationary_in_overworld(), since we expect to be stationary when walking into the pokecenter + + + fly_to_overlapping_flypoint(env.program_info(), env.console, context); + +} + + + } } 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 3ba4c9022b..e6e8d88ca4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h @@ -26,20 +26,29 @@ class AutoStory_Segment_31 : public AutoStory_Segment{ ) const override; }; -// start: -// end: +// start: At North Province Area One Pokecenter. +// end: At Team Star (Fighting) base. Spoke to Clavell. void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); -// start: -// end: +// start: At Team Star (Fighting) base. Spoke to Clavell. +// end: Beat Team Star (Fighting) grunt. At gate of base. void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); -// start: +// start: Beat Team Star (Fighting) grunt. At gate of base. // end: void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +// moves player from North Province Area One to Team Star Fighting base +void move_from_north_province_area_one_to_fighting_base(SingleSwitchProgramEnvironment& env, ProControllerContext& context); + + +void beat_team_star_fighting1(SingleSwitchProgramEnvironment& env, ProControllerContext& context); + +void beat_team_star_fighting2(SingleSwitchProgramEnvironment& env, ProControllerContext& context); + +void move_from_fighting_base_to_north_province_area_two(SingleSwitchProgramEnvironment& env, ProControllerContext& context); } From c0b8ef7f2cd782ebd9806fccef385e036d52f36a Mon Sep 17 00:00:00 2001 From: jw098 Date: Tue, 14 Oct 2025 11:52:21 -0700 Subject: [PATCH 3/5] team star fighting: checkpoint 78-81 --- .../AutoStory/PokemonSV_AutoStory.cpp | 2 +- .../PokemonSV_AutoStory_Segment_31.cpp | 23 +++++++++++++++++-- .../PokemonSV_AutoStory_Segment_31.h | 6 ++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index f26f0344bf..dc123a6da2 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -107,7 +107,7 @@ 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()); 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 b5f16b6bb4..7a138d161d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp @@ -55,7 +55,10 @@ void AutoStory_Segment_31::run_segment( context.wait_for_all_requests(); env.console.log("Start Segment " + name(), COLOR_ORANGE); - // checkpoint_(env, context, options.notif_status_update, stats); + checkpoint_78(env, context, options.notif_status_update, stats); + checkpoint_79(env, context, options.notif_status_update, stats); + checkpoint_80(env, context, options.notif_status_update, stats); + checkpoint_81(env, context, options.notif_status_update, stats); context.wait_for_all_requests(); env.console.log("End Segment " + name(), COLOR_GREEN); @@ -65,16 +68,32 @@ void AutoStory_Segment_31::run_segment( void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ checkpoint_reattempt_loop(env, context, notif_status_update, stats, [&](size_t attempt_number){ - + move_from_north_province_area_one_to_fighting_base(env, context); }); } void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t attempt_number){ + + beat_team_star_fighting1(env, context); + }); } void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ + checkpoint_reattempt_loop(env, context, notif_status_update, stats, + [&](size_t 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, + [&](size_t attempt_number){ + move_from_fighting_base_to_north_province_area_two(env, context); + }); } 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 e6e8d88ca4..fb44cd85a9 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h @@ -36,9 +36,13 @@ void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& co // start: Beat Team Star (Fighting) grunt. At gate of base. -// end: +// end: Beat Team Star (Fighting) void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); +// start: Beat Team Star (Fighting) +// end: At North Province Area Two Pokecenter +void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + // moves player from North Province Area One to Team Star Fighting base void move_from_north_province_area_one_to_fighting_base(SingleSwitchProgramEnvironment& env, ProControllerContext& context); From 5fb4ccdae41bf0bcca1177739ff73c32c7a508ff Mon Sep 17 00:00:00 2001 From: jw098 Date: Tue, 14 Oct 2025 12:07:12 -0700 Subject: [PATCH 4/5] add blank checkpoints --- .../AutoStory/PokemonSV_AutoStory.cpp | 10 +++++ .../PokemonSV_AutoStory_Segment_32.cpp | 27 +++++++++++++ .../PokemonSV_AutoStory_Segment_32.h | 38 +++++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index dc123a6da2..c8b3087655 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -724,6 +724,16 @@ void AutoStory::test_checkpoints( 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_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);}); if (end == 0){ 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 9f13b6abde..526e591ae8 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp @@ -59,6 +59,33 @@ void AutoStory_Segment_32::run_segment( } +void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + +void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats){ +} + } 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 65342a205c..f35d5aef8f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h @@ -27,6 +27,44 @@ class AutoStory_Segment_32 : public AutoStory_Segment{ }; +// start: +// end: +void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + +// start: +// end: +void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats); + + + } From 9e43619b5b8e6cbe9ee86a314b73d08db7b652ab Mon Sep 17 00:00:00 2001 From: jw098 Date: Tue, 14 Oct 2025 20:22:12 -0700 Subject: [PATCH 5/5] update beat_team_star_fighting2() --- .../PokemonSV_AutoStory_Segment_31.cpp | 133 +++++++----------- 1 file changed, 48 insertions(+), 85 deletions(-) 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 7a138d161d..bbafc37b2c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp @@ -313,185 +313,148 @@ void beat_team_star_fighting2(SingleSwitchProgramEnvironment& env, ProController pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_move_left_joystick(context, 128, 0, 100, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + pbf_move_left_joystick(context, 128, 0, 200, 50); + + direction.change_direction(env.program_info(), env.console, context, 3.683419); pbf_move_left_joystick(context, 128, 0, 300, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 3.577868); - pbf_move_left_joystick(context, 128, 0, 500, 50); + pbf_move_left_joystick(context, 128, 0, 400, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + direction.change_direction(env.program_info(), env.console, context, 3.577637); pbf_move_left_joystick(context, 128, 0, 500, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 200, 50); - direction.change_direction(env.program_info(), env.console, context, 4.103129); - pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_move_left_joystick(context, 128, 0, 400, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 300, 50); - - direction.change_direction(env.program_info(), env.console, context, 3.316950); - pbf_move_left_joystick(context, 128, 0, 300, 50); + direction.change_direction(env.program_info(), env.console, context, 4.204571); + pbf_move_left_joystick(context, 128, 0, 200, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + + pbf_move_left_joystick(context, 128, 0, 200, 50); - direction.change_direction(env.program_info(), env.console, context, 3.472393); - pbf_move_left_joystick(context, 128, 0, 700, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 3.039084); - pbf_move_left_joystick(context, 128, 0, 400, 50); + direction.change_direction(env.program_info(), env.console, context, 3.737641); + pbf_move_left_joystick(context, 128, 0, 200, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 3.839029); + direction.change_direction(env.program_info(), env.console, context, 3.368991); pbf_move_left_joystick(context, 128, 0, 200, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 500, 50); + direction.change_direction(env.program_info(), env.console, context, 3.473130); + pbf_move_left_joystick(context, 128, 0, 700, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 4.048405); + direction.change_direction(env.program_info(), env.console, context, 3.213118); pbf_move_left_joystick(context, 128, 0, 400, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 200, 50); - - direction.change_direction(env.program_info(), env.console, context, 4.624776); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - pbf_move_left_joystick(context, 128, 0, 300, 50); + direction.change_direction(env.program_info(), env.console, context, 3.787068); + pbf_move_left_joystick(context, 128, 0, 500, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 6.035424); - pbf_move_left_joystick(context, 128, 0, 25, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 400, 50); - - direction.change_direction(env.program_info(), env.console, context, 5.620459); - pbf_move_left_joystick(context, 128, 0, 200, 50); + direction.change_direction(env.program_info(), env.console, context, 3.997072); + pbf_move_left_joystick(context, 128, 0, 500, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 6.038329); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 300, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 6.281440); - pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_move_left_joystick(context, 128, 0, 200, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 5.565887); - pbf_move_left_joystick(context, 128, 0, 300, 50); + direction.change_direction(env.program_info(), env.console, context, 5.200063); + pbf_move_left_joystick(context, 128, 0, 400, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 5.515809); + direction.change_direction(env.program_info(), env.console, context, 5.883155); pbf_move_left_joystick(context, 128, 0, 300, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 0.889223); - pbf_move_left_joystick(context, 128, 0, 200, 50); + pbf_move_left_joystick(context, 128, 0, 400, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - - direction.change_direction(env.program_info(), env.console, context, 2.934897); - pbf_press_button(context, BUTTON_R, 20, 20); + direction.change_direction(env.program_info(), env.console, context, 6.089752); pbf_move_left_joystick(context, 128, 0, 200, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 2.617821); pbf_move_left_joystick(context, 128, 0, 300, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 2.827481); + direction.change_direction(env.program_info(), env.console, context, 0.369203); pbf_move_left_joystick(context, 128, 0, 200, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 300, 50); + direction.change_direction(env.program_info(), env.console, context, 5.515246); + pbf_move_left_joystick(context, 128, 0, 200, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 2.883368); - pbf_move_left_joystick(context, 128, 0, 300, 50); + pbf_move_left_joystick(context, 128, 0, 400, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 300, 50); + direction.change_direction(env.program_info(), env.console, context, 4.941664); + pbf_move_left_joystick(context, 128, 0, 100, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 200, 50); + direction.change_direction(env.program_info(), env.console, context, 6.140720); + pbf_move_left_joystick(context, 128, 0, 100, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 2.094273); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + direction.change_direction(env.program_info(), env.console, context, 5.096584); + pbf_move_left_joystick(context, 128, 0, 300, 50); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 1.619823); - pbf_move_left_joystick(context, 128, 0, 200, 50); + direction.change_direction(env.program_info(), env.console, context, 5.201017); + pbf_move_left_joystick(context, 128, 0, 1200, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 200, 50); + direction.change_direction(env.program_info(), env.console, context, 0); + pbf_move_left_joystick(context, 128, 0, 00, 50); pbf_press_button(context, BUTTON_R, 20, 20); pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - direction.change_direction(env.program_info(), env.console, context, 0.886674); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + // /////////////// + // direction.change_direction(env.program_info(), env.console, context, 0); + // pbf_move_left_joystick(context, 128, 0, 00, 50); + // pbf_press_button(context, BUTTON_R, 20, 20); + // pbf_wait(context, seconds_wait * TICKS_PER_SECOND); - pbf_move_left_joystick(context, 128, 0, 600, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + - direction.change_direction(env.program_info(), env.console, context, 0.468837); - pbf_move_left_joystick(context, 128, 0, 200, 50); - pbf_press_button(context, BUTTON_R, 20, 20); - pbf_wait(context, seconds_wait * TICKS_PER_SECOND); + pbf_wait(context, 20 * TICKS_PER_SECOND);