Răsfoiți Sursa

fix(SigRealms): #372

ryland 2 ani în urmă
părinte
comite
1b8da5d760

+ 1 - 0
tasks/SixRealms/README.md

@@ -10,6 +10,7 @@ skill101 柔风
 skill102 细雨
 skill103 暴虐
 skill104 妖力化身
+skill105 洞察之力
 
 island101 宁息 l101
 island102 神秘 l102

+ 2 - 0
tasks/SixRealms/assets.py

@@ -132,6 +132,8 @@ class SixRealmsAssets:
 	I_COIN = RuleImage(roi_front=(612,345,66,53), roi_back=(405,229,561,270), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_coin.png")
 	# 六道的金币 
 	I_COIN2 = RuleImage(roi_front=(612,345,66,53), roi_back=(405,229,561,270), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_coin.png")
+	# 洞察之力 
+	I_SKILL105 = RuleImage(roi_front=(178,187,80,69), roi_back=(112,149,779,151), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_skill105.png")
 
 
 	# Image Rule Assets

BIN
tasks/SixRealms/gate1/gate1_skill105.png


+ 9 - 0
tasks/SixRealms/gate1/skills.json

@@ -97,5 +97,14 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "六道的金币"
+  },
+  {
+    "itemName": "skill105",
+    "imageName": "gate1_skill105.png",
+    "roiFront": "178,187,80,69",
+    "roiBack": "112,149,779,151",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "洞察之力"
   }
 ]

+ 3 - 0
tasks/SixRealms/moon_sea/map.py

@@ -57,6 +57,9 @@ class MoonSeaMap(MoonSeaSkills):
             if x1 < rx1 or x2 > rx2 or y1 < ry1 or y2 > ry2:
                 continue
             if isl_type == MoonSeaType.island100 and self.contains_any_char(result.ocr_text, chars='宁息'):
+                # 如果身上没有达到300块钱就不去了
+                if self.appear(self.I_M_STORE):
+                    continue
                 isl_type = MoonSeaType.island101
                 isl_roi = x1, y1, w, h
             elif isl_type == MoonSeaType.island100 and self.contains_any_char(result.ocr_text, chars='神秘'):

+ 4 - 0
tasks/SixRealms/moon_sea/moon_sea.py

@@ -65,6 +65,10 @@ class MoonSea(MoonSeaMap, MoonSeaL101, MoonSeaL102, MoonSeaL103, MoonSeaL104, Mo
                 if self.cnt_skill101 >= 5:
                     # 如果柔风满级就不召唤
                     pass
+                # 如果没有三百块就不能召唤
+                if self.appear(self.I_M_STORE):
+                    logger.info('There have no money to active store at the last island')
+                    pass
                 self.activate_store()
                 self.wait_animate_stable(self.C_MAIN_ANIMATE_KEEP, timeout=3)
                 isl_type, isl_num, isl_roi = self.decide()

+ 3 - 1
tasks/SixRealms/moon_sea/skills.py

@@ -12,7 +12,6 @@ class MoonSeaSkills(BaseTask, SixRealmsAssets):
 
     cnt_skill101 = 0
 
-
     def in_main(self, screenshot: bool = False):
         if screenshot:
             self.screenshot()
@@ -68,6 +67,9 @@ class MoonSeaSkills(BaseTask, SixRealmsAssets):
         #     button = self.I_SKILL103
         # elif button is None and self.appear(self.I_SKILL104):
         #     button = self.I_SKILL104
+        elif button is None and self.appear(self.I_SKILL105):
+            logger.info(f'Skill 105 level: {self.cnt_skill101}')
+            button = self.I_SKILL105
         if button is not None:
             x, y = button.front_center()
             if x < 360: