Skip to content

Commit 7d7d189

Browse files
committed
Fix remaining SwSh egg programs for SBB. Move some SwSh programs to deprecated section.
1 parent 9c8cbe6 commit 7d7d189

File tree

6 files changed

+97
-91
lines changed

6 files changed

+97
-91
lines changed

SerialPrograms/Source/NintendoSwitch/Controllers/SysbotBase/SysbotBase_Connection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ void TcpSysbotBase_Connection::thread_loop(){
136136
if (latency < 10ms){
137137
set_status(html_color_text(m_version + str, COLOR_BLUE));
138138
}else if (latency < 50ms){
139-
set_status(html_color_text(m_version + str, COLOR_ORANGE));
139+
set_status(html_color_text(m_version + str, COLOR_DARKGREEN));
140140
}else{
141-
set_status(html_color_text(m_version + str, COLOR_RED));
141+
set_status(html_color_text(m_version + str, COLOR_ORANGE));
142142
}
143143
send_time = current_time();
144144
write_data("getVersion\n");

SerialPrograms/Source/PokemonSwSh/PokemonSwSh_Panels.cpp

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,14 @@
4646
#include "Programs/NonShinyHunting/PokemonSwSh_StatsReset-Moltres.h"
4747
#include "Programs/NonShinyHunting/PokemonSwSh_StatsReset-Regi.h"
4848

49-
#include "Programs/RNG/PokemonSwSh_CramomaticRNG.h"
50-
#include "Programs/RNG/PokemonSwSh_SeedFinder.h"
49+
#include "Programs/EggPrograms/PokemonSwSh_EggAutonomous.h"
50+
#include "Programs/EggPrograms/PokemonSwSh_EggFetcher2.h"
51+
#include "Programs/EggPrograms/PokemonSwSh_EggFetcherMultiple.h"
52+
#include "Programs/EggPrograms/PokemonSwSh_EggHatcher.h"
53+
#include "Programs/EggPrograms/PokemonSwSh_EggCombined2.h"
54+
#include "Programs/EggPrograms/PokemonSwSh_EggSuperCombined2.h"
55+
#include "Programs/EggPrograms/PokemonSwSh_GodEggDuplication.h"
56+
#include "Programs/EggPrograms/PokemonSwSh_GodEggItemDupe.h"
5157

5258
#include "Programs/ShinyHuntUnattended/PokemonSwSh_MultiGameFossil.h"
5359
#include "Programs/ShinyHuntUnattended/PokemonSwSh_ShinyHuntUnattended-Regi.h"
@@ -67,14 +73,8 @@
6773
#include "Programs/ShinyHuntAutonomous/PokemonSwSh_ShinyHuntAutonomous-Fishing.h"
6874
#include "Programs/OverworldBot/PokemonSwSh_ShinyHuntAutonomous-Overworld.h"
6975

70-
#include "Programs/EggPrograms/PokemonSwSh_EggAutonomous.h"
71-
#include "Programs/EggPrograms/PokemonSwSh_EggFetcher2.h"
72-
#include "Programs/EggPrograms/PokemonSwSh_EggFetcherMultiple.h"
73-
#include "Programs/EggPrograms/PokemonSwSh_EggHatcher.h"
74-
#include "Programs/EggPrograms/PokemonSwSh_EggCombined2.h"
75-
#include "Programs/EggPrograms/PokemonSwSh_EggSuperCombined2.h"
76-
#include "Programs/EggPrograms/PokemonSwSh_GodEggDuplication.h"
77-
#include "Programs/EggPrograms/PokemonSwSh_GodEggItemDupe.h"
76+
#include "Programs/RNG/PokemonSwSh_CramomaticRNG.h"
77+
#include "Programs/RNG/PokemonSwSh_SeedFinder.h"
7878

7979
#include "Programs/PokemonSwSh_SynchronizedSpinning.h"
8080
#include "Programs/PokemonSwSh_RaidItemFarmerOKHO.h"
@@ -129,7 +129,6 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
129129
ret.emplace_back(make_single_switch_program<PokeJobsFarmer_Descriptor, PokeJobsFarmer>());
130130

131131
ret.emplace_back("---- Den Hunting ----");
132-
ret.emplace_back(make_single_switch_program<BeamReset_Descriptor, BeamReset>());
133132
ret.emplace_back(make_single_switch_program<PurpleBeamFinder_Descriptor, PurpleBeamFinder>());
134133
ret.emplace_back(make_single_switch_program<EventBeamFinder_Descriptor, EventBeamFinder>());
135134
ret.emplace_back(make_single_switch_program<DaySkipperJPN_Descriptor, DaySkipperJPN>());
@@ -142,22 +141,25 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
142141
ret.emplace_back(make_single_switch_program<AutoHostRolling_Descriptor, AutoHostRolling>());
143142
ret.emplace_back(make_single_switch_program<AutoHostMultiGame_Descriptor, AutoHostMultiGame>());
144143

144+
ret.emplace_back("---- Eggs ----");
145+
ret.emplace_back(make_single_switch_program<EggFetcher2_Descriptor, EggFetcher2>());
146+
ret.emplace_back(make_single_switch_program<EggFetcherMultiple_Descriptor, EggFetcherMultiple>());
147+
ret.emplace_back(make_single_switch_program<EggHatcher_Descriptor, EggHatcher>());
148+
ret.emplace_back(make_single_switch_program<EggAutonomous_Descriptor, EggAutonomous>());
149+
ret.emplace_back(make_single_switch_program<GodEggItemDupe_Descriptor, GodEggItemDupe>());
150+
if (PreloadSettings::instance().NAUGHTY_MODE || PreloadSettings::instance().DEVELOPER_MODE){
151+
ret.emplace_back(make_single_switch_program<GodEggDuplication_Descriptor, GodEggDuplication>());
152+
}
153+
145154
ret.emplace_back("---- Non-Shiny Hunting ----");
146155
ret.emplace_back(make_single_switch_program<StatsReset_Descriptor, StatsReset>());
147156
ret.emplace_back(make_single_switch_program<StatsResetCalyrex_Descriptor, StatsResetCalyrex>());
148157
ret.emplace_back(make_single_switch_program<StatsResetMoltres_Descriptor, StatsResetMoltres>());
149158
ret.emplace_back(make_single_switch_program<StatsResetRegi_Descriptor, StatsResetRegi>());
150159

151-
ret.emplace_back("---- Unattended Shiny Hunting ----");
160+
ret.emplace_back("---- Shiny Hunting ----");
152161
ret.emplace_back(make_single_switch_program<MultiGameFossil_Descriptor, MultiGameFossil>());
153-
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedRegi_Descriptor, ShinyHuntUnattendedRegi>());
154-
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedSwordsOfJustice_Descriptor, ShinyHuntUnattendedSwordsOfJustice>());
155-
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedStrongSpawn_Descriptor, ShinyHuntUnattendedStrongSpawn>());
156-
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedRegigigas2_Descriptor, ShinyHuntUnattendedRegigigas2>());
157-
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedIoATrade_Descriptor, ShinyHuntUnattendedIoATrade>());
158162
ret.emplace_back(make_single_switch_program<CurryHunter_Descriptor, CurryHunter>());
159-
160-
ret.emplace_back("---- Autonomous Shiny Hunting ----");
161163
ret.emplace_back(make_single_switch_program<ShinyHuntAutonomousRegi_Descriptor, ShinyHuntAutonomousRegi>());
162164
ret.emplace_back(make_single_switch_program<ShinyHuntAutonomousSwordsOfJustice_Descriptor, ShinyHuntAutonomousSwordsOfJustice>());
163165
ret.emplace_back(make_single_switch_program<ShinyHuntAutonomousStrongSpawn_Descriptor, ShinyHuntAutonomousStrongSpawn>());
@@ -168,18 +170,6 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
168170
ret.emplace_back(make_single_switch_program<ShinyHuntAutonomousFishing_Descriptor, ShinyHuntAutonomousFishing>());
169171
ret.emplace_back(make_single_switch_program<ShinyHuntAutonomousOverworld_Descriptor, ShinyHuntAutonomousOverworld>());
170172

