Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion module/coalition/coalition_scuttle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions module/combat/auto_search_combat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions module/combat/emotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions module/os_handler/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading