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 @@ -211,6 +211,12 @@ EggRng::EggRng()
LockMode::LOCK_WHILE_RUNNING,
EggProgramState::held_prep
)
, ROCK_SMASH(
"<b>Use Rock Smash:</b><br>"
"When checked, the boulder on the beach will be smashed to prevent RNG noise.",
LockMode::LOCK_WHILE_RUNNING,
true // default
)
, MAX_RESETS(
"<b>Max Resets:</b>",
LockMode::UNLOCK_WHILE_RUNNING,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class EggRng : public SingleSwitchProgramInstance, public ConfigOption::Listener
SectionDividerOption m_program_settings;
SimpleIntegerOption<uint16_t> SEED_RADIUS;
EnumDropdownOption<EggProgramState> STARTING_POINT;
BooleanCheckBoxOption ROCK_SMASH;
SimpleIntegerOption<uint64_t> MAX_RESETS;
SimpleIntegerOption<uint64_t> MAX_RARE_CANDIES;
SimpleIntegerOption<uint64_t> MAX_BALL_THROWS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ProControllerContext>(
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...");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down