Skip to content

Commit 188f798

Browse files
kichithewolfMysticial
authored andcommitted
go to home on shiny detection
1 parent 0c6f9e5 commit 188f798

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

SerialPrograms/Source/PokemonLZA/Programs/PokemonLZA_BeldumHunter.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ using namespace Pokemon;
2828

2929
BeldumHunter_Descriptor::BeldumHunter_Descriptor()
3030
: SingleSwitchProgramDescriptor(
31-
"PokemonLZA:BeldumHunter",
32-
STRING_POKEMON + " LZA", "Beldum Hunter",
31+
"PokemonLZA:ShinyHunt-Beldum",
32+
STRING_POKEMON + " LZA", "Shiny Hunt - Beldum",
3333
"Programs/PokemonLZA/BeldumHunter.html",
34-
"Reset in Lysandre Labs to shiny hunt Beldum.",
34+
"Repeatedly enter Lysandre Labs to shiny hunt Beldum.",
3535
ProgramControllerClass::StandardController_NoRestrictions,
3636
FeedbackType::VIDEO_AUDIO,
3737
AllowCommandsWhenRunning::DISABLE_COMMANDS
@@ -135,8 +135,9 @@ bool BeldumHunter::run_iteration(SingleSwitchProgramEnvironment& env, ProControl
135135
pbf_controller_state(context, BUTTON_B, DPAD_NONE, 128, 0, 128, 128, 340);
136136

137137
env.log("Final hallway to Beldum room.");
138-
pbf_controller_state(context, BUTTON_B, DPAD_NONE, 0, 128, 128, 128, 350);
139-
138+
pbf_controller_state(context, BUTTON_B, DPAD_NONE, 0, 128, 128, 128, 400);
139+
pbf_press_button(context, BUTTON_L, 40ms, 40ms);
140+
context.wait_for_all_requests();
140141
},
141142
{ {shiny_detector} }
142143
);
@@ -181,6 +182,9 @@ void BeldumHunter::program(SingleSwitchProgramEnvironment& env, ProControllerCon
181182
if (shiny_found) {
182183
stats.shinies++;
183184
env.update_stats();
185+
186+
pbf_press_button(context, BUTTON_HOME, 160ms, 3000ms);
187+
184188
send_program_notification(env, NOTIFICATION_SHINY,
185189
COLOR_YELLOW, "Shiny sound detected!", {},
186190
"", env.console.video().snapshot(), true);

0 commit comments

Comments
 (0)