runhey 3 лет назад
Родитель
Сommit
dc61cabdf4

+ 2 - 0
tasks/BondlingFairyland/battle.py

@@ -50,6 +50,8 @@ class BondlingBattle(GeneralBattle, BondlingFairylandAssets):
         :return: 如果捕获成功返回True,否则返回False
         """
         self.device.stuck_record_add('BATTLE_STATUS_S')
+        self.device.click_record_clear()
+        # 有时候 只会点击 获得奖励和开始战斗
         # 战斗过程 随机点击和滑动 防封
         logger.info("Start battle process")
         win: bool = False

+ 1 - 1
tasks/Component/Summon/summon.py

@@ -50,7 +50,7 @@ class Summon(BaseTask, SummonAssets):
                 break
             if self.appear_then_click(self.I_BLUE_TICKET, interval=1):
                 continue
-        time.sleep(0.5)
+        time.sleep(1)
         self.summon()
         self.wait_until_appear(self.I_SM_CONFIRM)
         while 1:

+ 7 - 14
tasks/DailyTrifles/script_task.py

@@ -54,13 +54,9 @@ class ScriptTask(GameUi, Summon, DailyTriflesAssets):
         if not self.appear(self.I_L_COLLECT):
             logger.warning('There is no any love')
             return
-        while 1:
-            self.screenshot()
-            if self.ui_get_reward():
-                logger.info('Get reward of friend love')
-                break
-            if self.appear_then_click(self.I_L_COLLECT):
-                continue
+        if self.ui_get_reward(self.I_L_COLLECT):
+            logger.info('Get reward of friend love')
+
 
     def run_store_sign(self):
         self.ui_get_current_page()
@@ -82,13 +78,10 @@ class ScriptTask(GameUi, Summon, DailyTriflesAssets):
             self.ui_get_current_page()
             self.ui_goto(page_main)
             return
-        while 1:
-            self.screenshot()
-            if self.ui_get_reward():
-                logger.info('Get reward of gift sign')
-                break
-            if self.appear_then_click(self.I_GIFT_SIGN, interval=1):
-                continue
+
+        if self.ui_get_reward(self.I_GIFT_SIGN):
+            logger.info('Get reward of gift sign')
+
         self.ui_get_current_page()
         self.ui_goto(page_main)
 

+ 2 - 2
tasks/GameUi/game_ui.py

@@ -26,8 +26,8 @@ class GameUi(BaseTask, GameUiAssets):
                 # 庭院里面的
                 page_shikigami_records, page_onmyodo, page_friends, page_daily, page_mall, page_guild, page_team, page_collection
                 ]
-    ui_close = [GameUiAssets.I_BACK_BLUE, GameUiAssets.I_BACK_YOLLOW, GameUiAssets.I_BACK_Y, GameUiAssets.I_BACK_MALL,
-                GameUiAssets.I_BACK_FRIENDS, GameUiAssets.I_BACK_DAILY, GameUiAssets.I_BACK_BL,
+    ui_close = [GameUiAssets.I_BACK_BLUE, GameUiAssets.I_BACK_Y, GameUiAssets.I_BACK_MALL,
+                GameUiAssets.I_BACK_FRIENDS, GameUiAssets.I_BACK_DAILY,
                 GameUiAssets.I_BONDLING_GOTO_EXPLORATION, GameUiAssets.I_REALM_RAID_GOTO_EXPLORATION, GameUiAssets.I_SIX_GATES_GOTO_EXPLORATION, GameUiAssets.I_SUMMON_GOTO_MAIN
                 ]
     def home_explore(self) -> bool: