Skip to content

Commit 4c1500a

Browse files
committed
final checkpoint: handle Koraidon/Miraidon form change tutorial
1 parent 90856f1 commit 4c1500a

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
*
55
*/
66

7-
#include "PokemonSV/Programs/Battles/PokemonSV_SinglesBattler.h"
7+
#include "PokemonSV/Programs/Battles/PokemonSV_SinglesBattler.h"
8+
#include "PokemonSV/Inference/PokemonSV_TutorialDetector.h"
89

910
#include "CommonFramework/Exceptions/OperationFailedException.h"
1011
#include "CommonTools/Async/InferenceRoutines.h"
@@ -148,6 +149,26 @@ void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& c
148149

149150
mash_button_till_overworld(env.console, context, BUTTON_A, 800);
150151

152+
env.console.log("Clear Koraidon/Miraidon form change tutorial.");
153+
// Press X until tutorial shows up
154+
TutorialWatcher tutorial;
155+
int ret = run_until<ProControllerContext>(
156+
env.console, context,
157+
[](ProControllerContext& context){
158+
for (int i = 0; i < 10; i++){
159+
pbf_press_button(context, BUTTON_X, 20, 250);
160+
}
161+
},
162+
{tutorial}
163+
);
164+
if (ret < 0){
165+
OperationFailedException::fire(
166+
ErrorReport::SEND_ERROR_REPORT,
167+
"Stuck trying to clear the Koraidon/Miraidon form change tutorial.",
168+
env.console
169+
);
170+
}
171+
clear_tutorial(env.console, context);
151172

152173

153174
});

0 commit comments

Comments
 (0)