From 47c4afdaaeb2945e98220a2d765c51b61c3a0997 Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Mon, 18 May 2020 17:59:38 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8D7-2=E4=B8=89=E7=AB=99?= =?UTF-8?q?=E6=8B=A3=E5=9E=83=E5=9C=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../campaign_7_2_mystery_farming.py | 21 +++---------------- module/reward/tactical_class.py | 3 ++- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/campaign/campaign_main/campaign_7_2_mystery_farming.py b/campaign/campaign_main/campaign_7_2_mystery_farming.py index 825ba425e..1fff36dad 100644 --- a/campaign/campaign_main/campaign_7_2_mystery_farming.py +++ b/campaign/campaign_main/campaign_7_2_mystery_farming.py @@ -35,38 +35,23 @@ class Campaign(CampaignBase): else: self.clear_all_mystery(nearby=False) - grids = ROAD_MAIN.roadblocks().select(is_accessible=True, enemy_scale=3) - if grids: - self.clear_chosen_enemy(grids[0]) + if self.clear_roadblocks([ROAD_MAIN], strongest=True): return True - if self.clear_roadblocks([ROAD_MAIN]): - return True - - grids = ROAD_MAIN.potential_roadblocks().select(is_accessible=True, enemy_scale=3) - if grids: - self.clear_chosen_enemy(grids[0]) - return True - if self.clear_potential_roadblocks([ROAD_MAIN]): + if self.clear_potential_roadblocks([ROAD_MAIN], strongest=True): return True if self.clear_enemy(scale=(3,)): return True - grids = ROAD_MAIN.first_roadblock().select(is_accessible=True, enemy_scale=2) - if grids: - self.clear_chosen_enemy(grids[0]) + if self.clear_grids_for_faster(GRIDS_FOR_FASTER, scale=(2,)): return True if self.clear_enemy(scale=(2,)): return True - if self.clear_grids_for_faster(GRIDS_FOR_FASTER): return True return self.battle_default() - battle_1 = battle_0 - battle_2 = battle_0 - def battle_3(self): if self.config.C72_BOSS_FLEET_STEP_ON_A3: ignore = None diff --git a/module/reward/tactical_class.py b/module/reward/tactical_class.py index 53e01e3de..4f19024ab 100644 --- a/module/reward/tactical_class.py +++ b/module/reward/tactical_class.py @@ -221,12 +221,13 @@ class RewardTacticalClass(UI, InfoHandler): if self.handle_urgent_commission(save_get_items=False): # Only one button in the middle, when skill reach max level. continue - if self.appear(TACTICAL_CLASS_CANCEL, offset=(30, 30), interval=1) \ + if self.appear(TACTICAL_CLASS_CANCEL, offset=(30, 30), interval=2) \ and self.appear(TACTICAL_CLASS_START, offset=(30, 30)): self.device.sleep(0.3) self.device.screenshot() self._tactical_books_choose() self.device.click(TACTICAL_CLASS_START) + self.interval_reset(TACTICAL_CLASS_CANCEL) continue # End