Просмотр исходного кода

fix(task): TalismanPass get reward template

runhey 3 лет назад
Родитель
Сommit
b45a6eaf21

+ 2 - 2
tasks/GameUi/additional/mall.json

@@ -2,8 +2,8 @@
   {
   {
     "itemName": "ad_close_red",
     "itemName": "ad_close_red",
     "imageName": "additional_ad_close_red.png",
     "imageName": "additional_ad_close_red.png",
-    "roiFront": "994,128,33,36",
-    "roiBack": "994,128,33,36",
+    "roiFront": "993,130,33,36",
+    "roiBack": "953,91,215,121",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "商店弹窗红色关闭"
     "description": "商店弹窗红色关闭"

+ 1 - 1
tasks/GameUi/assets.py

@@ -19,7 +19,7 @@ class GameUiAssets:
 
 
 	# Image Rule Assets
 	# Image Rule Assets
 	# 商店弹窗红色关闭 
 	# 商店弹窗红色关闭 
-	I_AD_CLOSE_RED = RuleImage(roi_front=(994,128,33,36), roi_back=(994,128,33,36), threshold=0.8, method="Template matching", file="./tasks/GameUi/additional/additional_ad_close_red.png")
+	I_AD_CLOSE_RED = RuleImage(roi_front=(993,130,33,36), roi_back=(953,91,215,121), threshold=0.8, method="Template matching", file="./tasks/GameUi/additional/additional_ad_close_red.png")
 
 
 
 
 	# Image Rule Assets
 	# Image Rule Assets

+ 2 - 2
tasks/Restart/script_task.py

@@ -50,10 +50,10 @@ if __name__ == '__main__':
     from module.config.config import Config
     from module.config.config import Config
     from module.device.device import Device
     from module.device.device import Device
 
 
-    config = Config('oas1')
+    config = Config('oas2')
     device = Device(config)
     device = Device(config)
     task = ScriptTask(config, device)
     task = ScriptTask(config, device)
-    task.app_start()
+    task.app_restart()
 
 
 
 
 
 

+ 2 - 0
tasks/TalismanPass/assets.py

@@ -29,5 +29,7 @@ class TalismanPassAssets:
 	I_TP_LEVEL_3 = RuleImage(roi_front=(967,433,109,61), roi_back=(967,433,109,61), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_level_3.png")
 	I_TP_LEVEL_3 = RuleImage(roi_front=(967,433,109,61), roi_back=(967,433,109,61), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_level_3.png")
 	# 前往 
 	# 前往 
 	I_TP_GOTO = RuleImage(roi_front=(995,254,85,34), roi_back=(928,219,206,315), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_goto.png")
 	I_TP_GOTO = RuleImage(roi_front=(995,254,85,34), roi_back=(928,219,206,315), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_goto.png")
+	# 经验的 
+	I_TP_EXP = RuleImage(roi_front=(922,254,32,36), roi_back=(884,215,100,331), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_exp.png")
 
 
 
 

+ 3 - 1
tasks/TalismanPass/script_task.py

@@ -86,7 +86,9 @@ class ScriptTask(GameUi, TalismanPassAssets):
         :return:
         :return:
         """
         """
         self.screenshot()
         self.screenshot()
-        return self.appear(self.I_TP_GOTO)
+        if self.appear(self.I_TP_GOTO) or self.appear(self.I_TP_EXP):
+            return True
+        return False
 
 
 
 
 
 

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

@@ -79,5 +79,14 @@
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "前往"
     "description": "前往"
+  },
+  {
+    "itemName": "tp_exp",
+    "imageName": "tp_tp_exp.png",
+    "roiFront": "922,254,32,36",
+    "roiBack": "884,215,100,331",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "经验的"
   }
   }
 ]
 ]

BIN
tasks/TalismanPass/tp/tp_tp_exp.png