Skip to content

Commit 5e8eb31

Browse files
committed
shuttle run: implement route for alpha pidgeot
1 parent f7d20f9 commit 5e8eb31

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

SerialPrograms/Source/PokemonLZA/PokemonLZA_Panels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
8686
ret.emplace_back(make_single_switch_program<ShinyHunt_WildZoneCafe_Descriptor, ShinyHunt_WildZoneCafe>());
8787
ret.emplace_back(make_single_switch_program<ShinyHunt_FlySpotReset_Descriptor, ShinyHunt_FlySpotReset>());
8888
if (IS_BETA_VERSION){
89+
ret.emplace_back(make_single_switch_program<ShinyHunt_ShuttleRun_Descriptor, ShinyHunt_ShuttleRun>());
8990
}
9091
if (PreloadSettings::instance().DEVELOPER_MODE){
9192
ret.emplace_back(make_single_switch_program<BeldumHunter_Descriptor, BeldumHunter>());
92-
ret.emplace_back(make_single_switch_program<ShinyHunt_ShuttleRun_Descriptor, ShinyHunt_ShuttleRun>());
9393
ret.emplace_back(make_single_switch_program<ShinyHunt_SewerHunter_Descriptor, ShinyHunt_SewerHunter>());
9494
}
9595

SerialPrograms/Source/PokemonLZA/Programs/ShinyHunting/PokemonLZA_ShuttleRun.cpp

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#include "Common/Cpp/PrettyPrint.h"
1111
#include "CommonFramework/VideoPipeline/VideoOverlay.h"
1212
#include "CommonTools/Async/InferenceRoutines.h"
13-
// #include "CommonTools/VisualDetectors/BlackScreenDetector.h"
13+
#include "CommonTools/VisualDetectors/BlackScreenDetector.h"
1414
#include "NintendoSwitch/Programs/NintendoSwitch_GameEntry.h"
1515
#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h"
16-
// #include "NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h"
16+
#include "NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h"
1717
#include "Pokemon/Pokemon_Strings.h"
1818
#include "PokemonLA/Inference/Sounds/PokemonLA_ShinySoundDetector.h"
1919
#include "PokemonLZA/Programs/PokemonLZA_BasicNavigation.h"
@@ -87,7 +87,42 @@ namespace {
8787

8888

8989
void route_alpha_pidgeot(SingleSwitchProgramEnvironment& env, ProControllerContext& context){
90-
//TODO
90+
int ret = -1;
91+
{
92+
BlackScreenOverWatcher black_screen(COLOR_BLUE);
93+
ret = run_until<ProControllerContext>(
94+
env.console, context,
95+
[](ProControllerContext& context){
96+
ssf_press_button(context, BUTTON_B, 0ms, 500ms, 0ms);
97+
pbf_move_left_joystick(context, 128, 0, 4000ms, 0ms);
98+
pbf_move_left_joystick(context, 128, 255, 4500ms, 0ms);
99+
pbf_wait(context, 500ms);
100+
},
101+
{black_screen}
102+
);
103+
}
104+
if (ret == 0){
105+
wait_until_overworld(env.console, context, 50s);
106+
open_map(env.console, context, false);
107+
pbf_move_left_joystick(context, 148, 108, 100ms, 200ms);
108+
if (fly_from_map(env.console, context) == FastTravelState::NOT_AT_FLY_SPOT) {
109+
OperationFailedException::fire(
110+
ErrorReport::SEND_ERROR_REPORT,
111+
"fly_from_map(): Unable to fast travel",
112+
env.console);
113+
}
114+
wait_until_overworld(env.console, context);
115+
ssf_press_button(context, BUTTON_B, 0ms, 500ms, 0ms);
116+
pbf_move_left_joystick(context, 255, 128, 800ms, 0ms);
117+
pbf_move_left_joystick(context, 128, 0, 4400ms, 0ms);
118+
pbf_move_left_joystick(context, 0, 128, 300ms, 0ms);
119+
pbf_press_button(context, BUTTON_A, 500ms, 2500ms); // elevator up
120+
ssf_press_button(context, BUTTON_B, 0ms, 500ms, 0ms);
121+
pbf_move_left_joystick(context, 128, 0, 900ms, 0ms);
122+
pbf_move_left_joystick(context, 0, 128, 2000ms, 0ms);
123+
pbf_move_left_joystick(context, 255, 128, 200ms, 200ms);
124+
pbf_press_button(context, BUTTON_L, 100ms, 200ms);
125+
}
91126
}
92127

93128
void route_wild_zone_3_tower(SingleSwitchProgramEnvironment& env, ProControllerContext& context){

0 commit comments

Comments
 (0)