@@ -39,7 +39,7 @@ std::string AutoStory_Segment_22::start_text() const{
3939}
4040
4141std::string AutoStory_Segment_22::end_text () const {
42- return " End: " ;
42+ return " End: Defeated Team Star (Fire). At East Province (Area One) Pokecenter. " ;
4343}
4444
4545void AutoStory_Segment_22::run_segment (
@@ -56,6 +56,7 @@ void AutoStory_Segment_22::run_segment(
5656
5757 checkpoint_47 (env, context, options.notif_status_update );
5858 checkpoint_48 (env, context, options.notif_status_update );
59+ checkpoint_49 (env, context, options.notif_status_update );
5960
6061 context.wait_for_all_requests ();
6162 env.console .log (" End Segment " + name (), COLOR_GREEN);
@@ -288,7 +289,6 @@ void checkpoint_48(
288289}
289290
290291
291- // todo: uncomment checkpoint_save
292292void checkpoint_49 (
293293 SingleSwitchProgramEnvironment& env,
294294 ProControllerContext& context,
@@ -299,7 +299,7 @@ void checkpoint_49(
299299 while (true ){
300300 try {
301301 if (first_attempt){
302- // checkpoint_save(env, context, notif_status_update);
302+ checkpoint_save (env, context, notif_status_update);
303303 first_attempt = false ;
304304 }else {
305305 enter_menu_from_overworld (env.program_info (), env.console , context, -1 );
@@ -310,6 +310,102 @@ void checkpoint_49(
310310 }
311311
312312 context.wait_for_all_requests ();
313+ // marker 1
314+ realign_player_from_landmark (
315+ env.program_info (), env.console , context,
316+ {ZoomChange::KEEP_ZOOM, 255 , 128 , 30 },
317+ {ZoomChange::ZOOM_IN, 0 , 90 , 90 }
318+ );
319+ handle_when_stationary_in_overworld (env.program_info (), env.console , context,
320+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
321+ overworld_navigation (env.program_info (), env.console , context,
322+ NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
323+ 128 , 0 , 30 , 10 , false );
324+ },
325+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
326+ pbf_move_left_joystick (context, 0 , 128 , 40 , 50 );
327+ realign_player (env.program_info (), env.console , context, PlayerRealignMode::REALIGN_OLD_MARKER);
328+ }
329+ );
330+
331+ // marker 2
332+ realign_player_from_landmark (
333+ env.program_info (), env.console , context,
334+ {ZoomChange::KEEP_ZOOM, 128 , 0 , 30 },
335+ {ZoomChange::ZOOM_IN, 128 , 255 , 30 }
336+ );
337+ handle_when_stationary_in_overworld (env.program_info (), env.console , context,
338+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
339+ overworld_navigation (env.program_info (), env.console , context,
340+ NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
341+ 128 , 0 , 30 , 10 , false );
342+ },
343+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
344+ pbf_move_left_joystick (context, 255 , 128 , 40 , 50 );
345+ realign_player (env.program_info (), env.console , context, PlayerRealignMode::REALIGN_OLD_MARKER);
346+ }
347+ );
348+
349+ // marker 3
350+ realign_player_from_landmark (
351+ env.program_info (), env.console , context,
352+ {ZoomChange::KEEP_ZOOM, 255 , 180 , 50 },
353+ {ZoomChange::ZOOM_IN, 0 , 70 , 175 }
354+ );
355+ handle_when_stationary_in_overworld (env.program_info (), env.console , context,
356+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
357+ overworld_navigation (env.program_info (), env.console , context,
358+ NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
359+ 128 , 0 , 30 , 10 , false );
360+ },
361+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
362+ pbf_move_left_joystick (context, 255 , 128 , 40 , 50 );
363+ realign_player (env.program_info (), env.console , context, PlayerRealignMode::REALIGN_OLD_MARKER);
364+ }
365+ );
366+
367+ // marker 4
368+ realign_player_from_landmark (
369+ env.program_info (), env.console , context,
370+ {ZoomChange::KEEP_ZOOM, 255 , 180 , 50 },
371+ {ZoomChange::ZOOM_IN, 0 , 50 , 185 }
372+ );
373+ // walk until you run into the wall
374+ overworld_navigation (env.program_info (), env.console , context,
375+ NavigationStopCondition::STOP_TIME, NavigationMovementMode::DIRECTIONAL_ONLY,
376+ 128 , 0 , 10 , 10 , false );
377+
378+
379+ // marker 5. put marker on other side of bridge
380+ realign_player_from_landmark (
381+ env.program_info (), env.console , context,
382+ {ZoomChange::ZOOM_IN, 128 , 128 , 0 },
383+ {ZoomChange::ZOOM_IN, 128 , 0 , 10 }
384+ );
385+ handle_when_stationary_in_overworld (env.program_info (), env.console , context,
386+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
387+ overworld_navigation (env.program_info (), env.console , context,
388+ NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
389+ 128 , 0 , 30 , 10 , false );
390+ },
391+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
392+ pbf_move_left_joystick (context, 0 , 128 , 40 , 50 );
393+ realign_player (env.program_info (), env.console , context, PlayerRealignMode::REALIGN_OLD_MARKER);
394+ }
395+ );
396+
397+
398+ // marker 6. set marker past pokecenter
399+ handle_unexpected_battles (env.program_info (), env.console , context,
400+ [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
401+ realign_player (env.program_info (), env.console , context, PlayerRealignMode::REALIGN_NEW_MARKER, 255 , 255 , 30 );
402+ });
403+ overworld_navigation (env.program_info (), env.console , context,
404+ NavigationStopCondition::STOP_TIME, NavigationMovementMode::DIRECTIONAL_ONLY,
405+ 128 , 15 , 12 , 12 , false ); // can't wrap in handle_when_stationary_in_overworld(), since we expect to be stationary when walking into the pokecenter
406+
407+
408+ fly_to_overlapping_flypoint (env.program_info (), env.console , context);
313409
314410
315411
0 commit comments