mirror of
https://github.com/ok-oldking/ok-wuthering-waves.git
synced 2025-06-06 17:05:54 +00:00
fix #60
This commit is contained in:
parent
a908c74ec3
commit
2b8888e610
@ -136,14 +136,7 @@ class FiveToOneTask(BaseCombatTask):
|
|||||||
y + self.echo_x_distance / 3),
|
y + self.echo_x_distance / 3),
|
||||||
wait_until_before_delay=0.8, raise_if_not_found=True)
|
wait_until_before_delay=0.8, raise_if_not_found=True)
|
||||||
|
|
||||||
sets = find_boxes_by_name(texts, self.sets)
|
set_name = self.find_set_name(texts)
|
||||||
if not sets:
|
|
||||||
set_name = self.find_set_by_template()
|
|
||||||
if not set_name:
|
|
||||||
self.log_error(f'无法识别声骸套装, 需要打开角色声骸界面,右上角点击切换一下简述', notify=True)
|
|
||||||
return False
|
|
||||||
else:
|
|
||||||
set_name = sets[0].name
|
|
||||||
|
|
||||||
cost = self.find_cost(texts)
|
cost = self.find_cost(texts)
|
||||||
|
|
||||||
@ -179,6 +172,18 @@ class FiveToOneTask(BaseCombatTask):
|
|||||||
lock_count += 1
|
lock_count += 1
|
||||||
return lock_count
|
return lock_count
|
||||||
|
|
||||||
|
def find_set_name(self, texts=None):
|
||||||
|
if texts is None:
|
||||||
|
texts = self.ocr_echo_texts()
|
||||||
|
sets = find_boxes_by_name(texts, self.sets)
|
||||||
|
if not sets:
|
||||||
|
set_name = self.find_set_by_template()
|
||||||
|
if not set_name:
|
||||||
|
raise Exception(f'无法识别声骸套装, 需要打开角色声骸界面,右上角点击切换一下简述')
|
||||||
|
else:
|
||||||
|
set_name = sets[0].name
|
||||||
|
return set_name
|
||||||
|
|
||||||
def loop_merge(self, skip_go_into_ui=False, start_col=0):
|
def loop_merge(self, skip_go_into_ui=False, start_col=0):
|
||||||
if not skip_go_into_ui:
|
if not skip_go_into_ui:
|
||||||
self.go_into_merge_ui()
|
self.go_into_merge_ui()
|
||||||
@ -234,7 +239,8 @@ class FiveToOneTask(BaseCombatTask):
|
|||||||
max_conf = 0
|
max_conf = 0
|
||||||
max_name = None
|
max_name = None
|
||||||
for i in range(len(self.sets)):
|
for i in range(len(self.sets)):
|
||||||
feature = self.find_one(f'set_name_{i}', box=box, threshold=0.65, mask_function=mask_circle)
|
feature = self.find_one(f'set_name_{i}', box=box,
|
||||||
|
threshold=0.55, mask_function=mask_circle)
|
||||||
if feature and feature.confidence > max_conf:
|
if feature and feature.confidence > max_conf:
|
||||||
max_conf = feature.confidence
|
max_conf = feature.confidence
|
||||||
max_name = self.sets[i]
|
max_name = self.sets[i]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user