diff --git a/autowsgr/data/images/symbol_image/14.png b/autowsgr/data/images/symbol_image/14.png new file mode 100644 index 00000000..1282d09a Binary files /dev/null and b/autowsgr/data/images/symbol_image/14.png differ diff --git a/autowsgr/fight/battle.py b/autowsgr/fight/battle.py index ac629f68..e1098a93 100644 --- a/autowsgr/fight/battle.py +++ b/autowsgr/fight/battle.py @@ -87,15 +87,16 @@ def __init__(self, timer, plan_path: str | None = None, plan_args: dict | None = self.node = DecisionBlock(timer, node_args) self.info = BattleInfo(timer) - def _go_fight_prepare_page(self): + def _enter_fight(self) -> ConditionFlag: self.timer.goto_game_page('battle_page') + if self.timer.image_exist(IMG.symbol_image[15], confidence=0.87): + self.logger.warning('战役次数耗尽') + return ConditionFlag.BATTLE_TIMES_EXCEED now_hard = self.timer.wait_images([IMG.fight_image[9], IMG.fight_image[15]]) hard = self.config.map > 5 if now_hard != hard: self.timer.click(800, 80, delay=1) - def _enter_fight(self) -> ConditionFlag: - self._go_fight_prepare_page() self.timer.click(180 * ((self.config.map - 1) % 5 + 1), 200) self.timer.wait_pages('fight_prepare_page', after_wait=0.15) self.info.ship_stats = detect_ship_stats(self.timer)