Просмотр исходного кода

Merge pull request #124 from endlesswxk/dev

Dev
huangrunheng 3 лет назад
Родитель
Сommit
53c0901163
3 измененных файлов с 10 добавлено и 4 удалено
  1. 8 2
      tasks/Exploration/script_task.py
  2. 1 1
      tasks/Restart/assets.py
  3. 1 1
      tasks/Restart/login/ocr.json

+ 8 - 2
tasks/Exploration/script_task.py

@@ -35,7 +35,8 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, ExplorationAssets):
         if explorationConfig.switch_soul_config.enable_switch_by_name:
             self.ui_get_current_page()
             self.ui_goto(page_shikigami_records)
-            self.run_switch_soul_by_name(explorationConfig.switch_soul_config.group_name, explorationConfig.switch_soul_config.team_name)
+            self.run_switch_soul_by_name(explorationConfig.switch_soul_config.group_name,
+                                         explorationConfig.switch_soul_config.team_name)
 
         # 开启加成
         con = self.config.exploration.exploration_config
@@ -66,6 +67,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, ExplorationAssets):
             count = 0
             while count < 7:
                 self.screenshot()
+                time.sleep(0.5)
                 if self.appear_then_click(self.I_E_EXPLORATION_CLICK):
                     count += 1
                     # 进入战斗环节
@@ -199,7 +201,11 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, ExplorationAssets):
                     break
             # 小怪 战
             if self.appear_then_click(self.I_NORMAL_BATTLE_BUTTON):
-                self.run_general_battle(self.config.exploration.general_battle_config)
+                self.screenshot()
+                if self.appear_then_click(self.I_NORMAL_BATTLE_BUTTON):
+                    self.run_general_battle(self.config.exploration.general_battle_config)
+                else:
+                    self.run_general_battle(self.config.exploration.general_battle_config)
                 self.screenshot()
                 while self.appear(self.I_BATTLE_REWARD):
                     self.screenshot()

+ 1 - 1
tasks/Restart/assets.py

@@ -68,6 +68,6 @@ class RestartAssets:
 	# 点击屏幕跳过 
 	O_LOGIN_SKIP_1 = RuleOcr(roi=(1046,35,130,37), area=(1046,35,130,37), mode="Single", method="Default", keyword="点击屏幕跳过", name="login_skip_1")
 	# 登录指定角色,默认第一个 
-	O_LOGIN_SPECIFIC_SERVE = RuleOcr(roi=(524,600,242,53), area=(516,75,662,585), mode="Single", method="Default", keyword="点击屏幕进入游戏", name="login_specific_serve")
+	O_LOGIN_SPECIFIC_SERVE = RuleOcr(roi=(694,605,62,34), area=(516,75,662,585), mode="Single", method="Default", keyword="游戏", name="login_specific_serve")
 
 

+ 1 - 1
tasks/Restart/login/ocr.json

@@ -32,7 +32,7 @@
     "roiBack": "516,75,662,585",
     "mode": "Single",
     "method": "Default",
-    "keyword": "点击屏幕进入游戏",
+    "keyword": "游戏",
     "description": "登录指定角色,默认第一个"
   }
 ]