Skip to content

Commit 0c6e8a7

Browse files
author
Gin
committed
address too many A mashing while teleporting in Hyperspace
1 parent 28b7f69 commit 0c6e8a7

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

SerialPrograms/Source/PokemonLZA/Programs/PokemonLZA_BasicNavigation.cpp

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,36 @@ FastTravelState fly_from_map(ConsoleHandle& console, ProControllerContext& conte
258258
}
259259

260260
OverworldPartySelectionWatcher overworld(COLOR_WHITE, &console.overlay());
261+
BlueDialogWatcher blue_dialog(COLOR_BLUE, &console.overlay());
261262
int ret = wait_until(
262263
console, context, 30s, // set 30sec to be long enough for Switch 1 to load the overworld
263-
{overworld,}
264+
{overworld, blue_dialog}
264265
);
265266
switch (ret){
266267
case 0:
267268
console.log("Flying from map... Done!");
268269
console.overlay().add_log("Fast Travel Done");
269270
break;
271+
case 1:
272+
console.log("Detected blue dialog. Rare by probably too many button A mashing to trigger return to Lumiose dialog while teleporting to Hyperspace portal");
273+
ret = run_until<ProControllerContext>(
274+
console, context,
275+
[](ProControllerContext& context){
276+
pbf_mash_button(context, BUTTON_B, 5s);
277+
},
278+
{{overworld}}
279+
);
280+
if (ret != 0){
281+
OperationFailedException::fire(
282+
ErrorReport::SEND_ERROR_REPORT,
283+
"fly_from_map(): Does not detect overworld after encountering blue dialog.",
284+
console
285+
);
286+
}
287+
console.log("Flying from map... Done!");
288+
console.overlay().add_log("Fast Travel Done");
289+
break;
270290
default:
271-
// return false;
272291
OperationFailedException::fire(
273292
ErrorReport::SEND_ERROR_REPORT,
274293
"fly_from_map(): Does not detect overworld after fast travel.",

0 commit comments

Comments
 (0)