171-
ret.emplace_back("---- Eggs ----");
172-
ret.emplace_back(make_single_switch_program<EggFetcher2_Descriptor, EggFetcher2>());
173-
ret.emplace_back(make_single_switch_program<EggFetcherMultiple_Descriptor, EggFetcherMultiple>());
174-
ret.emplace_back(make_single_switch_program<EggHatcher_Descriptor, EggHatcher>());
175-
ret.emplace_back(make_single_switch_program<EggCombined2_Descriptor, EggCombined2>());
176-
ret.emplace_back(make_single_switch_program<EggSuperCombined2_Descriptor, EggSuperCombined2>());
177-
ret.emplace_back(make_single_switch_program<EggAutonomous_Descriptor, EggAutonomous>());
178-
ret.emplace_back(make_single_switch_program<GodEggItemDupe_Descriptor, GodEggItemDupe>());
179-
if (PreloadSettings::instance().NAUGHTY_MODE || PreloadSettings::instance().DEVELOPER_MODE){
180-
ret.emplace_back(make_single_switch_program<GodEggDuplication_Descriptor, GodEggDuplication>());
181-
}
182-
183173
ret.emplace_back("---- RNG ----");
184174
ret.emplace_back(make_single_switch_program<SeedFinder_Descriptor, SeedFinder>());
185175
ret.emplace_back(make_single_switch_program<CramomaticRNG_Descriptor, CramomaticRNG>());
@@ -193,6 +183,16 @@ std::vector<PanelEntry> PanelListFactory::make_panels() const{
193183
ret.emplace_back(make_multi_switch_program<MaxLairStrongBoss_Descriptor, MaxLairStrongBoss>());
194184
ret.emplace_back(make_multi_switch_program<MaxLairBossFinder_Descriptor, MaxLairBossFinder>());
195185

186+
ret.emplace_back("---- Deprecated Programs ----");
187+
ret.emplace_back(make_single_switch_program<BeamReset_Descriptor, BeamReset>());
188+
ret.emplace_back(make_single_switch_program<EggCombined2_Descriptor, EggCombined2>());
189+
ret.emplace_back(make_single_switch_program<EggSuperCombined2_Descriptor, EggSuperCombined2>());
190+
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedRegi_Descriptor, ShinyHuntUnattendedRegi>());
191+
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedSwordsOfJustice_Descriptor, ShinyHuntUnattendedSwordsOfJustice>());
192+
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedStrongSpawn_Descriptor, ShinyHuntUnattendedStrongSpawn>());
193+
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedRegigigas2_Descriptor, ShinyHuntUnattendedRegigigas2>());
194+
ret.emplace_back(make_single_switch_program<ShinyHuntUnattendedIoATrade_Descriptor, ShinyHuntUnattendedIoATrade>());
195+
196196
if (PreloadSettings::instance().DEVELOPER_MODE){
197197
// ret.emplace_back("---- Untested/Beta/WIP ----");
198198
}

