Skip to content

fix(decisive): 扩展决战1-3章支持并修复Ex-1状态机误判#414

Merged
kuainx merged 11 commits intoOpenWSGR:mainfrom
syokounya:cursor/decisive-ex1-and-rounds
Apr 12, 2026
Merged

fix(decisive): 扩展决战1-3章支持并修复Ex-1状态机误判#414
kuainx merged 11 commits intoOpenWSGR:mainfrom
syokounya:cursor/decisive-ex1-and-rounds

Conversation

@syokounya
Copy link
Copy Markdown
Contributor

@syokounya syokounya commented Apr 11, 2026

修复内容

1. 扩展决战章节支持 1-3 章

  • Autowsgr/ui/decisive/battle_page.py
  • 将 MIN_CHAPTER 从 4 改为 1
  • 为第 1、2、3 章补充手动校准的小关检测点坐标(通过 pixel_marker.py 提取)

2. 修复 Ex-1 首次进入时的节点识别与状态机误判

  • Autowsgr/ops/decisive/handlers.py
  • 舰标智能检测:在 _handle_prepare_combat 中,当
    ode == 'U' 时,若舰标已在地图上则直接默认
    ode = 'A',避免无 overlay 的小关因
    ecognize_node() 错误识别而卡死
  • 修正 PREPARE_COMBAT 到 CHOOSE_FLEET:在 _handle_waiting_for_map 中,若首进第 1 小节且未检测到舰标,将 PREPARE_COMBAT 修正为 CHOOSE_FLEET,解决买船/选岔路 overlay 延迟加载导致的误判
  • 技能使用后等待 overlay:首次进入且尚未选择舰队时,使用技能后切回 WAITING_FOR_MAP 等待 overlay 稳定,避免直接点击编队按钮超时

3. 修复小关结算后无法正确返回入口总览页

  • Autowsgr/ui/decisive/map_controller.py
  • 修正结算奖励弹窗的点击坐标(从 (0.5, 0.5) 改为 (0.953, 0.954))
  • 增加一次 confirm_operation 确保弹窗彻底关闭
  • 在 settle 循环超时后增加 fallback:主动点击左上角返回按钮回到决战入口总览页,避免 detect_entry_status() 在地图页上超时

测试验证

  • 决战 Ex-1 已可正常进入、识别节点、使用技能、进入买船界面
  • 小关结算后的返回入口页 fallback 已验证生效(日志:通过返回按钮回到决战入口页)

相关 issue

  • 修复上游代码在 Ex-1 及低章节决战中的多项状态机时序问题

@kuainx
Copy link
Copy Markdown
Collaborator

kuainx commented Apr 12, 2026

其他看起来没问题,修完就可以合

kuainx added 2 commits April 12, 2026 13:51
中途进入决战时,舰标也在地图上,不需要智能判定
中途进入节点会卡在这里
@kuainx kuainx merged commit 5be51ad into OpenWSGR:main Apr 12, 2026
0 of 2 checks passed
@syokounya syokounya deleted the cursor/decisive-ex1-and-rounds branch April 14, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants