From 32a7e20e1fb8bce1f8ded9298f29a671ef8fa093 Mon Sep 17 00:00:00 2001 From: ZHDreamer Date: Mon, 9 Feb 2026 12:05:20 -0800 Subject: [PATCH] Fix Magearna stats reset for NS1 The loading time for NS1 is longer than NS2. The original program can not run on my NS1. So I add the overworld detection and A button detection to make the program more robust. Also add some duration for the dialogue. --- .../NonShinyHunting/PokemonLZA_StatsReset.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp index 654b62880..17db94cbe 100644 --- a/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp +++ b/SerialPrograms/Source/PokemonLZA/Programs/NonShinyHunting/PokemonLZA_StatsReset.cpp @@ -171,13 +171,17 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte fly_from_map(env.console, context); // move to the door - pbf_move_left_joystick(context, {0, +1}, 8s, 500ms); + for (int i = 0; i < 4; ++i) { + pbf_press_button(context, BUTTON_Y, 100ms, 1s); + } + run_towards_gate_with_A_button(env.console, context, 0, +1, Seconds(2)); if (POKEMON == GiftPokemon::FLOETTE){ pbf_mash_button(context, BUTTON_A, 30s); } if (POKEMON == GiftPokemon::MAGEARNA){ - pbf_mash_button(context, BUTTON_A, 4s); - pbf_move_left_joystick(context, {+0.1, +1}, 2s, 500ms); + pbf_mash_button(context, BUTTON_A, Seconds(2)); + wait_until_overworld(env.console, context, Seconds(10)); + run_towards_gate_with_A_button(env.console, context, +0.15, +1, Seconds(3)); pbf_mash_button(context, BUTTON_A, 30s); } } @@ -304,7 +308,7 @@ void StatsReset::program(SingleSwitchProgramEnvironment& env, ProControllerConte if (POKEMON == GiftPokemon::FLOETTE || POKEMON == GiftPokemon::MELMETAL){ pbf_mash_button(context, BUTTON_A, 60s); }else if (POKEMON == GiftPokemon::MAGEARNA){ - pbf_mash_button(context, BUTTON_A, 50s); + pbf_mash_button(context, BUTTON_A, 60s); }else{ pbf_mash_button(context, BUTTON_A, 30s); }