Skip to content
Merged
Show file tree
Hide file tree
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 @@ -48,7 +48,7 @@ PartyLevelUpDetector::PartyLevelUpDetector(Color color, PartyLevelUpDialog dialo
, m_border_right_box(0.982692, 0.025923, 0.001923, 0.597115)
, m_dialog_top_box(0.626282, 0.042492, 0.341026, 0.006175) // white
, m_dialog_right_box(0.967949, 0.050923, 0.003846, 0.550962)
, m_plus_box(0.862663, 0.051852, 0.034267, 0.553560)
, m_plus_box(0.862663, 0.051852, 0.017788, 0.553560)
, m_plus_box_jpn(0.895663, 0.051852, 0.021267, 0.553560)
{}
void PartyLevelUpDetector::make_overlays(VideoOverlaySet& items) const{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void WildEncounterReader::make_overlays(VideoOverlaySet& items) const {
PokemonFRLG_WildEncounter WildEncounterReader::read_encounter(
Logger& logger, Language language,
const ImageViewRGB32& frame,
std::set<std::string>& subset,
const std::set<std::string>& subset,
double max_log10p
){
const bool jpn = language == Language::Japanese;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class WildEncounterReader {
PokemonFRLG_WildEncounter read_encounter(
Logger& logger, Language language,
const ImageViewRGB32& frame,
std::set<std::string>& subset,
const std::set<std::string>& subset,
double max_log10p = MAX_LOG10P
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ void fly_from_kanto_map(ConsoleHandle& console, ProControllerContext& context, K
// blindly move the cursor to the specified fly spot
switch (destination){
case KantoFlyLocation::pallettown:
pbf_move_left_joystick(context, {0, -1}, 850ms, 100ms);
pbf_move_left_joystick(context, {0, -1}, 900ms, 100ms);
pbf_move_left_joystick(context, {+1, 0}, 317ms, 100ms);
break;
case KantoFlyLocation::viridiancity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ GiftRng::GiftRng()
"The number of rare candies in your bag. Make sure these are at the top position of the bag.<br>"
"Rare candies used during calibration will be restored after resetting.",
LockMode::UNLOCK_WHILE_RUNNING,
0, 0, 999 // default, min, max
0, 0, 95 // default, min, max
)
, PROFILE(
"<b>User Profile Position:</b><br>"
Expand Down Expand Up @@ -484,7 +484,11 @@ void GiftRng::program(SingleSwitchProgramEnvironment& env, ProControllerContext&
search_hits = get_search_results(env.console, searcher, filters, SEED_VALUES, ADVANCES, advances_radius, GENDER_THRESHOLD);
RNG_CALIBRATION.set_hits(search_hits);

bool force_finish = failed || (i == (MAX_RARE_CANDIES - 1));
bool force_finish = (
failed
|| (i == (MAX_RARE_CANDIES - 1))
|| all_indistinguishable(search_hits, searcher, GENDER_THRESHOLD)
);
finished = update_history(
env.console, advance_history,
calibration_history, MAX_HISTORY_LENGTH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ int auto_catch(
return catch_detected ? static_cast<int>(i) : 0;
case 3:
console.log("Black screen detected. Battle exited.");
pbf_mash_button(context, BUTTON_B, 2500ms);
return catch_detected ? static_cast<int>(i) : 0;
case 4:
console.log("Catch detected!", COLOR_BLUE);
Expand Down Expand Up @@ -299,6 +300,9 @@ bool use_rare_candy(
pbf_move_left_joystick(context, {-1, 0}, 200ms, 800ms);
pbf_move_left_joystick(context, {-1, 0}, 200ms, 800ms);
pbf_move_left_joystick(context, {-1, 0}, 200ms, 800ms);
pbf_move_left_joystick(context, {0, +1}, 200ms, 300ms);
pbf_move_left_joystick(context, {0, +1}, 200ms, 300ms);
pbf_move_left_joystick(context, {0, +1}, 200ms, 300ms);
}

// use rare candy and watch for the party screen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ void StarterRng::program(SingleSwitchProgramEnvironment& env, ProControllerConte
env.log("RNG search not complete after 3 level-ups.");
finished = update_history(
env.console, advance_history, calibration_history,
MAX_HISTORY_LENGTH, calibrations, search_hits, 5
MAX_HISTORY_LENGTH, calibrations, search_hits, 5, 2, true
);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ StaticRng::StaticRng()
"The number of rare candies in your bag. Make sure these are at the top position of the bag.<br>"
"Rare candies used during calibration will be restored after resetting.",
LockMode::UNLOCK_WHILE_RUNNING,
0, 0, 999 // default, min, max
0, 0, 70 // default, min, max
)
, MAX_BALL_THROWS(
"<b>Max Balls Thrown:</b><br>"
"The number of " + STRING_POKEBALL + "s in your bag to attempt to throw. Make sure these are at the top position of the bag.<br>"
"Balls thrown during calibration will be restored after resetting.",
LockMode::UNLOCK_WHILE_RUNNING,
20, 1, 999 // default, min, max
30, 1, 999 // default, min, max
)
, PROFILE(
"<b>User Profile Position:</b><br>"
Expand Down Expand Up @@ -477,7 +477,11 @@ void StaticRng::program(SingleSwitchProgramEnvironment& env, ProControllerContex
search_hits = get_search_results(env.console, searcher, filters, SEED_VALUES, ADVANCES, advances_radius, GENDER_THRESHOLD);
RNG_CALIBRATION.set_hits(search_hits);

bool force_finish = failed || (i == (MAX_RARE_CANDIES - 1));
bool force_finish = (
failed
|| (i == (MAX_RARE_CANDIES - 1))
|| all_indistinguishable(search_hits, searcher, GENDER_THRESHOLD)
);
finished = update_history(
env.console, advance_history,
calibration_history, MAX_HISTORY_LENGTH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ WildRng::WildRng()
"The number of rare candies in your bag. Make sure these are at the top position of the bag.<br>"
"Rare candies used during calibration will be restored after resetting.",
LockMode::UNLOCK_WHILE_RUNNING,
0, 0, 999 // default, min, max
0, 0, 98 // default, min, max
)
, MAX_BALL_THROWS(
"<b>Max Balls Thrown:</b><br>"
"The number of " + STRING_POKEBALL + "s in your bag to attempt to throw. Make sure these are at the top position of the bag.<br>"
"Balls thrown during calibration will be restored after resetting.",
LockMode::UNLOCK_WHILE_RUNNING,
20, 1, 999 // default, min, max
30, 1, 999 // default, min, max
)
, PROFILE(
"<b>User Profile Position:</b><br>"
Expand Down Expand Up @@ -559,14 +559,17 @@ void WildRng::program(SingleSwitchProgramEnvironment& env, ProControllerContext&
search_hits = get_wild_search_results(env.console, searcher, filters, SEED_VALUES, ADVANCES, advances_radius, gender_threshold, SUPER_ROD);
RNG_CALIBRATION.set_hits(search_hits);

bool force_finish = failed || (i == (MAX_RARE_CANDIES - 1));
bool force_finish = (
failed
|| (i == (MAX_RARE_CANDIES - 1))
|| all_indistinguishable(search_hits, searcher, gender_threshold, SUPER_ROD)
);
finished = update_history(
env.console, advance_history,
calibration_history, MAX_HISTORY_LENGTH,
calibrations, search_hits,
1, 2, force_finish
);
finished = finished || all_indistinguishable(search_hits, searcher, gender_threshold, SUPER_ROD);
}

env.log("RNG search finished.");
Expand Down
Loading