Răsfoiți Sursa

fix(TalismanPass): 修复部分庭院无法领取1500天御魂奖励

yuyuyuyuyu 9 luni în urmă
părinte
comite
f6592adbaa

+ 2 - 0
tasks/TalismanPass/assets.py

@@ -39,5 +39,7 @@ class TalismanPassAssets:
 	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")
 	# 六星御魂标志 
 	I_TP_SOUL_3 = RuleImage(roi_front=(313,489,188,33), roi_back=(302,472,216,60), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_soul_3.png")
+	# description 
+	I_TP_SOUL_1B = RuleImage(roi_front=(248,501,34,37), roi_back=(160,392,936,180), threshold=0.7, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_soul_1b.png")
 
 

+ 9 - 2
tasks/TalismanPass/script_task.py

@@ -104,8 +104,15 @@ class ScriptTask(GameUi, TalismanPassAssets):
             self.screenshot()
             # 自选御魂
             if self.appear(self.I_TP_SOUL_1):
-                logger.info('Select soul 2')
-                self.ui_click(self.I_TP_SOUL_1, stop=self.I_TP_SOUL_2)
+                current = self.I_TP_SOUL_1
+                logger.info('Select soul (type 1)')
+            elif self.appear(self.I_TP_SOUL_1B):
+                current = self.I_TP_SOUL_1B
+                logger.info('Select soul (type 2)')
+            else:
+                current = None
+            if current:
+                self.ui_click(current, stop=self.I_TP_SOUL_2)
                 self.ui_click(self.I_TP_SOUL_2, stop=self.I_TP_SOUL_3, interval=3)
                 self.ui_click_until_disappear(click=self.I_TP_SOUL_3)
                 timer_harvest.reset()

+ 9 - 0
tasks/TalismanPass/tp/image.json

@@ -124,5 +124,14 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "六星御魂标志"
+  },
+  {
+    "itemName": "tp_soul_1b",
+    "imageName": "tp_tp_soul_1b.png",
+    "roiFront": "248,501,34,37",
+    "roiBack": "160,392,936,180",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "description"
   }
 ]

BIN
tasks/TalismanPass/tp/tp_tp_soul_1b.png