diff --git a/module/coalition/coalition_scuttle.py b/module/coalition/coalition_scuttle.py index f25495c1e..340dc0c69 100644 --- a/module/coalition/coalition_scuttle.py +++ b/module/coalition/coalition_scuttle.py @@ -89,9 +89,12 @@ def auto_search_combat_execute(self, emotion_reduce=True, fleet_index=1, expecte self._withdraw = True self._is_shipwreck = True break + # D评价结算界面:S/A/B评价的动画过渡帧可能短暂误匹配D评价模板, + # 但只有真正的沉船才会出现OPTS_INFO_D弹窗。 + # 此处仅break退出循环,不设置沉船标记(未经过OPTS_INFO_D确认)。 + # 真正的沉船由上方OPTS_INFO_D路径触发并设置_is_shipwreck。 if self.appear(BATTLE_STATUS_D) or self.appear(EXP_INFO_D): self._withdraw = True - self._is_shipwreck = True break if confirm_timer.reached(): self._withdraw = True diff --git a/module/combat/auto_search_combat.py b/module/combat/auto_search_combat.py index 9f8a07480..19957ee5f 100644 --- a/module/combat/auto_search_combat.py +++ b/module/combat/auto_search_combat.py @@ -318,11 +318,14 @@ def auto_search_combat_execute(self, emotion_reduce, fleet_index, battle=None, e self.emotion.reduce(fleet_index, shipwreck=True) self._withdraw = True break - # 沉船D评价结算界面,作为OPTS_INFO_D未检测到的兜底 + # D评价结算界面(BATTLE_STATUS_D / EXP_INFO_D) + # S/A/B评价的动画过渡帧可能短暂误匹配D评价模板, + # 但只有真正的沉船才会出现OPTS_INFO_D弹窗。 + # 此处仅break退出循环,不扣减shipwreck心情。 + # 真正的沉船扣减由上方OPTS_INFO_D路径触发。 + # 退出后由auto_search_combat_status()中的handle_battle_status()处理结算画面。 if self.appear(BATTLE_STATUS_D) or self.appear(EXP_INFO_D): self._withdraw = True - if emotion_reduce: - self.emotion.reduce(fleet_index, shipwreck=True) break if confirm_timer.reached(): self._withdraw = True diff --git a/module/combat/emotion.py b/module/combat/emotion.py index 0685804cb..f8b8215f0 100644 --- a/module/combat/emotion.py +++ b/module/combat/emotion.py @@ -277,6 +277,9 @@ def record(self): 仅在心情整数值发生变化时更新 Record 时间戳, 并将 Record 回扣 fractional_seconds 对应的等效秒数, 使未满1点的恢复余数可在下次 update() 时继续累积。 + + 注意:FleetEmotion.value 和 FleetEmotion.record 是 @property, + 从 self.config 实时读取。setattr 到 config 后属性自动更新,无需手动赋值。 """ if self.using_public: fleet = self.public_fleet diff --git a/module/os_handler/storage.py b/module/os_handler/storage.py index 4cd09f658..ca5f0b85e 100644 --- a/module/os_handler/storage.py +++ b/module/os_handler/storage.py @@ -5,6 +5,7 @@ 提供维修结果枚举(成功/数量不足/超时)用于状态判断。 """ from enum import Enum +import time from module.base.timer import Timer from module.base.utils import area_offset, crop, rgb2gray @@ -45,11 +46,24 @@ def storage_enter(self): out: STORAGE_CHECK """ logger.info('[大世界-仓库] 进入仓库') + wait_seconds = 0 for _ in self.loop(): # End if self.is_in_storage(): break + if self.appear(MISSION_CHECK, offset=(20, 20)): + logger.warning('[大世界-仓库] 误进入情报界面,尝试退出') + self.ui_click( + MISSION_QUIT, + check_button=self.is_in_map, + offset=(20, 20), + skip_first_screenshot=True + ) + wait_seconds += 1 + time.sleep(wait_seconds) + continue + if self.appear_then_click(STORAGE_ENTER, offset=(200, 5), interval=3): continue # A game bug that AUTO_SEARCH_REWARD from the last cleared zone popups