Skip to content

Commit d29f3c9

Browse files
committed
target selection
1 parent 50d6611 commit d29f3c9

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

SerialPrograms/Source/PokemonLGPE/Programs/ShinyHunting/PokemonLGPE_LegendaryReset.cpp

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,17 @@ std::unique_ptr<StatsTracker> LegendaryReset_Descriptor::make_stats() const{
5353
}
5454

5555
LegendaryReset::LegendaryReset()
56-
: GO_HOME_WHEN_DONE(true)
56+
: TARGET(
57+
"<b>Target:</b><br>",
58+
{
59+
{Target::mewtwo, "mewtwo", "Mewtwo, Articuno, Zapdos, Moltres"},
60+
{Target::snorlax, "snorlax", "Snorlax"},
61+
//{Target::snorlax2, "snorlax2", "Snorlax (w/Fuji)"},
62+
},
63+
LockMode::LOCK_WHILE_RUNNING,
64+
Target::mewtwo
65+
)
66+
, GO_HOME_WHEN_DONE(true)
5767
, NOTIFICATION_SHINY(
5868
"Shiny Found",
5969
true, true, ImageAttachmentMode::JPG,
@@ -66,6 +76,7 @@ LegendaryReset::LegendaryReset()
6676
&NOTIFICATION_PROGRAM_FINISH,
6777
})
6878
{
79+
PA_ADD_OPTION(TARGET);
6980
PA_ADD_OPTION(GO_HOME_WHEN_DONE);
7081
PA_ADD_OPTION(NOTIFICATIONS);
7182
}
@@ -79,7 +90,17 @@ bool LegendaryReset::run_battle(SingleSwitchProgramEnvironment& env, JoyconConte
7990
BattleMenuWatcher battle_started(COLOR_YELLOW);
8091

8192
env.log("Starting battle.");
82-
pbf_mash_button(context, BUTTON_A, 25000ms); //10000ms
93+
switch (TARGET) {
94+
case Target::mewtwo:
95+
pbf_mash_button(context, BUTTON_A, 5000ms); //untested
96+
break;
97+
case Target::snorlax:
98+
pbf_mash_button(context, BUTTON_A, 15000ms);
99+
break;
100+
case Target::snorlax2:
101+
pbf_mash_button(context, BUTTON_A, 25000ms); //can't test
102+
break;
103+
}
83104
context.wait_for_all_requests();
84105

85106
int res = run_until<JoyconContext>(

SerialPrograms/Source/PokemonLGPE/Programs/ShinyHunting/PokemonLGPE_LegendaryReset.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ class LegendaryReset : public SingleSwitchProgramInstance{
3232
private:
3333
bool run_battle(SingleSwitchProgramEnvironment& env, JoyconContext& context);
3434

35+
enum class Target{
36+
mewtwo,
37+
snorlax,
38+
snorlax2,
39+
};
40+
EnumDropdownOption<Target> TARGET;
41+
3542
GoHomeWhenDoneOption GO_HOME_WHEN_DONE;
3643

3744
EventNotificationOption NOTIFICATION_SHINY;

0 commit comments

Comments
 (0)