Przeglądaj źródła

fix(RichMan): Update images of shrine

huangrunheng 2 lat temu
rodzic
commit
6e2d2ad50b

+ 4 - 0
tasks/RichMan/assets.py

@@ -331,6 +331,10 @@ class RichManAssets:
 	I_S_CHECK_WHITE_FIVE = RuleImage(roi_front=(810,222,109,182), roi_back=(810,222,109,182), threshold=0.8, method="Template matching", file="./tasks/RichMan/shrine/shrine_s_check_white_five.png")
 	# description 
 	I_S_CHECK_WHITE_FOUR = RuleImage(roi_front=(808,222,113,181), roi_back=(808,222,113,181), threshold=0.8, method="Template matching", file="./tasks/RichMan/shrine/shrine_s_check_white_four.png")
+	# description 
+	I_CENTER1 = RuleImage(roi_front=(1101,621,48,51), roi_back=(1072,596,100,100), threshold=0.8, method="Template matching", file="./tasks/RichMan/shrine/shrine_center1.png")
+	# description 
+	I_CENTER2 = RuleImage(roi_front=(76,590,79,75), roi_back=(65,575,100,100), threshold=0.8, method="Template matching", file="./tasks/RichMan/shrine/shrine_center2.png")
 
 
 	# Ocr Rule Assets

+ 5 - 1
tasks/RichMan/shrine.py

@@ -25,7 +25,11 @@ class Shrine(GameUi, RichManAssets):
             self.screenshot()
             if self.appear(self.I_S_NEXT_PERIOD):
                 break
-            if self.click(self.C_C_SHRINE, interval=1):
+            # if self.click(self.C_C_SHRINE, interval=1):
+            #     continue
+            if self.appear_then_click(self.I_CENTER1, interval=1):
+                continue
+            if self.appear_then_click(self.I_CENTER2, interval=1):
                 continue
         logger.info('Enter Shrine')
         time.sleep(0.5)

+ 18 - 0
tasks/RichMan/shrine/image.json

@@ -124,5 +124,23 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
+  },
+  {
+    "itemName": "center1",
+    "imageName": "shrine_center1.png",
+    "roiFront": "1101,621,48,51",
+    "roiBack": "1072,596,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "center2",
+    "imageName": "shrine_center2.png",
+    "roiFront": "76,590,79,75",
+    "roiBack": "65,575,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
   }
 ]

BIN
tasks/RichMan/shrine/shrine_center1.png


BIN
tasks/RichMan/shrine/shrine_center2.png