Skip to content

Commit

Permalink
修复遭遇战可能会卡住
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed Jul 7, 2024
1 parent 1ff7055 commit ae3ea66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion task/NewManXunTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def do_handle_dialog(self, choice):
self.wait_until(lambda: self.ocr(box=self.box_of_screen(0, 0, width=0.2, height=0.2)),
pre_action=lambda: self.click_relative(0.5, 0.1), time_out=90)
raise FinishedException()
elif len(ups) > 2:
elif len(ups) > 1:
stats = []
for up in ups:
stats.append(remove_non_digits_and_convert(up.find_closest_box('up', boxes).name))
Expand All @@ -264,6 +264,7 @@ def do_handle_dialog(self, choice):
else:
self.log_info('点击开战')
self.click_box(kaizhan)
self.wait_ocr(box=self.dialog_zone, match=re.compile("深度"), time_out=60)
self.do_handle_dialog(choice)
elif confirm := find_boxes_by_name(boxes, "技能获取"):
self.handle_skill_dialog(boxes, confirm)
Expand Down

0 comments on commit ae3ea66

Please sign in to comment.