From d2de3080aa894c053173fc5eb5bd3757c9b8cc4f Mon Sep 17 00:00:00 2001 From: Nymphea <87930564+NympheaR@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:13:05 +0900 Subject: [PATCH 1/4] add Volcanion reset --- .../NonShinyHunting/PokemonLZA_StatsReset.cpp | 62 ++++++++++++++++--- .../NonShinyHunting/PokemonLZA_StatsReset.h | 3 +- 2 files changed, 55 insertions(+), 10 deletions(-) diff --git a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp index 0dd656772d..49d73eaa37 100644 --- a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp +++ b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp @@ -79,6 +79,7 @@ StatsReset::StatsReset() {GiftPokemon::MAGEARNA, "magearna", "Magearna"}, {GiftPokemon::MELTAN, "meltan", "Meltan" }, {GiftPokemon::MELMETAL, "melmetal", "Melmetal"}, + {GiftPokemon::VOLCANION,"volcanion","Volcanion"}, }, LockMode::LOCK_WHILE_RUNNING, GiftPokemon::FLOETTE @@ -151,7 +152,7 @@ StatsReset::~StatsReset(){ } void StatsReset::on_config_value_changed(void* object){ - ConfigOptionState state_ball = (POKEMON == GiftPokemon::GENESECT || POKEMON == GiftPokemon::MELTAN) + ConfigOptionState state_ball = (POKEMON == GiftPokemon::GENESECT || POKEMON == GiftPokemon::MELTAN || POKEMON == GiftPokemon::VOLCANION) ? ConfigOptionState::ENABLED : ConfigOptionState::HIDDEN; ConfigOptionState state_donut = (POKEMON == GiftPokemon::GENESECT || POKEMON == GiftPokemon::MELMETAL) ? ConfigOptionState::ENABLED : ConfigOptionState::HIDDEN; @@ -191,7 +192,7 @@ void StatsReset::enter_portal(SingleSwitchProgramEnvironment& env, ProController { overworld, } - ); + ); if (ret == 0){ env.log("Detected overworld"); @@ -199,7 +200,7 @@ void StatsReset::enter_portal(SingleSwitchProgramEnvironment& env, ProController } } -void StatsReset::run_battle(SingleSwitchProgramEnvironment& env, ProControllerContext& context, bool attempt_move){ +void StatsReset::run_battle(SingleSwitchProgramEnvironment& env, ProControllerContext& context, bool attempt_move, bool use_plus_move){ RunFromBattleWatcher battle_menu(COLOR_GREEN, &env.console.overlay(), 10ms); context.wait_for_all_requests(); @@ -211,13 +212,17 @@ void StatsReset::run_battle(SingleSwitchProgramEnvironment& env, ProControllerCo { battle_menu, } - ); + ); if (ret == 0){ env.log("Detected battle menu"); if (attempt_move){ pbf_press_button(context, BUTTON_Y, 50ms, 500ms); ssf_press_button(context, BUTTON_ZL, 0ms, 4s, 200ms); + if (use_plus_move){ + pbf_wait(context, 500ms); + pbf_press_button(context, BUTTON_PLUS, 50ms, 500ms); + } pbf_mash_button(context, BUTTON_A, 4s); } context.wait_for_all_requests(); @@ -242,7 +247,7 @@ void StatsReset::run_catch(SingleSwitchProgramEnvironment& env, ProControllerCon BUTTON_ZL | BUTTON_ZR, 500ms, 500ms + (hold + cool) * scrolls, 0ms - ); + ); while (scrolls != 0){ pbf_press_dpad(context, direction, hold, cool); @@ -273,7 +278,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte ErrorReport::SEND_ERROR_REPORT, "Failed to travel to Quasartico Inc.", env.console - ); + ); } context.wait_for(100ms); env.log("Detected overworld. Fast traveled to Quasartico Inc."); @@ -309,7 +314,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte ErrorReport::SEND_ERROR_REPORT, "Failed to travel to Lysandre Café", env.console - ); + ); } context.wait_for(100ms); env.log("Detected overworld. Fast traveled to Lysandre Café"); @@ -366,7 +371,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte ErrorReport::SEND_ERROR_REPORT, "Failed to travel to Wild Zone 13", env.console - ); + ); } context.wait_for(100ms); env.log("Detected overworld. Fast traveled to Wild Zone 13"); @@ -396,6 +401,44 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte pbf_mash_button(context, BUTTON_A, 5s); } + if (POKEMON == GiftPokemon::VOLCANION){ + // fly to research lab + FastTravelState travel_status = open_map_and_fly_to(env.console, context, LANGUAGE, Location::POKEMON_RESEARCH_LAB); + if (travel_status != FastTravelState::SUCCESS){ + stats.errors++; + env.update_stats(); + OperationFailedException::fire( + ErrorReport::SEND_ERROR_REPORT, + "Failed to travel to Research Lab", + env.console + ); + } + context.wait_for(100ms); + env.log("Detected overworld. Fast traveled to Research Lab"); + + run_towards_gate_with_A_button(env.console, context, 0, +1, Seconds(5)); + pbf_mash_button(context, BUTTON_A, 10s); + + // elevator sequence + run_towards_gate_with_A_button(env.console, context, 0, +1, Seconds(5)); + pbf_press_button(context, BUTTON_A, 50ms, 1s); + pbf_press_button(context, BUTTON_A, 50ms, 1s); + pbf_press_dpad(context, DPAD_DOWN, 50ms, 1s); + pbf_mash_button(context, BUTTON_A, 10s); + + pbf_move_left_joystick(context, {+0.7, +1}, 1s, 500ms); + pbf_move_left_joystick(context, {+0.6, -1}, 1s, 500ms); + + pbf_mash_button(context, BUTTON_A, 30s); + + run_battle(env, context, true, true); + // additional delay because Fissure takes longer to launch + pbf_wait(context, 4s); + + run_catch(env, context); + pbf_mash_button(context, BUTTON_A, 20s); + } + context.wait_for_all_requests(); { BlackScreenOverWatcher detector; @@ -417,7 +460,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte overworld, battle_menu } - ); + ); switch (result){ case 0: env.log(STRING_POKEMON + " dialog finished.", COLOR_PURPLE); @@ -435,6 +478,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte reset_game_from_home(env, env.console, context, true); continue; default: + stats.errors++; env.log(STRING_POKEMON + " dialog timed out.", COLOR_RED); // fail safely and start over go_home(env.console, context); diff --git a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.h b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.h index 08120c46bf..4123a44c47 100644 --- a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.h +++ b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.h @@ -42,7 +42,7 @@ class StatsReset : public SingleSwitchProgramInstance, public ConfigOption::List private: virtual void enter_portal(SingleSwitchProgramEnvironment& env, ProControllerContext& context); - virtual void run_battle(SingleSwitchProgramEnvironment& env, ProControllerContext& context, bool attempt_move = false); + virtual void run_battle(SingleSwitchProgramEnvironment& env, ProControllerContext& context, bool attempt_move = false, bool use_plus_move = false); virtual void run_catch(SingleSwitchProgramEnvironment& env, ProControllerContext& context); virtual void on_config_value_changed(void* object) override; StartInGripOrGameOption START_LOCATION; @@ -56,6 +56,7 @@ class StatsReset : public SingleSwitchProgramInstance, public ConfigOption::List MAGEARNA, MELTAN, MELMETAL, + VOLCANION, }; EnumDropdownOption POKEMON; From b5a2df05d74943ee77947907c5238a305f7cffad Mon Sep 17 00:00:00 2001 From: Nymphea <87930564+NympheaR@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:14:32 +0900 Subject: [PATCH 2/4] fix spacing --- .../Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp index 49d73eaa37..c9cf202aae 100644 --- a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp +++ b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp @@ -460,7 +460,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte overworld, battle_menu } - ); + ); switch (result){ case 0: env.log(STRING_POKEMON + " dialog finished.", COLOR_PURPLE); From 03a3124affb7fce6d8ab7054a4345959b94581d3 Mon Sep 17 00:00:00 2001 From: Nymphea <87930564+NympheaR@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:16:53 +0900 Subject: [PATCH 3/4] fix spacing --- .../Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp index c9cf202aae..5cf8c884c2 100644 --- a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp +++ b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp @@ -192,7 +192,7 @@ void StatsReset::enter_portal(SingleSwitchProgramEnvironment& env, ProController { overworld, } - ); + ); if (ret == 0){ env.log("Detected overworld"); @@ -212,7 +212,7 @@ void StatsReset::run_battle(SingleSwitchProgramEnvironment& env, ProControllerCo { battle_menu, } - ); + ); if (ret == 0){ env.log("Detected battle menu"); @@ -278,7 +278,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte ErrorReport::SEND_ERROR_REPORT, "Failed to travel to Quasartico Inc.", env.console - ); + ); } context.wait_for(100ms); env.log("Detected overworld. Fast traveled to Quasartico Inc."); From d1349fd1d7b174125741cd309814448682eb2a94 Mon Sep 17 00:00:00 2001 From: Nymphea <87930564+NympheaR@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:18:35 +0900 Subject: [PATCH 4/4] fix spacing --- .../Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp index 5cf8c884c2..d0d5fd2dac 100644 --- a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp +++ b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp @@ -247,7 +247,7 @@ void StatsReset::run_catch(SingleSwitchProgramEnvironment& env, ProControllerCon BUTTON_ZL | BUTTON_ZR, 500ms, 500ms + (hold + cool) * scrolls, 0ms - ); + ); while (scrolls != 0){ pbf_press_dpad(context, direction, hold, cool); @@ -314,7 +314,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte ErrorReport::SEND_ERROR_REPORT, "Failed to travel to Lysandre Café", env.console - ); + ); } context.wait_for(100ms); env.log("Detected overworld. Fast traveled to Lysandre Café"); @@ -371,7 +371,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte ErrorReport::SEND_ERROR_REPORT, "Failed to travel to Wild Zone 13", env.console - ); + ); } context.wait_for(100ms); env.log("Detected overworld. Fast traveled to Wild Zone 13");