|
9 | 9 | #include "CommonFramework/Notifications/ProgramNotifications.h" |
10 | 10 | #include "CommonFramework/VideoPipeline/VideoOverlay.h" |
11 | 11 | #include "CommonTools/Async/InferenceRoutines.h" |
| 12 | +#include "CommonTools/VisualDetectors/BlackScreenDetector.h" |
12 | 13 | #include "CommonTools/StartupChecks/VideoResolutionCheck.h" |
13 | 14 | #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" |
| 15 | +#include "NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h" |
14 | 16 | #include "Pokemon/Pokemon_Strings.h" |
15 | 17 | #include "PokemonLA/Inference/Sounds/PokemonLA_ShinySoundDetector.h" |
16 | 18 | #include "PokemonLZA/Programs/PokemonLZA_BasicNavigation.h" |
@@ -62,7 +64,7 @@ ShinyHunt_FlySpotReset::ShinyHunt_FlySpotReset() |
62 | 64 | { |
63 | 65 | {Route::NO_MOVEMENT, "no_movement", "No Movement"}, |
64 | 66 | {Route::WILD_ZONE_19, "wild_zone_19", "Wild Zone 19"}, |
65 | | - // {Route::ALPHA_PIDGEY, "alpha_pidgey", "Alpha Pidgey (Wild Zone 1)"}, |
| 67 | + {Route::ALPHA_PIDGEY, "alpha_pidgey", "Alpha Pidgey (Wild Zone 1)"}, |
66 | 68 | // {Route::ALPHA_PIKACHU, "alpha_pikachu", "Alpha Pikachu (Wild Zone 6)"}, |
67 | 69 | // {Route::CUSTOMISED_MACRO, "customised_macro", "Customised Macro"}, |
68 | 70 | }, |
@@ -141,6 +143,40 @@ void route_wild_zone_19( |
141 | 143 | wait_until_overworld(env.console, context, 50s); |
142 | 144 | } |
143 | 145 |
|
| 146 | +void route_alpha_pidgey( |
| 147 | + SingleSwitchProgramEnvironment& env, |
| 148 | + ProControllerContext& context, |
| 149 | + ShinyHunt_FlySpotReset_Descriptor::Stats& stats, |
| 150 | + bool to_zoom_to_max){ |
| 151 | + int ret = -1; |
| 152 | + { |
| 153 | + BlackScreenOverWatcher black_screen(COLOR_BLUE); |
| 154 | + ret = run_until<ProControllerContext>( |
| 155 | + env.console, context, |
| 156 | + [&](ProControllerContext& context){ |
| 157 | + ssf_press_button(context, BUTTON_B, 0ms, 500ms, 0ms); |
| 158 | + pbf_move_left_joystick(context, 255, 128, 4000ms, 0ms); |
| 159 | + pbf_move_left_joystick(context, 128, 255, 7400ms, 0ms); |
| 160 | + pbf_move_left_joystick(context, 0, 128, 3000ms, 0ms); |
| 161 | + pbf_press_button(context, BUTTON_A, 500ms, 2500ms); // elevator up |
| 162 | + pbf_move_left_joystick(context, 255, 128, 100ms, 0ms); |
| 163 | + pbf_press_button(context, BUTTON_L, 100ms, 1000ms); |
| 164 | + }, |
| 165 | + {black_screen} |
| 166 | + ); |
| 167 | + } |
| 168 | + if (ret == 0){ |
| 169 | + wait_until_overworld(env.console, context, 50s); |
| 170 | + } |
| 171 | + open_map(env.console, context, false); |
| 172 | + pbf_move_left_joystick(context, 128, 255, 200ms, 100ms); |
| 173 | + if (fly_from_map(env.console, context) == FastTravelState::NOT_AT_FLY_SPOT) { |
| 174 | + pbf_move_left_joystick(context, 255, 128, 100ms, 100ms); |
| 175 | + fly_from_map(env.console, context); |
| 176 | + } |
| 177 | + wait_until_overworld(env.console, context); |
| 178 | +} |
| 179 | + |
144 | 180 | } // namespace |
145 | 181 |
|
146 | 182 | void ShinyHunt_FlySpotReset::program(SingleSwitchProgramEnvironment& env, ProControllerContext& context){ |
@@ -174,6 +210,9 @@ void ShinyHunt_FlySpotReset::program(SingleSwitchProgramEnvironment& env, ProCon |
174 | 210 | case Route::WILD_ZONE_19: |
175 | 211 | route = route_wild_zone_19; |
176 | 212 | break; |
| 213 | + case Route::ALPHA_PIDGEY: |
| 214 | + route = route_alpha_pidgey; |
| 215 | + break; |
177 | 216 | default: |
178 | 217 | OperationFailedException::fire( |
179 | 218 | ErrorReport::SEND_ERROR_REPORT, |
|
0 commit comments