Skip to content
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,19 +133,25 @@ void LegendaryRunAway::reset_hooh(SingleSwitchProgramEnvironment& env, ProContro
env.log("Failed to exit area.", COLOR_RED);
OperationFailedException::fire(
ErrorReport::SEND_ERROR_REPORT,
"Failed to exit area.",
"reset_hooh(): Failed to exit area.",
env.console
);
}else{
env.log("Left area.");
send_program_status_notification(
env, NOTIFICATION_STATUS_UPDATE,
"reset_hooh(): Left area."
);
}

BlackScreenOverWatcher enter_area(COLOR_RED);
//turn left, take one step. now turn back right and take a step. wait for black screen over.
int ret2 = run_until<ProControllerContext>(
env.console, context,
[&](ProControllerContext& context){
pbf_press_dpad(context, DPAD_LEFT, HOOH_LEFT_RIGHT, 160ms);
ssf_press_button(context, BUTTON_B, 0ms, 500ms);
pbf_press_dpad(context, DPAD_LEFT, 500ms, 0ms);
context.wait_for_all_requests();

ssf_press_button(context, BUTTON_B, 0ms, 500ms);
pbf_press_dpad(context, DPAD_RIGHT, 500ms, 160ms);
Expand All @@ -158,11 +164,15 @@ void LegendaryRunAway::reset_hooh(SingleSwitchProgramEnvironment& env, ProContro
env.log("Failed to enter area.", COLOR_RED);
OperationFailedException::fire(
ErrorReport::SEND_ERROR_REPORT,
"Failed to enter area.",
"reset_hooh(): Failed to enter area.",
env.console
);
}else{
env.log("Entered area.");
send_program_status_notification(
env, NOTIFICATION_STATUS_UPDATE,
"reset_hooh(): Entered area."
);
}

//reverse above steps, but only take 9 steps up
Expand Down Expand Up @@ -196,11 +206,15 @@ void LegendaryRunAway::reset_lugia(SingleSwitchProgramEnvironment& env, ProContr
env.log("Failed to exit area.", COLOR_RED);
OperationFailedException::fire(
ErrorReport::SEND_ERROR_REPORT,
"Failed to exit area.",
"reset_lugia(): Failed to exit area.",
env.console
);
}else{
env.log("Left area.");
send_program_status_notification(
env, NOTIFICATION_STATUS_UPDATE,
"reset_lugia(): Left area."
);
}

BlackScreenOverWatcher enter_area(COLOR_RED);
Expand All @@ -222,11 +236,15 @@ void LegendaryRunAway::reset_lugia(SingleSwitchProgramEnvironment& env, ProContr
env.log("Failed to enter area.", COLOR_RED);
OperationFailedException::fire(
ErrorReport::SEND_ERROR_REPORT,
"Failed to enter area.",
"reset_lugia(): Failed to enter area.",
env.console
);
}else{
env.log("Entered area.");
send_program_status_notification(
env, NOTIFICATION_STATUS_UPDATE,
"reset_lugia(): Entered area."
);
}

//reverse above steps
Expand Down Expand Up @@ -260,6 +278,10 @@ void LegendaryRunAway::program(SingleSwitchProgramEnvironment& env, ProControlle
//Press A to start the encounter.
pbf_press_button(context, BUTTON_A, 320ms, 320ms);
}
send_program_status_notification(
env, NOTIFICATION_STATUS_UPDATE,
"Starting encounter."
);

bool legendary_shiny = handle_encounter(env.console, context, true);
if (legendary_shiny){
Expand All @@ -279,6 +301,10 @@ void LegendaryRunAway::program(SingleSwitchProgramEnvironment& env, ProControlle
break;
}
env.log("No shiny found.");
send_program_status_notification(
env, NOTIFICATION_STATUS_UPDATE,
"No shiny found."
);
flee_battle(env.console, context);

//Close out dialog box
Expand Down
Loading