@@ -674,6 +674,14 @@ std::set<std::string> OutbreakFinder::enter_region_and_read_MMO(
674674}
675675
676676
677+ // Run one iteration of the outbreak finder loop and return true when one desired outbreak is found.
678+ // The iteration includes:
679+ // 1. Starting at Jubilife Village gate, go to check the map for outbreaks.
680+ // 2. If found desired outbreaks, stop.
681+ // 3. If need to check MMOs, save in front of gate, then go to each region with MMO and talk to Mai to
682+ // reveal MMO pokemon. Reset if no desired MMO to conserve Aguav Berries.
683+ // 4. If found desired MMO pokemon, stop.
684+ // 5. No desired outbreak in this iteration, go to an arbitrary region and return to village to refresh outbreaks.
677685bool OutbreakFinder::run_iteration (
678686 SingleSwitchProgramEnvironment& env, ProControllerContext& context,
679687 const std::set<std::string>& desired_hisui_map_events,
@@ -712,8 +720,10 @@ bool OutbreakFinder::run_iteration(
712720 os << " Found following desired outbreak" << (desired_outbreaks_found.size () > 1 ? " s: " : " : " );
713721 for (const auto & outbreak: desired_outbreaks_found){
714722 os << outbreak << " , " ;
723+ env.console .overlay ().add_log (" Found " + outbreak);
715724 }
716725 env.log (os.str ());
726+
717727 return true ;
718728 }else {
719729 env.log (" No desired outbreak." );
@@ -728,7 +738,7 @@ bool OutbreakFinder::run_iteration(
728738 pbf_press_button (context, BUTTON_B, 50 , 50 );
729739 // Leave the guard.
730740 pbf_move_left_joystick (context, 128 , 0 , 100 , 50 );
731- // Checking MMO costs Aguav berries .
741+ // Checking MMO costs Aguav Berries .
732742 // To not waste them, save here so that we can reset to get berries back.
733743 save_game_from_overworld (env, env.console , context);
734744
@@ -756,7 +766,7 @@ bool OutbreakFinder::run_iteration(
756766 env.update_stats ();
757767 send_program_status_notification (env, NOTIFICATION_STATUS);
758768
759- // Go to region and return.
769+ // Go to an arbitrary region and return to refresh outbreaks .
760770 goto_region_and_return (env, context, inside_travel_map);
761771
762772 return false ;
0 commit comments