ryland 1 год назад
Родитель
Сommit
46d306dfdb
3 измененных файлов с 15 добавлено и 0 удалено
  1. 2 0
      tasks/Secret/assets.py
  2. 4 0
      tasks/Secret/script_task.py
  3. 9 0
      tasks/Secret/se/ocr.json

+ 2 - 0
tasks/Secret/assets.py

@@ -49,6 +49,8 @@ class SecretAssets:
 	O_SE_JADE = RuleOcr(roi=(327,230,23,24), area=(327,230,23,24), mode="Digit", method="Default", keyword="", name="se_jade")
 	# 金币 
 	O_SE_GOLD = RuleOcr(roi=(363,226,48,21), area=(363,226,48,21), mode="Digit", method="Default", keyword="", name="se_gold")
+	# 总耗时 
+	O_SE_TOTAL_TIME = RuleOcr(roi=(289,650,149,38), area=(289,650,149,38), mode="Single", method="Default", keyword="", name="se_total_time")
 
 
 	# Swipe Rule Assets

+ 4 - 0
tasks/Secret/script_task.py

@@ -83,6 +83,10 @@ class ScriptTask(GameUi, GeneralBattle, SwitchSoul, SecretAssets):
                 if self.appear(WeeklyTriflesAssets.I_WT_SE_SHARE):
                     logger.warning('You have completed the weekly trifles, skip')
                     break
+                text = self.O_SE_TOTAL_TIME.ocr_single(self.device.image)
+                if '总耗时' in text:
+                    logger.warning('You have completed the weekly trifles, skip')
+                    break
                 continue
             if layer >= 6:
                 first_battle = False

+ 9 - 0
tasks/Secret/se/ocr.json

@@ -70,5 +70,14 @@
     "method": "Default",
     "keyword": "",
     "description": "金币"
+  },
+  {
+    "itemName": "se_total_time",
+    "roiFront": "289,650,149,38",
+    "roiBack": "289,650,149,38",
+    "mode": "Single",
+    "method": "Default",
+    "keyword": "",
+    "description": "总耗时"
   }
 ]