99#include " CommonFramework/VideoPipeline/VideoFeed.h"
1010#include " CommonTools/Async/InferenceRoutines.h"
1111#include " NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h"
12+ #include " NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h"
1213#include " NintendoSwitch/NintendoSwitch_Settings.h"
1314#include " Pokemon/Pokemon_Strings.h"
1415#include " PokemonSwSh/PokemonSwSh_Settings.h"
@@ -31,7 +32,8 @@ StatsResetCalyrex_Descriptor::StatsResetCalyrex_Descriptor()
3132 " Repeatedly catch calyrex (and its horse) until you get the stats you want." ,
3233 FeedbackType::REQUIRED,
3334 AllowCommandsWhenRunning::DISABLE_COMMANDS,
34- {SerialPABotBase::OLD_NINTENDO_SWITCH_DEFAULT_REQUIREMENTS}
35+ {ControllerFeature::NintendoSwitch_ProController},
36+ FasterIfTickPrecise::NOT_FASTER
3537 )
3638{}
3739struct StatsResetCalyrex_Descriptor ::Stats : public StatsTracker{
@@ -162,18 +164,18 @@ void StatsResetCalyrex::program(SingleSwitchProgramEnvironment& env, ProControll
162164 env.console , context,
163165 [](ProControllerContext& context){
164166 while (true ){
165- pbf_press_button (context, BUTTON_A, 10 , 1 * TICKS_PER_SECOND );
167+ pbf_press_button (context, BUTTON_A, 80ms, 1000ms );
166168 }
167169 },
168170 {{fight_detector}}
169171 );
170172 if (result == 0 ){
171173 env.log (" New fight detected, let's begin to throw balls." , COLOR_PURPLE);
172- pbf_mash_button (context, BUTTON_B, 1 * TICKS_PER_SECOND );
174+ pbf_mash_button (context, BUTTON_B, 1000ms );
173175 }
174176 }
175177
176- pbf_mash_button (context, BUTTON_B, 1 * TICKS_PER_SECOND );
178+ pbf_mash_button (context, BUTTON_B, 1000ms );
177179 CatchResults result = basic_catcher (env.console , context, LANGUAGE, BALL_SELECT.slug (), 999 );
178180 switch (result.result ){
179181 case CatchResult::POKEMON_CAUGHT:
@@ -211,7 +213,7 @@ void StatsResetCalyrex::program(SingleSwitchProgramEnvironment& env, ProControll
211213 }
212214
213215 if (!calyrex_caught){
214- pbf_press_button (context, BUTTON_HOME, 160ms, GameSettings::instance ().GAME_TO_HOME_DELAY_SAFE0 );
216+ ssf_press_button (context, BUTTON_HOME, GameSettings::instance ().GAME_TO_HOME_DELAY_SAFE0 , 160ms );
215217 reset_game_from_home_with_inference (
216218 env.console , context,
217219 ConsoleSettings::instance ().TOLERATE_SYSTEM_UPDATE_MENU_FAST
@@ -221,32 +223,32 @@ void StatsResetCalyrex::program(SingleSwitchProgramEnvironment& env, ProControll
221223
222224 env.log (" Unfuse calyrex." , COLOR_PURPLE);
223225 for (int i = 0 ; i < 40 ; i++){
224- pbf_press_button (context, BUTTON_A, 10 , 1 * TICKS_PER_SECOND );
226+ pbf_press_button (context, BUTTON_A, 80ms, 1000ms );
225227 }
226- pbf_press_button (context, BUTTON_X , 10 , ( uint16_t )( 1.5 * TICKS_PER_SECOND) );
227- pbf_press_dpad (context, DPAD_RIGHT, 10 , ( uint16_t )( 0.5 * TICKS_PER_SECOND) );
228- pbf_press_dpad (context, DPAD_RIGHT, 10 , ( uint16_t )( 0.5 * TICKS_PER_SECOND) );
229- pbf_press_button (context, BUTTON_A , 10 , 2 * TICKS_PER_SECOND );
230- pbf_press_dpad (context, DPAD_LEFT , 10 , ( uint16_t )( 0.5 * TICKS_PER_SECOND) );
231- pbf_press_dpad (context, DPAD_UP , 10 , ( uint16_t )( 0.5 * TICKS_PER_SECOND) );
232- pbf_press_button (context, BUTTON_A , 10 , 2 * TICKS_PER_SECOND );
233- pbf_press_button (context, BUTTON_A , 10 , 2 * TICKS_PER_SECOND );
234- pbf_press_dpad (context, DPAD_UP , 10 , 2 * TICKS_PER_SECOND );
235- pbf_press_button (context, BUTTON_A , 10 , 2 * TICKS_PER_SECOND );
236- pbf_press_button (context, BUTTON_A , 10 , 2 * TICKS_PER_SECOND );
228+ pbf_press_button (context, BUTTON_X , 80ms, 1500ms );
229+ pbf_press_dpad (context, DPAD_RIGHT, 80ms, 500ms );
230+ pbf_press_dpad (context, DPAD_RIGHT, 80ms, 500ms );
231+ pbf_press_button (context, BUTTON_A , 80ms, 2000ms );
232+ pbf_press_dpad (context, DPAD_LEFT , 80ms, 500ms );
233+ pbf_press_dpad (context, DPAD_UP , 80ms, 500ms );
234+ pbf_press_button (context, BUTTON_A , 80ms, 2000ms );
235+ pbf_press_button (context, BUTTON_A , 80ms, 2000ms );
236+ pbf_press_dpad (context, DPAD_UP , 80ms, 2000ms );
237+ pbf_press_button (context, BUTTON_A , 80ms, 2000ms );
238+ pbf_press_button (context, BUTTON_A , 80ms, 2000ms );
237239 context.wait_for_all_requests ();
238240
239241 env.log (" Check the stats." , COLOR_PURPLE);
240242 for (int i = 0 ; i < 10 ; i++){
241- pbf_press_button (context, BUTTON_B, 10 , 1 * TICKS_PER_SECOND );
243+ pbf_press_button (context, BUTTON_B, 80ms, 1000ms );
242244 }
243- pbf_press_button (context, BUTTON_X , 10 , 2 * TICKS_PER_SECOND );
244- pbf_press_dpad (context, DPAD_LEFT, 10 , ( uint16_t )( 0.5 * TICKS_PER_SECOND) );
245- pbf_press_button (context, BUTTON_A , 10 , 2 * TICKS_PER_SECOND );
246- pbf_press_button (context, BUTTON_R , 10 , 3 * TICKS_PER_SECOND );
247- pbf_press_dpad (context, DPAD_LEFT, 10 , 1 * TICKS_PER_SECOND );
248- pbf_press_dpad (context, DPAD_UP , 10 , 1 * TICKS_PER_SECOND );
249- pbf_press_dpad (context, DPAD_UP , 10 , 1 * TICKS_PER_SECOND );
245+ pbf_press_button (context, BUTTON_X , 80ms, 2000ms );
246+ pbf_press_dpad (context, DPAD_LEFT, 80ms, 500ms );
247+ pbf_press_button (context, BUTTON_A , 80ms, 2000ms );
248+ pbf_press_button (context, BUTTON_R , 80ms, 3000ms );
249+ pbf_press_dpad (context, DPAD_LEFT, 80ms, 1000ms );
250+ pbf_press_dpad (context, DPAD_UP , 80ms, 1000ms );
251+ pbf_press_dpad (context, DPAD_UP , 80ms, 1000ms );
250252
251253 if (CHECK_HORSE_STATS){
252254 context.wait_for_all_requests ();
@@ -264,7 +266,7 @@ void StatsResetCalyrex::program(SingleSwitchProgramEnvironment& env, ProControll
264266 }
265267 }
266268 if (CHECK_CALYREX_STATS){
267- pbf_press_dpad (context, DPAD_UP, 10 , 1 * TICKS_PER_SECOND );
269+ pbf_press_dpad (context, DPAD_UP, 80ms, 1000ms );
268270 context.wait_for_all_requests ();
269271
270272 IvJudgeReaderScope reader (env.console , LANGUAGE);
@@ -281,7 +283,7 @@ void StatsResetCalyrex::program(SingleSwitchProgramEnvironment& env, ProControll
281283 }
282284 }
283285 if (!match_found){
284- pbf_press_button (context, BUTTON_HOME, 160ms, GameSettings::instance ().GAME_TO_HOME_DELAY_SAFE0 );
286+ ssf_press_button (context, BUTTON_HOME, GameSettings::instance ().GAME_TO_HOME_DELAY_SAFE0 , 160ms );
285287 reset_game_from_home_with_inference (
286288 env.console , context,
287289 ConsoleSettings::instance ().TOLERATE_SYSTEM_UPDATE_MENU_FAST
0 commit comments