Browse Source

fix orochi battle may not click on the prepare button at first round

TripleEarth 3 years ago
parent
commit
4100cbed27
1 changed files with 6 additions and 0 deletions
  1. 6 0
      tasks/Component/GeneralBattle/general_battle.py

+ 6 - 0
tasks/Component/GeneralBattle/general_battle.py

@@ -38,6 +38,12 @@ class GeneralBattle(BaseTask, GeneralBattleAssets):
 
 
             # 检测是否已经在战斗中
             # 检测是否已经在战斗中
             if self.is_in_battle():
             if self.is_in_battle():
+                while 1:
+                    self.screenshot()
+                    if self.appear_then_click(self.I_PREPARE_HIGHLIGHT, interval=1.5):
+                        continue
+                    if not self.appear(self.I_BUFF):
+                        break
                 win = self.battle_wait(config.random_click_swipt_enable)
                 win = self.battle_wait(config.random_click_swipt_enable)
                 if win:
                 if win:
                     return True
                     return True