Skip to content

Commit 5b5afd0

Browse files
committed
Autostory: checkpoint 53: Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.
1 parent d2a1005 commit 5b5afd0

File tree

5 files changed

+191
-46
lines changed

5 files changed

+191
-46
lines changed

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,11 @@ void AutoStory::test_checkpoints(
641641
checkpoint_list.push_back([&](){checkpoint_53(env, context, notif_status_update, stats);});
642642
checkpoint_list.push_back([&](){checkpoint_54(env, context, notif_status_update, stats);});
643643
checkpoint_list.push_back([&](){checkpoint_55(env, context, notif_status_update, stats);});
644+
checkpoint_list.push_back([&](){checkpoint_56(env, context, notif_status_update, stats);});
645+
checkpoint_list.push_back([&](){checkpoint_57(env, context, notif_status_update, stats);});
646+
checkpoint_list.push_back([&](){checkpoint_58(env, context, notif_status_update, stats);});
647+
checkpoint_list.push_back([&](){checkpoint_59(env, context, notif_status_update, stats);});
648+
checkpoint_list.push_back([&](){checkpoint_60(env, context, notif_status_update, stats);});
644649

645650

646651
for (int checkpoint = start; checkpoint <= end; checkpoint++){

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ std::string AutoStory_Segment_22::start_text() const{
3939
}
4040

4141
std::string AutoStory_Segment_22::end_text() const{
42-
return "End: ";
42+
return "End: Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";
4343
}
4444

4545
void AutoStory_Segment_22::run_segment(
@@ -58,6 +58,7 @@ void AutoStory_Segment_22::run_segment(
5858
checkpoint_50(env, context, options.notif_status_update, stats);
5959
checkpoint_51(env, context, options.notif_status_update, stats);
6060
checkpoint_52(env, context, options.notif_status_update, stats);
61+
checkpoint_53(env, context, options.notif_status_update, stats);
6162

6263
context.wait_for_all_requests();
6364
env.console.log("End Segment " + name(), COLOR_GREEN);
@@ -320,39 +321,35 @@ void checkpoint_53(
320321
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
321322
[&](size_t attempt_number){
322323

324+
// realign camera.
325+
pbf_press_button(context, BUTTON_L, 30, 30);
323326

324-
});
325-
326-
}
327-
328-
void checkpoint_54(
329-
SingleSwitchProgramEnvironment& env,
330-
ProControllerContext& context,
331-
EventNotificationOption& notif_status_update,
332-
AutoStoryStats& stats
333-
){
334-
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
335-
[&](size_t attempt_number){
336-
327+
// walk backwards into the Gym building
328+
pbf_move_left_joystick(context, 128, 255, 500, 100);
329+
pbf_wait(context, 3 * TICKS_PER_SECOND);
337330

338-
});
331+
// talk to Gym receptionist
332+
walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_SPAM_A, 30);
339333

340-
}
334+
clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::PROMPT_DIALOG, CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW});
335+
env.console.log("Battle Electric Gym leader.");
336+
run_trainer_battle_press_A(env.console, context, BattleStopCondition::STOP_DIALOG);
337+
mash_button_till_overworld(env.console, context, BUTTON_A);
341338

342-
void checkpoint_55(
343-
SingleSwitchProgramEnvironment& env,
344-
ProControllerContext& context,
345-
EventNotificationOption& notif_status_update,
346-
AutoStoryStats& stats
347-
){
348-
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
349-
[&](size_t attempt_number){
339+
// Gym leader defeated. Standing in Gym building
340+
pbf_move_left_joystick(context, 128, 255, 500, 100);
341+
pbf_wait(context, 3 * TICKS_PER_SECOND);
342+
// wait for overworld after leaving Gym
343+
wait_for_overworld(env.program_info(), env.console, context, 30);
350344

345+
// fly to Levincia (North) Pokecenter
346+
move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, 100, 0, 50});
351347

352-
});
348+
});
353349

354350
}
355351

352+
356353
}
357354
}
358355
}

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ void checkpoint_52(
5656
);
5757

5858

