Pārlūkot izejas kodu

fix(SoulsTidy): 无法进入御魂界面

- 新增御魂关闭状态图片匹配规则 I_ST_SOULS_CLOSE
- 在图像配置文件中添加御魂关闭状态模板定义
- 修改脚本逻辑以检测并点击御魂关闭状态
- 调整点击间隔时间优化操作流程
AzurTian 8 mēneši atpakaļ
vecāks
revīzija
e17d32c120

+ 3 - 1
tasks/SoulsTidy/assets.py

@@ -50,8 +50,10 @@ class SoulsTidyAssets:
 	I_ST_GOLD = RuleImage(roi_front=(170,100,950,500), roi_back=(170,100,950,500), threshold=0.9, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_gold.png")
 	# 御魂溢出 
 	I_ST_SOUL_OVERFLOW = RuleImage(roi_front=(447,260,384,42), roi_back=(447,260,384,42), threshold=0.8, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_soul_overflow.png")
-	# 狗粮御魂的堆叠标识 
+	# 狗粮御魂的堆叠标识
 	I_ST_SOUL_STACK = RuleImage(roi_front=(142,234,20,16), roi_back=(142,234,20,16), threshold=0.8, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_soul_stack.png")
+	# 御魂关闭状态
+	I_ST_SOULS_CLOSE = RuleImage(roi_front=(1180,227,56,83), roi_back=(1158,190,104,155), threshold=0.8, method="Template matching", file="./tasks/SoulsTidy/simple/simple_st_souls_close.png")
 
 
 	# Long Click Rule Assets

+ 3 - 1
tasks/SoulsTidy/script_task.py

@@ -42,7 +42,9 @@ class ScriptTask(GameUi, SoulsTidyAssets):
                 continue
             if self.appear_then_click(self.I_ST_SOULS, interval=1):
                 continue
-            if self.click(self.C_ST_DETAIL, interval=1.5):
+            if self.appear_then_click(self.I_ST_SOULS_CLOSE, interval=1):
+                continue
+            if self.click(self.C_ST_DETAIL, interval=2):
                 continue
         # 御魂超过上限的提示
         self.ocr_appear_click(self.O_ST_OVERFLOW)

+ 9 - 0
tasks/SoulsTidy/simple/image.json

@@ -151,5 +151,14 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "狗粮御魂的堆叠标识"
+  },
+  {
+    "itemName": "st_souls_close",
+    "imageName": "simple_st_souls_close.png",
+    "roiFront": "1180,227,56,83",
+    "roiBack": "1166,215,84,107",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "御魂关闭状态"
   }
 ]

BIN
tasks/SoulsTidy/simple/simple_st_souls_close.png