Переглянути джерело

Merge pull request #474 from XinyuWang-Isak/dev

Add exit support in sixrealms; refresh skills for all battles
huangrunheng 2 роки тому
батько
коміт
7b152fd5cc

+ 2 - 1
tasks/GameUi/game_ui.py

@@ -13,6 +13,7 @@ from tasks.GameUi.assets import GameUiAssets
 from tasks.GameUi.page import *
 from tasks.Restart.assets import RestartAssets
 from tasks.base_task import BaseTask
+from tasks.SixRealms.assets import SixRealmsAssets
 from module.logger import logger
 from module.exception import (GameNotRunningError, GamePageUnknownError, RequestHumanTakeover)
 
@@ -34,7 +35,7 @@ class GameUi(BaseTask, GameUiAssets):
                 BaseTask.I_UI_BACK_RED, BaseTask.I_UI_BACK_YELLOW, BaseTask.I_UI_BACK_BLUE,
                 GameUiAssets.I_BACK_FRIENDS, GameUiAssets.I_BACK_DAILY,
                 GameUiAssets.I_REALM_RAID_GOTO_EXPLORATION,
-                GameUiAssets.I_SIX_GATES_GOTO_EXPLORATION]
+                GameUiAssets.I_SIX_GATES_GOTO_EXPLORATION, SixRealmsAssets.I_EXIT_SIXREALMS]
 
     def home_explore(self) -> bool:
         """

+ 2 - 0
tasks/SixRealms/assets.py

@@ -98,6 +98,8 @@ class SixRealmsAssets:
 	I_MSTART_CONFIRM2 = RuleImage(roi_front=(1154,581,74,85), roi_back=(1079,535,196,177), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mstart_confirm2.png")
 	# 动画完了就有这个东西 
 	I_ISLAND_TAG_FLAG = RuleImage(roi_front=(543,601,100,100), roi_back=(543,601,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_island_tag_flag.png")
+	# 暂时离开六道之门 
+	I_EXIT_SIXREALMS = RuleImage(roi_front=(507.5,308,100,100), roi_back=(507.5,308,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_exit_sixrealms.png")
 
 
 	# Ocr Rule Assets

BIN
tasks/SixRealms/gate1/gate1_exit_sixrealms.png


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

@@ -151,5 +151,14 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "动画完了就有这个东西"
+  },
+  {
+    "itemName": "exit_sixrealms",
+    "imageName": "gate1_exit_sixrealms.png",
+    "roiFront": "507.5,308,100,100",
+    "roiBack": "507.5,308,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "暂时离开六道之门"
   }
 ]

+ 1 - 1
tasks/SixRealms/moon_sea/l104.py

@@ -16,7 +16,7 @@ class MoonSeaL104(MoonSeaSkills):
         self.battle_lock_team()
         self.island_battle()
         logger.info('Island battle finished')
-        self.select_skill()
+        self.select_skill(refresh=True)
 
 
 if __name__ == '__main__':