Skip to content

Commit 171c8d1

Browse files
committed
Merge branch 'main' into walk-forward-to-ticks
2 parents 277bff8 + be88c5c commit 171c8d1

File tree

117 files changed

+775
-591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+775
-591
lines changed

SerialPrograms/Source/NintendoSwitch/Programs/NintendoSwitch_GameEntry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ void resume_game_from_home(
250250
bool skip_home_press
251251
){
252252
if (!skip_home_press){
253-
pbf_press_button(context, BUTTON_HOME, 10, 10);
253+
pbf_press_button(context, BUTTON_HOME, 80ms, 80ms);
254254
}
255255
context.wait_for_all_requests();
256256

@@ -276,7 +276,7 @@ void resume_game_from_home(
276276
HomeMenuWatcher home_detector(console);
277277
if (home_detector.detect(console.video().snapshot())){
278278
console.log("Failed to re-enter game. Trying again...", COLOR_RED);
279-
pbf_press_button(context, BUTTON_HOME, 10, 10);
279+
pbf_press_button(context, BUTTON_HOME, 80ms, 80ms);
280280
continue;
281281
}else{
282282
break;

SerialPrograms/Source/PokemonBDSP/Programs/Eggs/PokemonBDSP_EggFetcher.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ void EggFetcher::program(SingleSwitchProgramEnvironment& env, ProControllerConte
9090

9191
// Move to man.
9292
pbf_move_left_joystick(context, {-1, -1}, 240ms, 0ms);
93-
pbf_move_left_joystick(context, 128, 0, 35, 0);
94-
pbf_move_left_joystick(context, 255, 128, 60, 0);
93+
pbf_move_left_joystick(context, 128, 0, 280ms, 0ms);
94+
pbf_move_left_joystick(context, 255, 128, 480ms, 0ms);
9595

9696
// Fetch egg.
9797
pbf_mash_button(context, BUTTON_ZL, 600);

SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute210.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ bool MoneyFarmerRoute210::battle(SingleSwitchProgramEnvironment& env, ProControl
122122
int ret = run_until<ProControllerContext>(
123123
env.console, context,
124124
[](ProControllerContext& context){
125-
pbf_press_button(context, BUTTON_ZL, 10, 10);
125+
pbf_press_button(context, BUTTON_ZL, 80ms, 80ms);
126126
for (size_t c = 0; c < 17; c++){
127127
pbf_press_dpad(context, DPAD_UP, 5, 10);
128-
pbf_press_button(context, BUTTON_ZL, 10, 10);
128+
pbf_press_button(context, BUTTON_ZL, 80ms, 80ms);
129129
pbf_press_dpad(context, DPAD_RIGHT, 20, 10);
130-
pbf_press_button(context, BUTTON_ZL, 10, 10);
130+
pbf_press_button(context, BUTTON_ZL, 80ms, 80ms);
131131
}
132132
},
133133
{{detector}}
@@ -184,7 +184,7 @@ bool MoneyFarmerRoute210::battle(SingleSwitchProgramEnvironment& env, ProControl
184184
}
185185

186186
for (uint8_t move_slot = 0; move_slot < slot; move_slot++){
187-
pbf_press_dpad(context, DPAD_DOWN, 10, 50);
187+
pbf_press_dpad(context, DPAD_DOWN, 80ms, 400ms);
188188
}
189189
pbf_press_button(context, BUTTON_ZL, 10, 125);
190190
pbf_press_button(context, BUTTON_ZL, 10, 375);
@@ -208,7 +208,7 @@ bool MoneyFarmerRoute210::battle(SingleSwitchProgramEnvironment& env, ProControl
208208
}
209209

210210
for (uint8_t move_slot = 0; move_slot < slot; move_slot++){
211-
pbf_press_dpad(context, DPAD_DOWN, 10, 50);
211+
pbf_press_dpad(context, DPAD_DOWN, 80ms, 400ms);
212212
}
213213
pbf_press_button(context, BUTTON_ZL, 10, 125);
214214
pbf_press_button(context, BUTTON_ZL, 10, 375);
@@ -256,7 +256,7 @@ void MoneyFarmerRoute210::heal_at_center_and_return(
256256

257257
logger.log("Returning to trainers...");
258258
pbf_move_left_joystick(context, {0, -1}, 6000ms, 0ms);
259-
pbf_move_left_joystick(context, 255, 128, 60, 0);
259+
pbf_move_left_joystick(context, 255, 128, 480ms, 0ms);
260260
pbf_move_left_joystick(context, 128, 0, 200, 0);
261261
pbf_move_left_joystick(context, 255, 128, 750, 0);
262262

SerialPrograms/Source/PokemonBDSP/Programs/Farming/PokemonBDSP_MoneyFarmerRoute212.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ bool MoneyFarmerRoute212::battle(SingleSwitchProgramEnvironment& env, ProControl
165165
}
166166

167167
for (uint8_t move_slot = 0; move_slot < slot; move_slot++){
168-
pbf_press_dpad(context, DPAD_DOWN, 10, 50);
168+
pbf_press_dpad(context, DPAD_DOWN, 80ms, 400ms);
169169
}
170170
pbf_mash_button(context, BUTTON_ZL, 250);
171171
pp[slot]--;

SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_GameNavigation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void box_to_overworld(ProControllerContext& context){
5353
// In state (2): The 1st B will drop the party pokemon. The 2nd B will
5454
// back out of the box.
5555

56-
pbf_press_button(context, BUTTON_B, 20, 30);
56+
pbf_press_button(context, BUTTON_B, 160ms, 240ms);
5757
pbf_press_button(context, BUTTON_B, 160ms, GameSettings::instance().BOX_TO_POKEMON_DELAY0);
5858

5959
pbf_press_button(context, BUTTON_B, 160ms, GameSettings::instance().POKEMON_TO_MENU_DELAY0);
@@ -131,7 +131,7 @@ void box_to_overworld(VideoStream& stream, ProControllerContext& context){
131131
// be swallowed by the animation.
132132
// In state (2): The 1st B will drop the party pokemon. The 2nd B will
133133
// back out of the box.
134-
pbf_press_button(context, BUTTON_B, 20, 30);
134+
pbf_press_button(context, BUTTON_B, 160ms, 240ms);
135135
pbf_press_button(context, BUTTON_B, 160ms, GameSettings::instance().BOX_TO_POKEMON_DELAY0);
136136

137137
// To menu.

SerialPrograms/Source/PokemonBDSP/Programs/ShinyHunting/PokemonBDSP_StarterReset.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void StarterReset::program(SingleSwitchProgramEnvironment& env, ProControllerCon
175175
}
176176

177177
// Select starter.
178-
pbf_press_button(context, BUTTON_ZL, 20, 30);
178+
pbf_press_button(context, BUTTON_ZL, 160ms, 240ms);
179179
context.wait_for_all_requests();
180180

181181
{
@@ -191,7 +191,7 @@ void StarterReset::program(SingleSwitchProgramEnvironment& env, ProControllerCon
191191
consecutive_failures++;
192192
}
193193
pbf_wait(context, 50);
194-
pbf_press_dpad(context, DPAD_UP, 10, 50);
194+
pbf_press_dpad(context, DPAD_UP, 80ms, 400ms);
195195
pbf_press_button(context, BUTTON_ZL, 80ms, 5000ms);
196196
context.wait_for_all_requests();
197197
}

SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_LeapGrinder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ void LeapGrinder::program(SingleSwitchProgramEnvironment& env, ProControllerCont
317317
pbf_press_button(context, BUTTON_HOME, 160ms, GameSettings::instance().GAME_TO_HOME_DELAY0);
318318
fresh_from_reset = reset_game_from_home(env, env.console, context);
319319
// Switch from items to pokemons
320-
pbf_press_button(context, BUTTON_X, 20, 30);
320+
pbf_press_button(context, BUTTON_X, 160ms, 240ms);
321321
}
322322
}
323323

SerialPrograms/Source/PokemonLA/Programs/Farming/PokemonLA_TenacityCandyFarmer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ bool TenacityCandyFarmer::run_iteration(SingleSwitchProgramEnvironment& env, Pro
105105
// Press A to show battle type selection menu box
106106
pbf_press_button(context, BUTTON_A, 160ms, 400ms);
107107
// Move down the menu box to select Path of Tenacity
108-
pbf_press_dpad(context, DPAD_DOWN, 10, 50);
108+
pbf_press_dpad(context, DPAD_DOWN, 80ms, 400ms);
109109
// Press A to select Path of Tenacity
110110
pbf_press_button(context, BUTTON_A, 20, 200);
111111

@@ -135,8 +135,8 @@ bool TenacityCandyFarmer::run_iteration(SingleSwitchProgramEnvironment& env, Pro
135135
}
136136
}
137137
// Move down the menu box to select Pearl Clan
138-
pbf_press_dpad(context, DPAD_DOWN, 10, 50);
139-
pbf_press_dpad(context, DPAD_DOWN, 10, 50);
138+
pbf_press_dpad(context, DPAD_DOWN, 80ms, 400ms);
139+
pbf_press_dpad(context, DPAD_DOWN, 80ms, 400ms);
140140
// Select Pearl Plan to start Path of Tenacity
141141
pbf_mash_button(context, BUTTON_A, 200);
142142
context.wait_for_all_requests();

SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_OutbreakFinder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ std::vector<std::string> OutbreakFinder::run_iteration(
458458
inside_travel_map = false;
459459
pbf_press_button(context, BUTTON_B, 400ms, 400ms);
460460
// Leave the guard.
461-
pbf_move_left_joystick(context, 128, 0, 100, 50);
461+
pbf_move_left_joystick(context, 128, 0, 800ms, 400ms);
462462
// Checking MMO costs Aguav Berries.
463463
// To not waste them, save here so that we can reset to get berries back.
464464
save_game_from_overworld(env, env.console, context);

SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_SkipToFullMoon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void SkipToFullMoon::program(SingleSwitchProgramEnvironment& env, ProControllerC
8181
pbf_press_button(context, BUTTON_A, 10, 30);
8282
// Move the selection to "Until nightfall"
8383
pbf_press_dpad(context, DPAD_UP, 10, 30);
84-
pbf_press_dpad(context, DPAD_UP, 10, 50);
84+
pbf_press_dpad(context, DPAD_UP, 80ms, 400ms);
8585

8686
// Press A to sleep to next night
8787
pbf_press_button(context, BUTTON_A, 160ms, 400ms);

0 commit comments

Comments
 (0)