SerialPrograms/Source/PokemonSwSh/Programs/EggPrograms/PokemonSwSh_EggAutonomous.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ void EggAutonomous::save_game(SingleSwitchProgramEnvironment& env, ProController
453453
env.console.overlay().add_log("Save game", COLOR_WHITE);
454454
pbf_press_button(context, BUTTON_X, 80ms, GameSettings::instance().OVERWORLD_TO_MENU_DELAY0);
455455
pbf_press_button(context, BUTTON_R, 80ms, 2000ms);
456-
pbf_press_button(context, BUTTON_A, 80ms, 2000ms);
456+
pbf_mash_button(context, BUTTON_A, 500ms);
457457
wait_for_y_comm_icon(env, context, "Cannot detect end of saving game.");
458458
}
459459

@@ -856,9 +856,12 @@ void EggAutonomous::wait_for_y_comm_icon(
856856
context.wait_for_all_requests();
857857
const bool y_comm_visible = true;
858858
YCommIconDetector y_comm_detector(y_comm_visible);
859-
int ret = wait_until(
860-
env.console, context, std::chrono::seconds(10),
861-
{{y_comm_detector}}
859+
int ret = run_until<ProControllerContext>(
860+
env.console, context,
861+
[](ProControllerContext& context){
862+
pbf_wait(context, 10s);
863+
},
864+
{y_comm_detector}
862865
);
863866
if (ret != 0){
864867
OperationFailedException::fire(

SerialPrograms/Source/PokemonSwSh/Programs/EggPrograms/PokemonSwSh_EggFetcherMultiple.cpp

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ EggFetcherMultiple_Descriptor::EggFetcherMultiple_Descriptor()
3838
"Fetch eggs from multiple species without hatching them.",
3939
FeedbackType::NONE,
4040
AllowCommandsWhenRunning::DISABLE_COMMANDS,
41-
{SerialPABotBase::OLD_NINTENDO_SWITCH_DEFAULT_REQUIREMENTS}
41+
{ControllerFeature::NintendoSwitch_ProController},
42+
FasterIfTickPrecise::NOT_FASTER
4243
)
4344
{}
4445

@@ -110,39 +111,39 @@ void EggFetcherMultiple::program(SingleSwitchProgramEnvironment& env, ProControl
110111
fly_home_collect_egg(context, true);
111112

112113
//remove the second pokemon from the daycare
113-
pbf_press_button(context, BUTTON_A , 10, (uint16_t)(1.5 * TICKS_PER_SECOND));
114-
pbf_press_button(context, BUTTON_A , 10, (uint16_t)(1.5 * TICKS_PER_SECOND));
115-
pbf_press_button(context, BUTTON_A , 10, 1 * TICKS_PER_SECOND);
116-
pbf_press_dpad (context, DPAD_DOWN, 10, 1 * TICKS_PER_SECOND);
117-
pbf_press_button(context, BUTTON_A , 10, 1 * TICKS_PER_SECOND);
118-
pbf_mash_button (context, BUTTON_B , 5 * TICKS_PER_SECOND);
114+
pbf_press_button(context, BUTTON_A , 160ms, 1500ms);
115+
pbf_press_button(context, BUTTON_A , 160ms, 1500ms);
116+
pbf_press_button(context, BUTTON_A , 160ms, 1000ms);
117+
pbf_press_dpad (context, DPAD_DOWN, 160ms, 1000ms);
118+
pbf_press_button(context, BUTTON_A , 160ms, 1000ms);
119+
pbf_mash_button (context, BUTTON_B , 5000ms);
119120

120121
//add a new second pokemon from the daycare
121-
pbf_press_button(context, BUTTON_A, 10, 1 * TICKS_PER_SECOND);
122-
pbf_press_button(context, BUTTON_A, 10, 1 * TICKS_PER_SECOND);
123-
pbf_press_button(context, BUTTON_A, 10, (uint16_t)(1.5 * TICKS_PER_SECOND));
124-
pbf_press_button(context, BUTTON_A, 10, 2 * TICKS_PER_SECOND);
122+
pbf_press_button(context, BUTTON_A, 160ms, 1000ms);
123+
pbf_press_button(context, BUTTON_A, 160ms, 1000ms);
124+
pbf_press_button(context, BUTTON_A, 160ms, 1500ms);
125+
pbf_press_button(context, BUTTON_A, 160ms, 2000ms);
125126
auto [box, row, column] = get_location(s);
126127
if (row == 0 && column == 0 && box != 0){
127128
box = 1;
128129
}else{
129130
box = 0;
130131
}
131132
for (uint16_t b = 0; b < box; ++b){
132-
pbf_press_button(context, BUTTON_R, 10, 1 * TICKS_PER_SECOND);
133+
pbf_press_button(context, BUTTON_R, 160ms, 1000ms);
133134
}
134135
for (uint16_t r = 0; r < row; ++r){
135-
pbf_press_dpad(context, DPAD_DOWN, 10, 1 * TICKS_PER_SECOND);
136+
pbf_press_dpad(context, DPAD_DOWN, 160ms, 1000ms);
136137
}
137138
for (uint16_t c = 0; c < column; ++c){
138-
pbf_press_dpad(context, DPAD_RIGHT, 10, 1 * TICKS_PER_SECOND);
139+
pbf_press_dpad(context, DPAD_RIGHT, 160ms, 1000ms);
139140
}
140-
pbf_press_button(context, BUTTON_A, 10, 1 * TICKS_PER_SECOND);
141-
pbf_press_button(context, BUTTON_A, 10, 2 * TICKS_PER_SECOND);
142-
pbf_press_button(context, BUTTON_A, 10, 1 * TICKS_PER_SECOND);
143-
pbf_press_button(context, BUTTON_A, 10, 5 * TICKS_PER_SECOND);
144-
pbf_press_button(context, BUTTON_A, 10, 1 * TICKS_PER_SECOND);
145-
pbf_press_button(context, BUTTON_A, 10, 1 * TICKS_PER_SECOND);
141+
pbf_press_button(context, BUTTON_A, 160ms, 1000ms);
142+
pbf_press_button(context, BUTTON_A, 160ms, 2000ms);
143+
pbf_press_button(context, BUTTON_A, 160ms, 1000ms);
144+
pbf_press_button(context, BUTTON_A, 160ms, 5000ms);
145+
pbf_press_button(context, BUTTON_A, 160ms, 1000ms);
146+
pbf_press_button(context, BUTTON_A, 160ms, 1000ms);
146147

147148
run_eggfetcher(env.console, context, GameSettings::instance().AUTO_DEPOSIT, MAX_FETCH_ATTEMPTS_PER_SPECIES);
148149
}

SerialPrograms/Source/PokemonSwSh/Programs/EggPrograms/PokemonSwSh_GodEggDuplication.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ GodEggDuplication_Descriptor::GodEggDuplication_Descriptor()
2626
"Mass duplicate " + STRING_POKEMON + " with the God Egg.",
2727
FeedbackType::NONE,
2828
AllowCommandsWhenRunning::DISABLE_COMMANDS,
29-
{SerialPABotBase::OLD_NINTENDO_SWITCH_DEFAULT_REQUIREMENTS}
29+
{ControllerFeature::NintendoSwitch_ProController},
30+
FasterIfTickPrecise::FASTER
3031
)
3132
{}
3233

@@ -56,27 +57,27 @@ GodEggDuplication::GodEggDuplication()
5657

5758
void GodEggDuplication::collect_godegg(ProControllerContext& context, uint8_t party_slot) const{
5859
pbf_wait(context, 50);
59-
ssf_press_button1(context, BUTTON_B, 100);
60-
ssf_press_button1(context, BUTTON_B, 100);
60+
ssf_press_button_ptv(context, BUTTON_B, 800ms);
61+
ssf_press_button_ptv(context, BUTTON_B, 800ms);
6162
pbf_wait(context, 225);
6263

6364
// "You received an Egg from the Nursery worker!"
64-
ssf_press_button1(context, BUTTON_B, 300);
65+
ssf_press_button_ptv(context, BUTTON_B, 2400ms);
6566

6667
// "Where do you want to send the Egg to?"
67-
ssf_press_button1(context, BUTTON_A, 100);
68+
ssf_press_button_ptv(context, BUTTON_A, 800ms);
6869

6970
// (extra line of text for French)
70-
ssf_press_button1(context, BUTTON_B, 100);
71+
ssf_press_button_ptv(context, BUTTON_B, 800ms);
7172

7273
// "Please select a Pokemon to swap from your party."
73-
ssf_press_button(context, BUTTON_B, GameSettings::instance().MENU_TO_POKEMON_DELAY0);
74+
ssf_press_button_ptv(context, BUTTON_B, GameSettings::instance().MENU_TO_POKEMON_DELAY0);
7475

7576
// Select the party member.
7677
for (uint8_t c = 0; c < party_slot; c++){
77-
ssf_press_dpad1(context, DPAD_DOWN, 10);
78+
ssf_press_dpad_ptv(context, DPAD_DOWN, 80ms);
7879
}
79-
ssf_press_button1(context, BUTTON_A, 300);
80+
ssf_press_button_ptv(context, BUTTON_A, 2400ms);
8081
pbf_mash_button(context, BUTTON_B, 500);
8182
}
8283
void GodEggDuplication::run_program(Logger& logger, ProControllerContext& context, uint16_t attempts) const{

SerialPrograms/Source/PokemonSwSh/Programs/EggPrograms/PokemonSwSh_GodEggItemDupe.cpp

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ GodEggItemDupe_Descriptor::GodEggItemDupe_Descriptor()
2828
"Mass duplicate items with the God Egg.",
2929
FeedbackType::NONE,
3030
AllowCommandsWhenRunning::DISABLE_COMMANDS,
31-
{SerialPABotBase::OLD_NINTENDO_SWITCH_DEFAULT_REQUIREMENTS}
31+
{ControllerFeature::NintendoSwitch_ProController},
32+
FasterIfTickPrecise::FASTER
3233
)
3334
{}
3435

@@ -69,65 +70,65 @@ void GodEggItemDupe::collect_godegg(
6970
bool pokemon_to_map
7071
) const{
7172
pbf_wait(context, 50);
72-
ssf_press_button1(context, BUTTON_B, 100);
73-
ssf_press_button1(context, BUTTON_B, 100);
73+
ssf_press_button_ptv(context, BUTTON_B, 800ms);
74+
ssf_press_button_ptv(context, BUTTON_B, 800ms);
7475
pbf_wait(context, 225);
7576

7677
// "You received an Egg from the Nursery worker!"
77-
ssf_press_button1(context, BUTTON_B, 300);
78+
ssf_press_button_ptv(context, BUTTON_B, 2400ms);
7879

7980
// "Where do you want to send the Egg to?"
80-
ssf_press_button1(context, BUTTON_A, 100);
81+
ssf_press_button_ptv(context, BUTTON_A, 800ms);
8182

8283
// (extra line of text for French)
83-
ssf_press_button1(context, BUTTON_B, 100);
84+
ssf_press_button_ptv(context, BUTTON_B, 800ms);
8485

8586
// "Please select a Pokemon to swap from your party."
86-
ssf_press_button(context, BUTTON_B, GameSettings::instance().MENU_TO_POKEMON_DELAY0);
87+
ssf_press_button_ptv(context, BUTTON_B, GameSettings::instance().MENU_TO_POKEMON_DELAY0);
8788

8889
// Select the party member.
8990
for (uint8_t c = 0; c < party_slot; c++){
90-
ssf_press_dpad1(context, DPAD_DOWN, 10);
91+
ssf_press_dpad_ptv(context, DPAD_DOWN, 80ms);
9192
}
92-
ssf_press_button1(context, BUTTON_A, 300);
93+
ssf_press_button_ptv(context, BUTTON_A, 2400ms);
9394
pbf_mash_button(context, BUTTON_B, 500);
9495

9596
// Enter box
9697
ssf_press_button(context, BUTTON_X, GameSettings::instance().OVERWORLD_TO_MENU_DELAY0, 160ms);
9798
if (map_to_pokemon){
98-
ssf_press_dpad2(context, DPAD_UP, 20, 10);
99-
ssf_press_dpad2(context, DPAD_RIGHT, 20, 10);
99+
ssf_press_dpad_ptv(context, DPAD_UP, 160ms, 80ms);
100+
ssf_press_dpad_ptv(context, DPAD_RIGHT, 160ms, 80ms);
100101
}
101102
ssf_press_button(context, BUTTON_A, GameSettings::instance().MENU_TO_POKEMON_DELAY0, 80ms);
102103
ssf_press_button(context, BUTTON_R, GameSettings::instance().POKEMON_TO_BOX_DELAY0, 80ms);
103104

104105
if (DETACH_BEFORE_RELEASE){
105106
// Detach item
106-
ssf_press_button2(context, BUTTON_A, 50, 10);
107-
ssf_press_dpad1(context, DPAD_DOWN, 10);
108-
ssf_press_dpad1(context, DPAD_DOWN, 10);
109-
ssf_press_button2(context, BUTTON_A, 150, 10);
110-
ssf_press_button2(context, BUTTON_A, 150, 10);
111-
ssf_press_button2(context, BUTTON_A, 100, 10);
107+
ssf_press_button(context, BUTTON_A, 50, 20);
108+
ssf_press_dpad_ptv(context, DPAD_DOWN, 80ms);
109+
ssf_press_dpad_ptv(context, DPAD_DOWN, 80ms);
110+
ssf_press_button(context, BUTTON_A, 150, 20);
111+
ssf_press_button(context, BUTTON_A, 150, 20);
112+
ssf_press_button(context, BUTTON_A, 100, 20);
112113

113114
// Release
114115
release(context);
115116
}else{
116117
// Release (item detaches automatically)
117-
ssf_press_button2(context, BUTTON_A, 60, 10);
118-
ssf_press_dpad1(context, DPAD_DOWN, 15);
119-
ssf_press_dpad1(context, DPAD_DOWN, 15);
120-
ssf_press_dpad1(context, DPAD_DOWN, 15);
121-
ssf_press_dpad1(context, DPAD_DOWN, 15);
122-
ssf_press_button2(context, BUTTON_A, 125, 10);
123-
ssf_press_dpad1(context, DPAD_UP, 10);
118+
ssf_press_button(context, BUTTON_A, 60, 20);
119+
ssf_press_dpad_ptv(context, DPAD_DOWN, 120ms);
120+
ssf_press_dpad_ptv(context, DPAD_DOWN, 120ms);
121+
ssf_press_dpad_ptv(context, DPAD_DOWN, 120ms);
122+
ssf_press_dpad_ptv(context, DPAD_DOWN, 120ms);
123+
ssf_press_button(context, BUTTON_A, 125, 20);
124+
ssf_press_dpad_ptv(context, DPAD_UP, 80ms);
124125
ssf_mash_AZs(context, 180);
125126
}
126127

127128
// Back out to menu.
128129
if (pokemon_to_map){
129130
box_to_menu(context);
130-
ssf_press_button1(context, BUTTON_B, 250);
131+
ssf_press_button(context, BUTTON_B, 2000ms, 50ms);
131132
}else{
132133
pbf_mash_button(context, BUTTON_B, 700);
133134
}

0 commit comments

Comments
 (0)