diff --git a/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_EggRng.cpp b/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_EggRng.cpp
index 12740c8ac0..53a1c649f2 100644
--- a/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_EggRng.cpp
+++ b/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_EggRng.cpp
@@ -211,6 +211,12 @@ EggRng::EggRng()
LockMode::LOCK_WHILE_RUNNING,
EggProgramState::held_prep
)
+ , ROCK_SMASH(
+ "Use Rock Smash:
"
+ "When checked, the boulder on the beach will be smashed to prevent RNG noise.",
+ LockMode::LOCK_WHILE_RUNNING,
+ true // default
+ )
, MAX_RESETS(
"Max Resets:",
LockMode::UNLOCK_WHILE_RUNNING,
@@ -277,6 +283,7 @@ EggRng::EggRng()
PA_ADD_OPTION(m_program_settings);
PA_ADD_OPTION(SEED_RADIUS);
PA_ADD_OPTION(STARTING_POINT);
+ PA_ADD_OPTION(ROCK_SMASH);
PA_ADD_OPTION(MAX_RESETS);
PA_ADD_OPTION(MAX_BALL_THROWS);
PA_ADD_OPTION(MAX_RARE_CANDIES);
@@ -517,6 +524,10 @@ bool EggRng::held_frame_check(
// decide if it's a good idea to save and commit to this held frame
bool locked_in = false;
if (previously_hit_held_frame && (current_seed == TARGET_HELD_SEED)){
+ if (ROCK_SMASH){
+ env.log("Smashing rock on the beach...");
+ smash_daycare_rock(env.console, context);
+ }
env.log("Committing to this Held Frame and saving the game...");
save_game_to_overworld(env.console, context);
locked_in = true;
diff --git a/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_EggRng.h b/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_EggRng.h
index 1d1d31815c..2a74b1910f 100644
--- a/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_EggRng.h
+++ b/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_EggRng.h
@@ -165,6 +165,7 @@ class EggRng : public SingleSwitchProgramInstance, public ConfigOption::Listener
SectionDividerOption m_program_settings;
SimpleIntegerOption SEED_RADIUS;
EnumDropdownOption STARTING_POINT;
+ BooleanCheckBoxOption ROCK_SMASH;
SimpleIntegerOption MAX_RESETS;
SimpleIntegerOption MAX_RARE_CANDIES;
SimpleIntegerOption MAX_BALL_THROWS;
diff --git a/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngNavigation.cpp b/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngNavigation.cpp
index 43260713a2..87c1632c06 100644
--- a/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngNavigation.cpp
+++ b/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngNavigation.cpp
@@ -676,6 +676,44 @@ void walk_from_pond_to_daycare_man(ConsoleHandle& console, ProControllerContext&
pbf_move_left_joystick(context, {0, +1}, 300ms, 300ms);
}
+bool smash_daycare_rock(ConsoleHandle& console, ProControllerContext& context){
+ // run to the smashable rock on the beach
+ ssf_press_button(context, BUTTON_B, 200ms, 6400ms);
+ pbf_move_left_joystick(context, {-1, 0}, 1250ms, 200ms);
+ pbf_move_left_joystick(context, {0, -1}, 1350ms, 200ms);
+ pbf_move_left_joystick(context, {-1, 0}, 750ms, 200ms);
+ pbf_move_left_joystick(context, {0, +1}, 2250ms, 300ms);
+
+ // smash rock
+ WhiteDialogWatcher rock_dialog(COLOR_RED);
+ context.wait_for_all_requests();
+ int ret = run_until(
+ console, context,
+ [](ProControllerContext& context) {
+ ssf_mash1_button(context, BUTTON_A, 10000ms);
+ },
+ { rock_dialog }
+ );
+ if (ret < 0){
+ console.log("Failed to detect rock smash dialog");
+ return true;
+ }
+ pbf_mash_button(context, BUTTON_A, 2000ms);
+ pbf_mash_button(context, BUTTON_B, 4000ms);
+
+ // run back to the day care man
+ ssf_press_button(context, BUTTON_B, 200ms, 6750ms);
+ pbf_move_left_joystick(context, {0, -1}, 2250ms, 200ms);
+ pbf_move_left_joystick(context, {+1, 0}, 600ms, 200ms);
+ pbf_move_left_joystick(context, {0, +1}, 2000ms, 200ms);
+ pbf_move_left_joystick(context, {+1, 0}, 1000ms, 500ms);
+
+ pbf_move_left_joystick(context, {0, -1}, 200ms, 300ms);
+ pbf_move_left_joystick(context, {+1, 0}, 200ms, 300ms);
+ pbf_move_left_joystick(context, {0, +1}, 200ms, 300ms);
+ return false;
+}
+
void egg_pickup(ConsoleHandle& console, ProControllerContext& context){
console.log("Picking up egg...");
diff --git a/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngNavigation.h b/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngNavigation.h
index 90d1db32ce..03346d7e86 100644
--- a/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngNavigation.h
+++ b/SerialPrograms/Source/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngNavigation.h
@@ -76,11 +76,12 @@ void hatch_daycare_egg(ConsoleHandle& console, ProControllerContext& context);
// Daycare (Four Island) navigation for egg RNG.
-// bool methods return true when they fail to start surfing
+// bool methods return true when they fail to start surfing or smash the rock
void use_max_repel(ConsoleHandle& console, ProControllerContext& context);
void daycare_steps(ConsoleHandle& console, ProControllerContext& context);
bool walk_from_daycare_to_pond(ConsoleHandle& console, ProControllerContext& context);
void walk_from_pond_to_daycare_man(ConsoleHandle& console, ProControllerContext& context);
+bool smash_daycare_rock(ConsoleHandle& console, ProControllerContext& context);
void egg_pickup(ConsoleHandle& console, ProControllerContext& context);
bool walk_from_daycare_man_to_pond(ConsoleHandle& console, ProControllerContext& context);