Ver código fonte

fix(WantedQuests): 适配悬赏封印新 UI 并清理孤立资产

- 重新提取悬赏封印及协作邀请相关模板,匹配游戏新版本界面
- 悬赏目标识别由精确匹配改为子串包含匹配,避免前缀动词导致漏判
- 单个任务追踪弹窗关闭按钮改用通用红叉 I_UI_BACK_RED
- 清理已失效孤立资产 C_WQ_TRACE_ONE_CLOSE/I_WQ_CHECK_TASK 及其 png
User 3 semanas atrás
pai
commit
921a2b8270

+ 40 - 44
tasks/WantedQuests/assets.py

@@ -21,11 +21,11 @@ class WantedQuestsAssets:
 
 	# Image Rule Assets
 	# description 
-	I_WQ_INVITE_1 = RuleImage(roi_front=(137,361,39,47), roi_back=(108,338,100,100), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_1.png")
+	I_WQ_INVITE_1 = RuleImage(roi_front=(103,397,37,38), roi_back=(79,366,146,104), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_1.png")
 	# description 
-	I_WQ_INVITE_2 = RuleImage(roi_front=(462,361,37,47), roi_back=(435,336,100,100), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_2.png")
+	I_WQ_INVITE_2 = RuleImage(roi_front=(386,399,31,35), roi_back=(355,368,157,108), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_2.png")
 	# description 
-	I_WQ_INVITE_3 = RuleImage(roi_front=(754,366,39,42), roi_back=(728,339,100,100), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_3.png")
+	I_WQ_INVITE_3 = RuleImage(roi_front=(671,402,37,37), roi_back=(640,368,176,105), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_invite_3.png")
 	# description 
 	I_WQ_FRIEND_1 = RuleImage(roi_front=(240,185,180,80), roi_back=(240,185,180,80), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/invite_wq_friend_1.png")
 	# description 
@@ -51,35 +51,35 @@ class WantedQuestsAssets:
 	# 邀请跨服好友,已选中状态,高亮状态 
 	I_WQ_INVITE_DIFF_SVR_HIGHLIGHT = RuleImage(roi_front=(260,70,120,90), roi_back=(260,70,120,90), threshold=0.9, method="Template matching", file="./tasks/WantedQuests/invite/wq_invite_diff_svr_highlight.png")
 	# 从左到右第一个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_GOLD_1 = RuleImage(roi_front=(195,505,180,90), roi_back=(195,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
+	I_WQ_COOPERATION_TYPE_GOLD_1 = RuleImage(roi_front=(127,527,180,90), roi_back=(127,527,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
 	# 从左到右第一个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_JADE_1 = RuleImage(roi_front=(195,505,180,90), roi_back=(195,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
+	I_WQ_COOPERATION_TYPE_JADE_1 = RuleImage(roi_front=(130,527,180,90), roi_back=(130,527,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
 	# 从左到右第一个协作任务的类型为狗粮 
-	I_WQ_COOPERATION_TYPE_DOG_FOOD_1 = RuleImage(roi_front=(195,505,180,90), roi_back=(195,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
+	I_WQ_COOPERATION_TYPE_DOG_FOOD_1 = RuleImage(roi_front=(131,526,180,90), roi_back=(131,526,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
 	# 从左到右第一个协作任务的类型为猫粮 
-	I_WQ_COOPERATION_TYPE_CAT_FOOD_1 = RuleImage(roi_front=(195,505,180,90), roi_back=(195,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
+	I_WQ_COOPERATION_TYPE_CAT_FOOD_1 = RuleImage(roi_front=(131,525,180,90), roi_back=(131,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
 	# 从左到右第一个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_SUSHI_1 = RuleImage(roi_front=(195,505,180,90), roi_back=(195,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
+	I_WQ_COOPERATION_TYPE_SUSHI_1 = RuleImage(roi_front=(130,525,180,90), roi_back=(130,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
 	# 从左到右第二个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_GOLD_2 = RuleImage(roi_front=(490,505,180,90), roi_back=(490,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
+	I_WQ_COOPERATION_TYPE_GOLD_2 = RuleImage(roi_front=(412,525,180,90), roi_back=(412,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
 	# 从左到右第二个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_JADE_2 = RuleImage(roi_front=(490,505,180,90), roi_back=(490,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
+	I_WQ_COOPERATION_TYPE_JADE_2 = RuleImage(roi_front=(413,525,180,90), roi_back=(413,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
 	# 从左到右第二个协作任务的类型为狗粮 
-	I_WQ_COOPERATION_TYPE_DOG_FOOD_2 = RuleImage(roi_front=(490,505,180,90), roi_back=(490,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
+	I_WQ_COOPERATION_TYPE_DOG_FOOD_2 = RuleImage(roi_front=(413,527,179,89), roi_back=(413,527,179,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
 	# 从左到右第二个协作任务的类型为猫粮 
-	I_WQ_COOPERATION_TYPE_CAT_FOOD_2 = RuleImage(roi_front=(490,505,180,90), roi_back=(490,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
+	I_WQ_COOPERATION_TYPE_CAT_FOOD_2 = RuleImage(roi_front=(412,525,180,90), roi_back=(412,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
 	# 从左到右第二个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_SUSHI_2 = RuleImage(roi_front=(490,505,180,90), roi_back=(490,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
+	I_WQ_COOPERATION_TYPE_SUSHI_2 = RuleImage(roi_front=(413,526,180,90), roi_back=(413,526,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
 	# 从左到右第三个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_GOLD_3 = RuleImage(roi_front=(790,505,180,90), roi_back=(790,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
+	I_WQ_COOPERATION_TYPE_GOLD_3 = RuleImage(roi_front=(693,524,180,90), roi_back=(693,524,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_gold.png")
 	# 从左到右第三个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_JADE_3 = RuleImage(roi_front=(790,505,180,90), roi_back=(790,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
+	I_WQ_COOPERATION_TYPE_JADE_3 = RuleImage(roi_front=(693,527,180,90), roi_back=(693,527,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_jade.png")
 	# 从左到右第三个协作任务的类型为狗粮 
-	I_WQ_COOPERATION_TYPE_DOG_FOOD_3 = RuleImage(roi_front=(790,505,180,90), roi_back=(790,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
+	I_WQ_COOPERATION_TYPE_DOG_FOOD_3 = RuleImage(roi_front=(694,525,180,90), roi_back=(694,525,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_dog_food.png")
 	# 从左到右第三个协作任务的类型为猫粮 
-	I_WQ_COOPERATION_TYPE_CAT_FOOD_3 = RuleImage(roi_front=(790,505,180,90), roi_back=(790,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
+	I_WQ_COOPERATION_TYPE_CAT_FOOD_3 = RuleImage(roi_front=(693,526,180,90), roi_back=(693,526,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_cat_food.png")
 	# 从左到右第三个协作任务的类型 
-	I_WQ_COOPERATION_TYPE_SUSHI_3 = RuleImage(roi_front=(790,505,180,90), roi_back=(790,505,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
+	I_WQ_COOPERATION_TYPE_SUSHI_3 = RuleImage(roi_front=(692,526,180,90), roi_back=(692,526,180,90), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/invite/wq_cooperation_type_sushi.png")
 
 
 	# Ocr Rule Assets
@@ -94,8 +94,6 @@ class WantedQuestsAssets:
 	C_SECRET_CHAT = RuleClick(roi_front=(597,296,59,100), roi_back=(597,296,59,100), name="secret_chat")
 	# 特殊的庭院需要点击,然后才能找到这个悬赏 
 	C_SPECIAL_MAIN = RuleClick(roi_front=(409,572,32,30), roi_back=(404,569,41,35), name="special_main")
-	# 关闭 单个任务追踪界面 所需点击 的  空白区域 
-	C_WQ_TRACE_ONE_CLOSE = RuleClick(roi_front=(170,30,400,100), roi_back=(170,30,400,100), name="wq_trace_one_close")
 
 
 	# Image Rule Assets
@@ -104,38 +102,36 @@ class WantedQuestsAssets:
 	# 勾号 
 	I_WQ_DONE = RuleImage(roi_front=(248,183,37,39), roi_back=(63,134,624,401), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_wq_done.png")
 	# 一键追踪 
-	I_TRACE_ENABLE = RuleImage(roi_front=(1097,588,101,70), roi_back=(1097,588,101,70), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_enable.png")
+	I_TRACE_ENABLE = RuleImage(roi_front=(1159,606,52,58), roi_back=(1075,518,198,196), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_enable.png")
 	# 取消追踪 
-	I_TRACE_DISABLE = RuleImage(roi_front=(1091,586,108,70), roi_back=(1091,586,108,70), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_disable.png")
+	I_TRACE_DISABLE = RuleImage(roi_front=(1154,609,68,58), roi_back=(1065,495,215,225), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_disable.png")
 	# 奖励宝箱 
 	I_WQ_BOX = RuleImage(roi_front=(48,187,43,38), roi_back=(12,78,108,496), threshold=0.7, method="Template matching", file="./tasks/WantedQuests/wq/wq_wq_box.png")
 	# 小号追踪 
-	I_TRACE_TRUE = RuleImage(roi_front=(173,187,28,29), roi_back=(173,187,28,29), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_true.png")
+	I_TRACE_TRUE = RuleImage(roi_front=(1148,571,77,69), roi_back=(1035,502,245,213), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_true.png")
 	# 小号不追踪 
-	I_TRACE_FALSE = RuleImage(roi_front=(170,186,31,32), roi_back=(170,186,31,32), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_false.png")
+	I_TRACE_FALSE = RuleImage(roi_front=(1152,569,83,79), roi_back=(1051,481,229,239), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_false.png")
 	# description 
-	I_GOTO_1 = RuleImage(roi_front=(978,234,87,45), roi_back=(978,234,87,60), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_1.png")
+	I_GOTO_1 = RuleImage(roi_front=(1075,287,62,29), roi_back=(1054,266,99,70), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_1.png")
 	# description 
-	I_GOTO_2 = RuleImage(roi_front=(979,305,88,43), roi_back=(979,305,88,58), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_2.png")
+	I_GOTO_2 = RuleImage(roi_front=(1074,363,60,31), roi_back=(1055,341,99,71), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_2.png")
 	# description 
-	I_GOTO_3 = RuleImage(roi_front=(994,396,58,30), roi_back=(979,373,88,62), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_3.png")
+	I_GOTO_3 = RuleImage(roi_front=(1074,439,56,29), roi_back=(1053,417,101,73), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_3.png")
 	# description 
-	I_GOTO_4 = RuleImage(roi_front=(979,447,87,42), roi_back=(979,447,87,57), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_4.png")
-	# 判断是否还有任务 
-	I_WQ_CHECK_TASK = RuleImage(roi_front=(110,154,21,125), roi_back=(73,122,69,459), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_wq_check_task.png")
+	I_GOTO_4 = RuleImage(roi_front=(1078,516,55,27), roi_back=(1054,488,100,76), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_goto_4.png")
 	# 庭院悬赏任务界面 单个任务点开后 左上角是否追踪 
-	I_WQ_TRACE_ONE_ENABLE = RuleImage(roi_front=(160,175,120,60), roi_back=(160,175,120,60), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_enable.png")
+	I_WQ_TRACE_ONE_ENABLE = RuleImage(roi_front=(1150,570,79,75), roi_back=(1047,500,233,220), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_enable.png")
 	# 庭院悬赏任务界面 单个任务点开后 左上角是否追踪 
-	I_WQ_TRACE_ONE_DISABLE = RuleImage(roi_front=(160,175,120,60), roi_back=(160,175,120,60), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_disable.png")
+	I_WQ_TRACE_ONE_DISABLE = RuleImage(roi_front=(1156,570,77,67), roi_back=(1055,488,225,232), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_disable.png")
 	# 庭院悬赏任务界面 单个任务点开后的界面 是否打开的 标志 
-	I_WQ_TRACE_ONE_CHECK_OPENED = RuleImage(roi_front=(510,175,210,60), roi_back=(510,175,210,60), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_check_opened.png")
+	I_WQ_TRACE_ONE_CHECK_OPENED = RuleImage(roi_front=(778,166,52,29), roi_back=(582,147,431,110), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_check_opened.png")
 	# 庭院悬赏任务界面 单个任务点开后的界面 是否为现世任务标志 
-	I_WQ_TRACE_ONE_REALWORLD = RuleImage(roi_front=(850,470,180,180), roi_back=(850,470,180,180), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_realworld.png")
+	I_WQ_TRACE_ONE_REALWORLD = RuleImage(roi_front=(1173,579,51,54), roi_back=(1037,517,243,203), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_realworld.png")
 
 
 	# Ocr Rule Assets
 	# 挑战券的数量 
-	O_WQ_NUMBER = RuleOcr(roi=(569,13,50,32), area=(569,13,50,32), mode="Digit", method="Default", keyword="", name="wq_number")
+	O_WQ_NUMBER = RuleOcr(roi=(541,14,97,33), area=(541,14,97,33), mode="Digit", method="Default", keyword="", name="wq_number")
 	# 悬赏封印 
 	O_WQ_WANTED = RuleOcr(roi=(15,116,85,401), area=(15,116,85,401), mode="Full", method="Default", keyword="", name="wq_wanted")
 	# Ocr-description 
@@ -151,23 +147,23 @@ class WantedQuestsAssets:
 	# 备用识别2 
 	O_WQ_NUM_UNKNOWN_2 = RuleOcr(roi=(34,406,65,24), area=(34,406,65,24), mode="Digit", method="Default", keyword="", name="wq_num_unknown_2")
 	# Ocr-description 
-	O_WQ_TYPE_1 = RuleOcr(roi=(544,248,55,36), area=(544,248,55,36), mode="Single", method="Default", keyword="", name="wq_type_1")
+	O_WQ_TYPE_1 = RuleOcr(roi=(645,283,55,36), area=(645,283,55,36), mode="Single", method="Default", keyword="", name="wq_type_1")
 	# Ocr-description 
-	O_WQ_TYPE_2 = RuleOcr(roi=(544,321,55,30), area=(544,321,55,30), mode="Single", method="Default", keyword="", name="wq_type_2")
+	O_WQ_TYPE_2 = RuleOcr(roi=(647,361,55,30), area=(647,361,55,30), mode="Single", method="Default", keyword="", name="wq_type_2")
 	# Ocr-description 
-	O_WQ_TYPE_3 = RuleOcr(roi=(544,392,54,30), area=(544,392,54,30), mode="Single", method="Default", keyword="", name="wq_type_3")
+	O_WQ_TYPE_3 = RuleOcr(roi=(648,437,54,30), area=(648,437,54,30), mode="Single", method="Default", keyword="", name="wq_type_3")
 	# Ocr-description 
-	O_WQ_TYPE_4 = RuleOcr(roi=(545,462,52,32), area=(545,462,52,32), mode="Single", method="Default", keyword="", name="wq_type_4")
+	O_WQ_TYPE_4 = RuleOcr(roi=(647,512,52,32), area=(647,512,52,32), mode="Single", method="Default", keyword="", name="wq_type_4")
 	# Ocr-description 
-	O_WQ_INFO_1 = RuleOcr(roi=(609,246,309,45), area=(609,246,309,45), mode="Single", method="Default", keyword="", name="wq_info_1")
+	O_WQ_INFO_1 = RuleOcr(roi=(710,279,309,45), area=(710,279,309,45), mode="Single", method="Default", keyword="", name="wq_info_1")
 	# Ocr-description 
-	O_WQ_INFO_2 = RuleOcr(roi=(612,318,298,41), area=(612,318,298,41), mode="Single", method="Default", keyword="", name="wq_info_2")
+	O_WQ_INFO_2 = RuleOcr(roi=(712,358,298,41), area=(712,358,298,41), mode="Single", method="Default", keyword="", name="wq_info_2")
 	# Ocr-description 
-	O_WQ_INFO_3 = RuleOcr(roi=(612,386,305,44), area=(612,386,305,44), mode="Single", method="Default", keyword="", name="wq_info_3")
+	O_WQ_INFO_3 = RuleOcr(roi=(710,430,305,44), area=(710,429,305,44), mode="Single", method="Default", keyword="", name="wq_info_3")
 	# Ocr-description 
-	O_WQ_INFO_4 = RuleOcr(roi=(613,456,315,44), area=(613,456,315,44), mode="Single", method="Default", keyword="", name="wq_info_4")
+	O_WQ_INFO_4 = RuleOcr(roi=(711,506,315,44), area=(711,507,315,44), mode="Single", method="Default", keyword="", name="wq_info_4")
 	# 怪物名称,如酒吞,阎魔等 
-	O_WQ_MONSTER_TYPE = RuleOcr(roi=(165,215,45,175), area=(165,215,45,175), mode="Full", method="Default", keyword="", name="wq_monster_type")
+	O_WQ_MONSTER_TYPE = RuleOcr(roi=(634,154,483,52), area=(634,154,483,52), mode="Full", method="Default", keyword="", name="wq_monster_type")
 	#  
 	O_WQ_TEXT_ALL = RuleOcr(roi=(12,119,88,393), area=(12,119,88,393), mode="Full", method="Default", keyword="", name="wq_text_all")
 

+ 36 - 36
tasks/WantedQuests/invite/image.json

@@ -2,8 +2,8 @@
   {
     "itemName": "wq_invite_1",
     "imageName": "invite_wq_invite_1.png",
-    "roiFront": "137,361,39,47",
-    "roiBack": "108,338,100,100",
+    "roiFront": "103,397,37,38",
+    "roiBack": "79,366,146,104",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -11,8 +11,8 @@
   {
     "itemName": "wq_invite_2",
     "imageName": "invite_wq_invite_2.png",
-    "roiFront": "462,361,37,47",
-    "roiBack": "435,336,100,100",
+    "roiFront": "386,399,31,35",
+    "roiBack": "355,368,157,108",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -20,8 +20,8 @@
   {
     "itemName": "wq_invite_3",
     "imageName": "invite_wq_invite_3.png",
-    "roiFront": "754,366,39,42",
-    "roiBack": "728,339,100,100",
+    "roiFront": "671,402,37,37",
+    "roiBack": "640,368,176,105",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -137,8 +137,8 @@
   {
     "itemName": "wq_cooperation_type_gold_1",
     "imageName": "wq_cooperation_type_gold.png",
-    "roiFront": "195,505,180,90",
-    "roiBack": "195,505,180,90",
+    "roiFront": "127,527,180,90",
+    "roiBack": "127,527,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第一个协作任务的类型"
@@ -146,8 +146,8 @@
   {
     "itemName": "wq_cooperation_type_jade_1",
     "imageName": "wq_cooperation_type_jade.png",
-    "roiFront": "195,505,180,90",
-    "roiBack": "195,505,180,90",
+    "roiFront": "130,527,180,90",
+    "roiBack": "130,527,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第一个协作任务的类型"
@@ -155,8 +155,8 @@
   {
     "itemName": "wq_cooperation_type_dog_food_1",
     "imageName": "wq_cooperation_type_dog_food.png",
-    "roiFront": "195,505,180,90",
-    "roiBack": "195,505,180,90",
+    "roiFront": "131,526,180,90",
+    "roiBack": "131,526,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第一个协作任务的类型为狗粮"
@@ -164,8 +164,8 @@
   {
     "itemName": "wq_cooperation_type_cat_food_1",
     "imageName": "wq_cooperation_type_cat_food.png",
-    "roiFront": "195,505,180,90",
-    "roiBack": "195,505,180,90",
+    "roiFront": "131,525,180,90",
+    "roiBack": "131,525,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第一个协作任务的类型为猫粮"
@@ -173,8 +173,8 @@
   {
     "itemName": "wq_cooperation_type_sushi_1",
     "imageName": "wq_cooperation_type_sushi.png",
-    "roiFront": "195,505,180,90",
-    "roiBack": "195,505,180,90",
+    "roiFront": "130,525,180,90",
+    "roiBack": "130,525,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第一个协作任务的类型"
@@ -182,8 +182,8 @@
   {
     "itemName": "wq_cooperation_type_gold_2",
     "imageName": "wq_cooperation_type_gold.png",
-    "roiFront": "490,505,180,90",
-    "roiBack": "490,505,180,90",
+    "roiFront": "412,525,180,90",
+    "roiBack": "412,525,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第二个协作任务的类型"
@@ -191,8 +191,8 @@
   {
     "itemName": "wq_cooperation_type_jade_2",
     "imageName": "wq_cooperation_type_jade.png",
-    "roiFront": "490,505,180,90",
-    "roiBack": "490,505,180,90",
+    "roiFront": "413,525,180,90",
+    "roiBack": "413,525,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第二个协作任务的类型"
@@ -200,8 +200,8 @@
   {
     "itemName": "wq_cooperation_type_dog_food_2",
     "imageName": "wq_cooperation_type_dog_food.png",
-    "roiFront": "490,505,180,90",
-    "roiBack": "490,505,180,90",
+    "roiFront": "413,527,179,89",
+    "roiBack": "413,527,179,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第二个协作任务的类型为狗粮"
@@ -209,8 +209,8 @@
   {
     "itemName": "wq_cooperation_type_cat_food_2",
     "imageName": "wq_cooperation_type_cat_food.png",
-    "roiFront": "490,505,180,90",
-    "roiBack": "490,505,180,90",
+    "roiFront": "412,525,180,90",
+    "roiBack": "412,525,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第二个协作任务的类型为猫粮"
@@ -218,8 +218,8 @@
   {
     "itemName": "wq_cooperation_type_sushi_2",
     "imageName": "wq_cooperation_type_sushi.png",
-    "roiFront": "490,505,180,90",
-    "roiBack": "490,505,180,90",
+    "roiFront": "413,526,180,90",
+    "roiBack": "413,526,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第二个协作任务的类型"
@@ -227,8 +227,8 @@
   {
     "itemName": "wq_cooperation_type_gold_3",
     "imageName": "wq_cooperation_type_gold.png",
-    "roiFront": "790,505,180,90",
-    "roiBack": "790,505,180,90",
+    "roiFront": "693,524,180,90",
+    "roiBack": "693,524,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第三个协作任务的类型"
@@ -236,8 +236,8 @@
   {
     "itemName": "wq_cooperation_type_jade_3",
     "imageName": "wq_cooperation_type_jade.png",
-    "roiFront": "790,505,180,90",
-    "roiBack": "790,505,180,90",
+    "roiFront": "693,527,180,90",
+    "roiBack": "693,527,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第三个协作任务的类型"
@@ -245,8 +245,8 @@
   {
     "itemName": "wq_cooperation_type_dog_food_3",
     "imageName": "wq_cooperation_type_dog_food.png",
-    "roiFront": "790,505,180,90",
-    "roiBack": "790,505,180,90",
+    "roiFront": "694,525,180,90",
+    "roiBack": "694,525,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第三个协作任务的类型为狗粮"
@@ -254,8 +254,8 @@
   {
     "itemName": "wq_cooperation_type_cat_food_3",
     "imageName": "wq_cooperation_type_cat_food.png",
-    "roiFront": "790,505,180,90",
-    "roiBack": "790,505,180,90",
+    "roiFront": "693,526,180,90",
+    "roiBack": "693,526,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第三个协作任务的类型为猫粮"
@@ -263,8 +263,8 @@
   {
     "itemName": "wq_cooperation_type_sushi_3",
     "imageName": "wq_cooperation_type_sushi.png",
-    "roiFront": "790,505,180,90",
-    "roiBack": "790,505,180,90",
+    "roiFront": "692,526,180,90",
+    "roiBack": "692,526,180,90",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "从左到右第三个协作任务的类型"

BIN
tasks/WantedQuests/invite/invite_wq_invite_1.png


BIN
tasks/WantedQuests/invite/invite_wq_invite_2.png


BIN
tasks/WantedQuests/invite/invite_wq_invite_3.png


+ 3 - 2
tasks/WantedQuests/script_task.py

@@ -225,7 +225,7 @@ class ScriptTask(WQExplore, SecretScriptTask, WantedQuestsAssets):
             # 防止点击后界面来不及刷新
             sleep(1.5)
         # 关闭单个任务的追踪界面
-        self.ui_click_until_smt_disappear(self.C_WQ_TRACE_ONE_CLOSE, stop=self.I_WQ_TRACE_ONE_CHECK_OPENED,
+        self.ui_click_until_smt_disappear(self.I_UI_BACK_RED, stop=self.I_WQ_TRACE_ONE_CHECK_OPENED,
                                           interval=1.5)
 
     def execute_mission(self, ocr, num_want: int, num_challenge: int):
@@ -308,7 +308,8 @@ class ScriptTask(WQExplore, SecretScriptTask, WantedQuestsAssets):
             return False
         # 跳过不想打的
         monster_name = self.O_WQ_MONSTER_TYPE.detect_text(self.device.image)
-        if monster_name in self.unwanted_boss_name_list:
+        # 识别串可能带前缀动词(如需要击败/击杀), 用子串包含匹配而非整串相等
+        if any(name in monster_name for name in self.unwanted_boss_name_list):
             #
             logger.warning(f'unwanted {monster_name}')
             self.ui_click(self.I_TRACE_TRUE, self.I_TRACE_FALSE)

+ 0 - 6
tasks/WantedQuests/wq/click.json

@@ -10,11 +10,5 @@
     "roiFront": "409,572,32,30",
     "roiBack": "404,569,41,35",
     "description": "特殊的庭院需要点击,然后才能找到这个悬赏"
-  },
-  {
-    "itemName": "wq_trace_one_close",
-    "roiFront": "170,30,400,100",
-    "roiBack": "170,30,400,100",
-    "description": "关闭 单个任务追踪界面 所需点击 的  空白区域"
   }
 ]

+ 24 - 33
tasks/WantedQuests/wq/image.json

@@ -20,8 +20,8 @@
   {
     "itemName": "trace_enable",
     "imageName": "wq_trace_enable.png",
-    "roiFront": "1097,588,101,70",
-    "roiBack": "1097,588,101,70",
+    "roiFront": "1159,606,52,58",
+    "roiBack": "1075,518,198,196",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "一键追踪"
@@ -29,8 +29,8 @@
   {
     "itemName": "trace_disable",
     "imageName": "wq_trace_disable.png",
-    "roiFront": "1091,586,108,70",
-    "roiBack": "1091,586,108,70",
+    "roiFront": "1154,609,68,58",
+    "roiBack": "1065,495,215,225",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "取消追踪"
@@ -47,8 +47,8 @@
   {
     "itemName": "trace_true",
     "imageName": "wq_trace_true.png",
-    "roiFront": "173,187,28,29",
-    "roiBack": "173,187,28,29",
+    "roiFront": "1148,571,77,69",
+    "roiBack": "1035,502,245,213",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "小号追踪"
@@ -56,8 +56,8 @@
   {
     "itemName": "trace_false",
     "imageName": "wq_trace_false.png",
-    "roiFront": "170,186,31,32",
-    "roiBack": "170,186,31,32",
+    "roiFront": "1152,569,83,79",
+    "roiBack": "1051,481,229,239",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "小号不追踪"
@@ -65,8 +65,8 @@
   {
     "itemName": "goto_1",
     "imageName": "wq_goto_1.png",
-    "roiFront": "978,234,87,45",
-    "roiBack": "978,234,87,60",
+    "roiFront": "1075,287,62,29",
+    "roiBack": "1054,266,99,70",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -74,8 +74,8 @@
   {
     "itemName": "goto_2",
     "imageName": "wq_goto_2.png",
-    "roiFront": "979,305,88,43",
-    "roiBack": "979,305,88,58",
+    "roiFront": "1074,363,60,31",
+    "roiBack": "1055,341,99,71",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -83,8 +83,8 @@
   {
     "itemName": "goto_3",
     "imageName": "wq_goto_3.png",
-    "roiFront": "994,396,58,30",
-    "roiBack": "979,373,88,62",
+    "roiFront": "1074,439,56,29",
+    "roiBack": "1053,417,101,73",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -92,26 +92,17 @@
   {
     "itemName": "goto_4",
     "imageName": "wq_goto_4.png",
-    "roiFront": "979,447,87,42",
-    "roiBack": "979,447,87,57",
+    "roiFront": "1078,516,55,27",
+    "roiBack": "1054,488,100,76",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
   },
-  {
-    "itemName": "wq_check_task",
-    "imageName": "wq_wq_check_task.png",
-    "roiFront": "110,154,21,125",
-    "roiBack": "73,122,69,459",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "判断是否还有任务"
-  },
   {
     "itemName": "wq_trace_one_enable",
     "imageName": "wq_trace_one_enable.png",
-    "roiFront": "160,175,120,60",
-    "roiBack": "160,175,120,60",
+    "roiFront": "1150,570,79,75",
+    "roiBack": "1047,500,233,220",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "庭院悬赏任务界面 单个任务点开后 左上角是否追踪"
@@ -119,8 +110,8 @@
   {
     "itemName": "wq_trace_one_disable",
     "imageName": "wq_trace_one_disable.png",
-    "roiFront": "160,175,120,60",
-    "roiBack": "160,175,120,60",
+    "roiFront": "1156,570,77,67",
+    "roiBack": "1055,488,225,232",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "庭院悬赏任务界面 单个任务点开后 左上角是否追踪"
@@ -128,8 +119,8 @@
   {
     "itemName": "wq_trace_one_check_opened",
     "imageName": "wq_trace_one_check_opened.png",
-    "roiFront": "510,175,210,60",
-    "roiBack": "510,175,210,60",
+    "roiFront": "778,166,52,29",
+    "roiBack": "582,147,431,110",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "庭院悬赏任务界面 单个任务点开后的界面 是否打开的 标志"
@@ -137,8 +128,8 @@
   {
     "itemName": "wq_trace_one_realworld",
     "imageName": "wq_trace_one_realworld.png",
-    "roiFront": "850,470,180,180",
-    "roiBack": "850,470,180,180",
+    "roiFront": "1173,579,51,54",
+    "roiBack": "1037,517,243,203",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "庭院悬赏任务界面 单个任务点开后的界面 是否为现世任务标志"

+ 20 - 20
tasks/WantedQuests/wq/ocr.json

@@ -1,8 +1,8 @@
 [
   {
     "itemName": "wq_number",
-    "roiFront": "569,13,50,32",
-    "roiBack": "569,13,50,32",
+    "roiFront": "541,14,97,33",
+    "roiBack": "541,14,97,33",
     "mode": "Digit",
     "method": "Default",
     "keyword": "",
@@ -73,8 +73,8 @@
   },
   {
     "itemName": "wq_type_1",
-    "roiFront": "544,248,55,36",
-    "roiBack": "544,248,55,36",
+    "roiFront": "645,283,55,36",
+    "roiBack": "645,283,55,36",
     "mode": "Single",
     "method": "Default",
     "keyword": "",
@@ -82,8 +82,8 @@
   },
   {
     "itemName": "wq_type_2",
-    "roiFront": "544,321,55,30",
-    "roiBack": "544,321,55,30",
+    "roiFront": "647,361,55,30",
+    "roiBack": "647,361,55,30",
     "mode": "Single",
     "method": "Default",
     "keyword": "",
@@ -91,8 +91,8 @@
   },
   {
     "itemName": "wq_type_3",
-    "roiFront": "544,392,54,30",
-    "roiBack": "544,392,54,30",
+    "roiFront": "648,437,54,30",
+    "roiBack": "648,437,54,30",
     "mode": "Single",
     "method": "Default",
     "keyword": "",
@@ -100,8 +100,8 @@
   },
   {
     "itemName": "wq_type_4",
-    "roiFront": "545,462,52,32",
-    "roiBack": "545,462,52,32",
+    "roiFront": "647,512,52,32",
+    "roiBack": "647,512,52,32",
     "mode": "Single",
     "method": "Default",
     "keyword": "",
@@ -109,8 +109,8 @@
   },
   {
     "itemName": "wq_info_1",
-    "roiFront": "609,246,309,45",
-    "roiBack": "609,246,309,45",
+    "roiFront": "710,279,309,45",
+    "roiBack": "710,279,309,45",
     "mode": "Single",
     "method": "Default",
     "keyword": "",
@@ -118,8 +118,8 @@
   },
   {
     "itemName": "wq_info_2",
-    "roiFront": "612,318,298,41",
-    "roiBack": "612,318,298,41",
+    "roiFront": "712,358,298,41",
+    "roiBack": "712,358,298,41",
     "mode": "Single",
     "method": "Default",
     "keyword": "",
@@ -127,8 +127,8 @@
   },
   {
     "itemName": "wq_info_3",
-    "roiFront": "612,386,305,44",
-    "roiBack": "612,386,305,44",
+    "roiFront": "710,430,305,44",
+    "roiBack": "710,429,305,44",
     "mode": "Single",
     "method": "Default",
     "keyword": "",
@@ -136,8 +136,8 @@
   },
   {
     "itemName": "wq_info_4",
-    "roiFront": "613,456,315,44",
-    "roiBack": "613,456,315,44",
+    "roiFront": "711,506,315,44",
+    "roiBack": "711,507,315,44",
     "mode": "Single",
     "method": "Default",
     "keyword": "",
@@ -145,8 +145,8 @@
   },
   {
     "itemName": "wq_monster_type",
-    "roiFront": "165,215,45,175",
-    "roiBack": "165,215,45,175",
+    "roiFront": "634,154,483,52",
+    "roiBack": "634,154,483,52",
     "mode": "Full",
     "method": "Default",
     "keyword": "",

BIN
tasks/WantedQuests/wq/wq_goto_1.png


BIN
tasks/WantedQuests/wq/wq_goto_2.png


BIN
tasks/WantedQuests/wq/wq_goto_3.png


BIN
tasks/WantedQuests/wq/wq_goto_4.png


BIN
tasks/WantedQuests/wq/wq_tarce_disenable.png


BIN
tasks/WantedQuests/wq/wq_trace_disable.png


BIN
tasks/WantedQuests/wq/wq_trace_enable.png


BIN
tasks/WantedQuests/wq/wq_trace_false.png


BIN
tasks/WantedQuests/wq/wq_trace_one_check_opened.png


BIN
tasks/WantedQuests/wq/wq_trace_one_disable.png


BIN
tasks/WantedQuests/wq/wq_trace_one_enable.png


BIN
tasks/WantedQuests/wq/wq_trace_one_realworld.png


BIN
tasks/WantedQuests/wq/wq_trace_true.png


BIN
tasks/WantedQuests/wq/wq_wq_check_task.png