mirror of
https://github.com/ok-oldking/ok-wuthering-waves.git
synced 2025-06-05 08:25:28 +00:00
refactor: use walk_until_f
This commit is contained in:
parent
4c0786b38f
commit
3eb423fb35
@ -192,12 +192,8 @@ class BaseWWTask(BaseTask, FindFeature, OCR):
|
||||
highest_index = 0
|
||||
threshold = 0.02
|
||||
for i in range(4):
|
||||
if self.find_f_with_text(target_text=self.absorb_echo_text):
|
||||
self.send_key('f')
|
||||
if not self.handle_claim_button():
|
||||
logger.debug(f'farm echo found echo before turn and find')
|
||||
self.sleep(0.5)
|
||||
return True
|
||||
if self.walk_until_f(target_text=self.absorb_echo_text(), raise_if_not_found=False):
|
||||
return True
|
||||
self.middle_click_relative(0.5, 0.5, down_time=0.2)
|
||||
self.sleep(1)
|
||||
color_percent = self.calculate_color_percentage(echo_color, box)
|
||||
|
Loading…
x
Reference in New Issue
Block a user