@@ -685,13 +685,22 @@ void run_from_tera_battle(const ProgramInfo& info, VideoStream& stream, ProContr
685685 }
686686
687687 TeraBattleMenuWatcher battle_menu (COLOR_GREEN);
688+ GradientArrowWatcher leave_confirm (
689+ COLOR_RED,
690+ GradientArrowType::RIGHT,
691+ {0.557621 , 0.471074 , 0.388476 , 0.247934 }
692+ );
688693 OverworldWatcher overworld (stream.logger (), COLOR_CYAN);
689694 context.wait_for_all_requests ();
690695
691696 int ret = wait_until (
692697 stream, context,
693698 std::chrono::minutes (1 ),
694- {battle_menu, overworld}
699+ {
700+ battle_menu,
701+ leave_confirm,
702+ overworld,
703+ }
695704 );
696705
697706 context.wait_for (std::chrono::milliseconds (100 ));
@@ -700,9 +709,13 @@ void run_from_tera_battle(const ProgramInfo& info, VideoStream& stream, ProContr
700709 stream.log (" Detected tera raid battle menu, running away..." );
701710 stream.overlay ().add_log (" Running away..." , COLOR_WHITE);
702711 battle_menu.move_to_slot (stream, context, 2 );
703- pbf_mash_button (context, BUTTON_A, 800 );
712+ pbf_press_button (context, BUTTON_A, 160ms, 80ms );
704713 continue ;
705714 case 1 :
715+ stream.log (" Detected leave confirm." );
716+ pbf_press_button (context, BUTTON_A, 160ms, 80ms);
717+ continue ;
718+ case 2 :
706719 stream.log (" Detected overworld." );
707720 return ;
708721 default :
0 commit comments