فهرست منبع

fix(CostumeShikigami): 缩小预设点击范围
- 修复部分幕间第N组有概率切换到N+1组

yuyuyuyuyu 8 ماه پیش
والد
کامیت
28c3224017

+ 1 - 1
tasks/Restart/assets.py

@@ -39,7 +39,7 @@ class RestartAssets:
 	# 999签到福袋 
 	I_HARVEST_SIGN_999 = RuleImage(roi_front=(345,494,23,29), roi_back=(51,459,888,103), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_sign_999.png")
 	# 邮件小图标 
-	I_HARVEST_MAIL = RuleImage(roi_front=(337,505,37,25), roi_back=(38,465,880,89), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail.png")
+	I_HARVEST_MAIL = RuleImage(roi_front=(249,504,37,25), roi_back=(38,389,1006,164), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail.png")
 	# 全部收取 
 	I_HARVEST_MAIL_ALL = RuleImage(roi_front=(69,579,80,67), roi_back=(28,551,142,144), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail_all.png")
 	# 有些邮件需要点击一次 

+ 2 - 2
tasks/Restart/harvest/image.json

@@ -38,8 +38,8 @@
   {
     "itemName": "harvest_mail",
     "imageName": "harvest_harvest_mail.png",
-    "roiFront": "337,505,37,25",
-    "roiBack": "38,465,880,89",
+    "roiFront": "249,504,37,25",
+    "roiBack": "38,389,1006,164",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "邮件小图标"

+ 2 - 2
tasks/Restart/login.py

@@ -288,7 +288,7 @@ class LoginHandler(BaseTask, RestartAssets, GameUiAssets):
         self.O_LOGIN_SPECIFIC_SERVE.keyword = character
 
     def harvest_mail(self) -> bool:
-        if not self.appear(self.I_HARVEST_MAIL) and \
+        if not self.appear_multi_scale(self.I_HARVEST_MAIL,scale_range=(0.8, 1.1)) and \
                 not self.appear(self.I_HARVEST_MAIL_COPY):
             if not self.appear(self.I_READ_ALL_MAIL):
                 return False
@@ -297,7 +297,7 @@ class LoginHandler(BaseTask, RestartAssets, GameUiAssets):
             self.screenshot()
             if self.appear(self.I_READ_ALL_MAIL):
                 break
-            if self.appear_then_click(self.I_HARVEST_MAIL, interval=1.5):
+            if self.appear_then_click_multi_scale(self.I_HARVEST_MAIL, interval=1.5, scale_range=(0.8, 1.1)):
                 continue
             if self.appear_then_click(self.I_HARVEST_MAIL_COPY, interval=1.5):
                 continue

+ 1 - 1
tasks/TalismanPass/assets.py

@@ -34,7 +34,7 @@ class TalismanPassAssets:
 	# 溢出确认 
 	I_OVERFLOW_CONFIRME = RuleImage(roi_front=(585,410,116,44), roi_back=(585,410,116,44), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_overflow_confirme.png")
 	# 点击随机御魂 
-	I_TP_SOUL_1 = RuleImage(roi_front=(248,501,34,37), roi_back=(165,389,929,168), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_soul_1.png")
+	I_TP_SOUL_1 = RuleImage(roi_front=(248,501,34,37), roi_back=(165,389,929,168), threshold=0.7, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_soul_1.png")
 	# 选择中间第二个御魂 
 	I_TP_SOUL_2 = RuleImage(roi_front=(582,438,115,48), roi_back=(570,427,139,71), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_soul_2.png")
 	# 六星御魂标志 

+ 1 - 1
tasks/TalismanPass/script_task.py

@@ -103,7 +103,7 @@ class ScriptTask(GameUi, TalismanPassAssets):
         while 1:
             self.screenshot()
             # 自选御魂
-            if self.appear_multi_scale(self.I_TP_SOUL_1,threshold=0.7,scale_range=(0.8,1.1)):
+            if self.appear_multi_scale(self.I_TP_SOUL_1,scale_range=(0.8,1.1)):
                 logger.info('Select soul 2')
                 self.ui_click_multi_scale(self.I_TP_SOUL_1, stop=self.I_TP_SOUL_2,scale_range=(0.8,1.1))
                 self.ui_click(self.I_TP_SOUL_2, stop=self.I_TP_SOUL_3, interval=3)

+ 1 - 1
tasks/TalismanPass/tp/image.json

@@ -104,7 +104,7 @@
     "roiFront": "248,501,34,37",
     "roiBack": "165,389,929,168",
     "method": "Template matching",
-    "threshold": 0.8,
+    "threshold": 0.7,
     "description": "点击随机御魂"
   },
   {