Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing an issue with BDSP sweet scent #522

Merged
merged 2 commits into from
Dec 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ bool OverworldTrigger::find_encounter(ConsoleHandle& console, BotBaseContext& co
if (location >= 1 && location <= 3){
const size_t move_down_times = location;
for(size_t i = 0; i < move_down_times; ++i){
pbf_press_dpad(context, DPAD_DOWN, 1, change_pokemon_delay);
pbf_press_dpad(context, DPAD_DOWN, 20, change_pokemon_delay);
}
}else if (location >= 1){ // for location 4 and 5
const size_t move_down_times = 6 - location;
for (size_t i = 0; i < move_down_times; ++i){
pbf_press_dpad(context, DPAD_UP, 1, change_pokemon_delay);
pbf_press_dpad(context, DPAD_UP, 20, change_pokemon_delay);
}
}

Expand All @@ -147,7 +147,7 @@ bool OverworldTrigger::find_encounter(ConsoleHandle& console, BotBaseContext& co
pbf_press_button(context, BUTTON_ZL, 20, pokemon_to_pokemon_menu_delay);
// Move down one menuitem to select "Sweet Scent"
const uint16_t move_pokemon_menu_item_delay = 30;
pbf_press_dpad(context, DPAD_DOWN, 1, move_pokemon_menu_item_delay);
pbf_press_dpad(context, DPAD_DOWN, 20, move_pokemon_menu_item_delay);
// Use sweet scent
pbf_mash_button(context, BUTTON_ZL, 30);

Expand Down