From 701807ec9f373f333bf78b5512fcba2e2d42eae4 Mon Sep 17 00:00:00 2001 From: sui-feng-cb <2518179942@qq.com> Date: Thu, 5 Feb 2026 21:43:38 +0800 Subject: [PATCH] Fix: check once in combat_preparation --- module/raid/raid.py | 7 +++++-- module/ui/ui.py | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/module/raid/raid.py b/module/raid/raid.py index 67a3fb9c0..fef0398e1 100644 --- a/module/raid/raid.py +++ b/module/raid/raid.py @@ -261,12 +261,15 @@ class Raid(MapOperation, RaidCombat, CampaignEvent): # if emotion_reduce: # self.emotion.wait(fleet_index) + checked = False for _ in self.loop(): if self.appear(BATTLE_PREPARATION, offset=(30, 20)): if self.handle_combat_automation_set(auto=auto == 'combat_auto'): continue - if self._raid_has_oil_icon and self.triggered_stop_condition(oil_check=True, coin_check=True): - self.config.task_stop() + if not checked and self._raid_has_oil_icon: + checked = True + if self.triggered_stop_condition(oil_check=True, coin_check=True): + self.config.task_stop() if self.handle_raid_ticket_use(): continue if self.handle_retirement(): diff --git a/module/ui/ui.py b/module/ui/ui.py index 55dfbe834..49a61f0f1 100644 --- a/module/ui/ui.py +++ b/module/ui/ui.py @@ -551,8 +551,8 @@ class UI(InfoHandler): return True # RPG event (raid_20240328) - # if self.appear_then_click(RPG_STATUS_POPUP, offset=(30, 30), interval=3): - # return True + if self.appear_then_click(RPG_STATUS_POPUP, offset=(30, 30), interval=3): + return True # Hospital event (20250327) # if self.appear_then_click(HOSIPITAL_CLUE_CHECK, offset=(20, 20), interval=2): # return True