huangrunheng 2 anni fa
parent
commit
2589b7f2ae

+ 4 - 0
tasks/KekkaiUtilize/assets.py

@@ -104,6 +104,10 @@ class KekkaiUtilizeAssets:
 	I_U_MOON_3 = RuleImage(roi_front=(549,305,53,53), roi_back=(535,173,77,430), threshold=0.8, method="Template matching", file="./tasks/KekkaiUtilize/utilize/utilize_u_moon_3.png")
 	I_U_MOON_3 = RuleImage(roi_front=(549,305,53,53), roi_back=(535,173,77,430), threshold=0.8, method="Template matching", file="./tasks/KekkaiUtilize/utilize/utilize_u_moon_3.png")
 	# description 
 	# description 
 	I_U_MOON_2 = RuleImage(roi_front=(552,313,46,44), roi_back=(542,174,81,437), threshold=0.8, method="Template matching", file="./tasks/KekkaiUtilize/utilize/utilize_u_moon_2.png")
 	I_U_MOON_2 = RuleImage(roi_front=(552,313,46,44), roi_back=(542,174,81,437), threshold=0.8, method="Template matching", file="./tasks/KekkaiUtilize/utilize/utilize_u_moon_2.png")
+	# description 
+	I_CHECK_FRIEND_REALM_1 = RuleImage(roi_front=(1059,17,90,21), roi_back=(1050,4,107,65), threshold=0.8, method="Template matching", file="./tasks/KekkaiUtilize/utilize/utilize_check_friend_realm_1.png")
+	# description 
+	I_CHECK_FRIEND_REALM_2 = RuleImage(roi_front=(590,143,44,52), roi_back=(538,106,161,158), threshold=0.8, method="Template matching", file="./tasks/KekkaiUtilize/utilize/utilize_check_friend_realm_2.png")
 
 
 
 
 	# Ocr Rule Assets
 	# Ocr Rule Assets

+ 7 - 5
tasks/KekkaiUtilize/script_task.py

@@ -406,13 +406,15 @@ class ScriptTask(GameUi, ReplaceShikigami, KekkaiUtilizeAssets):
             return
             return
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
-
-            if not self.appear(self.I_U_ENTER_REALM):
-                # 用不显示原按键来判断是否进入是很蠢的
-                time.sleep(0.5)
+            if self.appear(self.I_CHECK_FRIEND_REALM_1):
+                logger.info('Appear enter friend realm button')
                 break
                 break
 
 
-            if self.appear_then_click(self.I_U_ENTER_REALM, interval=1):
+            if self.appear_then_click(self.I_CHECK_FRIEND_REALM_2, interval=1.5):
+                logger.info('Click too fast to enter the friend\'s realm pool')
+                continue
+            if self.appear_then_click(self.I_U_ENTER_REALM, interval=2.5):
+                time.sleep(0.5)
                 continue
                 continue
         logger.info('Enter friend realm')
         logger.info('Enter friend realm')
 
 

+ 18 - 0
tasks/KekkaiUtilize/utilize/image_2.json

@@ -43,5 +43,23 @@
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
+  },
+  {
+    "itemName": "check_friend_realm_1",
+    "imageName": "utilize_check_friend_realm_1.png",
+    "roiFront": "1059,17,90,21",
+    "roiBack": "1050,4,107,65",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "check_friend_realm_2",
+    "imageName": "utilize_check_friend_realm_2.png",
+    "roiFront": "590,143,44,52",
+    "roiBack": "538,106,161,158",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
   }
   }
 ]
 ]

BIN
tasks/KekkaiUtilize/utilize/utilize_check_friend_realm_1.png


BIN
tasks/KekkaiUtilize/utilize/utilize_check_friend_realm_2.png