Sfoglia il codice sorgente

fix Exploration
back to main after finish Exploration and set next run

endlesswxk 2 anni fa
parent
commit
4128664b93

+ 2 - 0
tasks/Exploration/assets.py

@@ -64,6 +64,8 @@ class ExplorationAssets:
 	I_BATTLE_START = RuleImage(roi_front=(555,688,39,27.5), roi_back=(221,677,561,41), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_battle_start.png")
 	# description 
 	I_GET_REWARD = RuleImage(roi_front=(464,231,339,44), roi_back=(464,231,339,44), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_get_reward.png")
+	# description 
+	I_RED_CLOSE = RuleImage(roi_front=(1027,129,41,42), roi_back=(1021,121,54,55), threshold=0.6, method="Template matching", file="./tasks/Exploration/res/res_red_close.png")
 
 
 	# Ocr Rule Assets

+ 9 - 0
tasks/Exploration/res/image.json

@@ -151,5 +151,14 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
+  },
+  {
+    "itemName": "red_close",
+    "imageName": "res_red_close.png",
+    "roiFront": "1027,129,41,42",
+    "roiBack": "1021,121,54,55",
+    "method": "Template matching",
+    "threshold": 0.6,
+    "description": "description"
   }
 ]

BIN
tasks/Exploration/res/res_red_close.png


+ 5 - 0
tasks/Exploration/script_task.py

@@ -74,6 +74,11 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, ExplorationAssets):
                 if self.appear(self.I_EXPLORATION_TITLE):
                     self.open_expect_level()
 
+            if self.wait_until_appear(self.I_RED_CLOSE, wait_time=2):
+                self.appear_then_click(self.I_RED_CLOSE)
+            self.ui_goto(page_main)
+            self.set_next_run(task='Exploration', success=True, finish=False)
+
     # 查找指定的章节:
     def open_expect_level(self):
         swipeCount = 0