Explorar o código

fix Restart and Exploration

endlesswxk %!s(int64=3) %!d(string=hai) anos
pai
achega
5f628b8fba
Modificáronse 2 ficheiros con 9 adicións e 3 borrados
  1. 8 2
      tasks/Exploration/script_task.py
  2. 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:
         if explorationConfig.switch_soul_config.enable_switch_by_name:
             self.ui_get_current_page()
             self.ui_get_current_page()
             self.ui_goto(page_shikigami_records)
             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
         con = self.config.exploration.exploration_config
@@ -66,6 +67,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, ExplorationAssets):
             count = 0
             count = 0
             while count < 7:
             while count < 7:
                 self.screenshot()
                 self.screenshot()
+                time.sleep(0.5)
                 if self.appear_then_click(self.I_E_EXPLORATION_CLICK):
                 if self.appear_then_click(self.I_E_EXPLORATION_CLICK):
                     count += 1
                     count += 1
                     # 进入战斗环节
                     # 进入战斗环节
@@ -199,7 +201,11 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, ExplorationAssets):
                     break
                     break
             # 小怪 战
             # 小怪 战
             if self.appear_then_click(self.I_NORMAL_BATTLE_BUTTON):
             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()
                 self.screenshot()
                 while self.appear(self.I_BATTLE_REWARD):
                 while self.appear(self.I_BATTLE_REWARD):
                     self.screenshot()
                     self.screenshot()

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

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