59-
// start:
60-
// end:
59+
// start: Finished Levincia gym challenge. Standing outside Levincia gym.
60+
// end: Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.
6161
void checkpoint_53(
6262
SingleSwitchProgramEnvironment& env,
6363
ProControllerContext& context,
@@ -66,25 +66,6 @@ void checkpoint_53(
6666
);
6767

6868

69-
// start:
70-
// end:
71-
void checkpoint_54(
72-
SingleSwitchProgramEnvironment& env,
73-
ProControllerContext& context,
74-
EventNotificationOption& notif_status_update,
75-
AutoStoryStats& stats
76-
);
77-
78-
79-
// start:
80-
// end:
81-
void checkpoint_55(
82-
SingleSwitchProgramEnvironment& env,
83-
ProControllerContext& context,
84-
EventNotificationOption& notif_status_update,
85-
AutoStoryStats& stats
86-
);
87-
8869

8970

9071

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,103 @@ void AutoStory_Segment_23::run_segment(
5959

6060
}
6161

62+
void checkpoint_54(
63+
SingleSwitchProgramEnvironment& env,
64+
ProControllerContext& context,
65+
EventNotificationOption& notif_status_update,
66+
AutoStoryStats& stats
67+
){
68+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
69+
[&](size_t attempt_number){
70+
71+
72+
});
73+
74+
}
75+
76+
void checkpoint_55(
77+
SingleSwitchProgramEnvironment& env,
78+
ProControllerContext& context,
79+
EventNotificationOption& notif_status_update,
80+
AutoStoryStats& stats
81+
){
82+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
83+
[&](size_t attempt_number){
84+
85+
86+
});
87+
88+
}
89+
90+
void checkpoint_56(
91+
SingleSwitchProgramEnvironment& env,
92+
ProControllerContext& context,
93+
EventNotificationOption& notif_status_update,
94+
AutoStoryStats& stats
95+
){
96+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
97+
[&](size_t attempt_number){
98+
99+
100+
});
101+
102+
}
103+
104+
void checkpoint_57(
105+
SingleSwitchProgramEnvironment& env,
106+
ProControllerContext& context,
107+
EventNotificationOption& notif_status_update,
108+
AutoStoryStats& stats
109+
){
110+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
111+
[&](size_t attempt_number){
112+
113+
114+
});
115+
116+
}
117+
118+
void checkpoint_58(
119+
SingleSwitchProgramEnvironment& env,
120+
ProControllerContext& context,
121+
EventNotificationOption& notif_status_update,
122+
AutoStoryStats& stats
123+
){
124+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
125+
[&](size_t attempt_number){
126+
127+
128+
});
129+
130+
}
131+
132+
void checkpoint_59(
133+
SingleSwitchProgramEnvironment& env,
134+
ProControllerContext& context,
135+
EventNotificationOption& notif_status_update,
136+
AutoStoryStats& stats
137+
){
138+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
139+
[&](size_t attempt_number){
140+
141+
142+
});
143+
144+
}
145+
146+
void checkpoint_60(
147+
SingleSwitchProgramEnvironment& env,
148+
ProControllerContext& context,
149+
EventNotificationOption& notif_status_update,
150+
AutoStoryStats& stats
151+
){
152+
checkpoint_reattempt_loop(env, context, notif_status_update, stats,
153+
[&](size_t attempt_number){
154+
155+
156+
});
157+
158+
}
62159

63160

64161

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,71 @@ class AutoStory_Segment_23 : public AutoStory_Segment{
2727
};
2828

2929

30+
// start:
31+
// end:
32+
void checkpoint_54(
33+
SingleSwitchProgramEnvironment& env,
34+
ProControllerContext& context,
35+
EventNotificationOption& notif_status_update,
36+
AutoStoryStats& stats
37+
);
38+
39+
40+
// start:
41+
// end:
42+
void checkpoint_55(
43+
SingleSwitchProgramEnvironment& env,
44+
ProControllerContext& context,
45+
EventNotificationOption& notif_status_update,
46+
AutoStoryStats& stats
47+
);
48+
49+
// start:
50+
// end:
51+
void checkpoint_56(
52+
SingleSwitchProgramEnvironment& env,
53+
ProControllerContext& context,
54+
EventNotificationOption& notif_status_update,
55+
AutoStoryStats& stats
56+
);
57+
58+
// start:
59+
// end:
60+
void checkpoint_57(
61+
SingleSwitchProgramEnvironment& env,
62+
ProControllerContext& context,
63+
EventNotificationOption& notif_status_update,
64+
AutoStoryStats& stats
65+
);
66+
67+
// start:
68+
// end:
69+
void checkpoint_58(
70+
SingleSwitchProgramEnvironment& env,
71+
ProControllerContext& context,
72+
EventNotificationOption& notif_status_update,
73+
AutoStoryStats& stats
74+
);
75+
76+
// start:
77+
// end:
78+
void checkpoint_59(
79+
SingleSwitchProgramEnvironment& env,
80+
ProControllerContext& context,
81+
EventNotificationOption& notif_status_update,
82+
AutoStoryStats& stats
83+
);
84+
85+
// start:
86+
// end:
87+
void checkpoint_60(
88+
SingleSwitchProgramEnvironment& env,
89+
ProControllerContext& context,
90+
EventNotificationOption& notif_status_update,
91+
AutoStoryStats& stats
92+
);
93+
94+
3095

3196

3297
}

0 commit comments

Comments
 (0)