fix(tactical): 技能满级后保住同舰娘的下一个技能 - #950
Merged
wess09 merged 1 commit intoSep 15, 2026
Merged
Conversation
CI 检查报告
检查结果
导入冒烟测试
意外失败:
|
审查者指南该 PR 通过区分技能选择后紧接着出现的停靠确认与过时的预选状态,修复了同一艘船继续进行后续战术技能时的流程;同时将技能切换门控移至 SKILL_CONFIRM,并移除了无法到达的重试/状态处理逻辑。 继续让同一艘船进行下一个战术技能的时序图sequenceDiagram
participant Tactical as TacticalClass
participant Skill as SKILL_CONFIRM
participant Dock as TacticalDock
participant Books as TACTICAL_CLASS_START
Tactical->>Skill: _handle_tactical_skill_confirm()
Skill-->>Tactical: _tactical_skill_choose()
Tactical->>Tactical: pending_ship_confirm = True
Tactical->>Dock: _handle_tactical_dock()
Dock-->>Tactical: dock_selected()
Tactical->>Dock: SHIP_CONFIRM
Tactical->>Books: _tactical_books_choose()
区分战术停靠预选状态的流程图flowchart TD
A["_handle_tactical_dock()"] --> B{"dock_selected()?"}
B -- "no" --> C["选择一名新学生"]
B -- "yes" --> D{"pending_ship_confirm?"}
D -- "yes" --> E["点击 SHIP_CONFIRM"]
D -- "no" --> F["点击 BACK_ARROW"]
E --> G["继续使用同一艘船"]
F --> H["清除过时的预选状态"]
文件级变更
提示和命令与 Sourcery 交互
自定义你的使用体验访问你的控制面板:
获取帮助Original review guide in EnglishReviewer's GuideThe PR fixes same-ship progression to a subsequent tactical skill by distinguishing the dock confirmation immediately following skill selection from stale preselection, while moving skill-switch gating to SKILL_CONFIRM and removing unreachable retry/state plumbing. Sequence diagram for continuing the same ship to its next tactical skillsequenceDiagram
participant Tactical as TacticalClass
participant Skill as SKILL_CONFIRM
participant Dock as TacticalDock
participant Books as TACTICAL_CLASS_START
Tactical->>Skill: _handle_tactical_skill_confirm()
Skill-->>Tactical: _tactical_skill_choose()
Tactical->>Tactical: pending_ship_confirm = True
Tactical->>Dock: _handle_tactical_dock()
Dock-->>Tactical: dock_selected()
Tactical->>Dock: SHIP_CONFIRM
Tactical->>Books: _tactical_books_choose()
Flow diagram for distinguishing tactical dock preselectionflowchart TD
A["_handle_tactical_dock()"] --> B{"dock_selected()?"}
B -- "no" --> C["Select a new student"]
B -- "yes" --> D{"pending_ship_confirm?"}
D -- "yes" --> E["Click SHIP_CONFIRM"]
D -- "no" --> F["Click BACK_ARROW"]
E --> G["Continue with the same ship"]
F --> H["Clear stale preselection"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
LianTian2222
force-pushed
the
fix/tactical-skill-autoswitch
branch
from
September 15, 2026 05:34
5d1de50 to
9d3c68e
Compare
Owner
|
tests/test_gui_dependency_sync.py 请解决冲突 |
Owner
|
@LianTian2222 解决冲突 |
- 技能自动切换改由 SKILL_CONFIRM 界面门控:原来挂在 if not books 分支上,而 BOOK_FILTER 的 first 预置让该分支恒不成立,开关实际无效 - 船坞已有预选舰船且刚确认过技能时,确认这位学员而不是退出重进(退出会改派船坞里按等级选出的另一艘船,满级舰娘的下一技能因此学不到) - 删除从未执行的满级检测/切技能代码与被架空的 pending_ship_auto_switch 管道
LianTian2222
force-pushed
the
fix/tactical-skill-autoswitch
branch
from
September 15, 2026 16:32
9d3c68e to
7528497
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现象
战术学院里某位舰娘第一个技能学满后,脚本不会让同一位舰娘接着学第二个技能,而是重新进船坞、按等级顺序挑了另一艘船占掉这个槽位。
原因(两条独立缺陷)
_handle_tactical_dock把游戏递过来的确认学员步骤丢掉了:船坞里已有预选舰船时一律当成“从 page_main 带过来的陈旧预选”,点 BACK_ARROW 退出。游戏在技能界面确认技能后还会再弹一次船坞让确认学员(DOCK_SELECTED 1/1),这一步被当成陈旧状态退出,随后走「添加新学员」,于是槽位换成了别人。[战术-技能] 选择技能为刚学满的舰娘选中第二个技能(['MAX','0/100','0/100'])并确认 →[DOCK_SELECTED] 1/1→[战术-船坞] 船坞中有预选舰船,重新进入→ 船坞按等级选中另一位 120 级舰娘(['MAX','1700/5800','MAX'])→ 教材界面读到的经验是1700/5800,空出的槽位被这艘船占掉,原舰娘的第二个技能再没开课。Tactical_SkillAutoSwitch(自动切换技能)从未真正生效:它的判定挂在_tactical_books_choose()的「没有教材命中」分支上,而BOOK_FILTER带first预置(module/tactical/tactical_class.py里BOOK_FILTER的 preset),该分支恒不成立;aeb54fccf又把它收窄成必须AddNewStudent_Enable,于是关掉「自动添加学员」时这个开关完全不做事。改动
Tactical_SkillAutoSwitch or AddNewStudent_Enable。pending_ship_confirm标记:刚确认过技能时,船坞里的预选舰船就是要确认的学员,点 SHIP_CONFIRM 继续;没有这个标记时(真正的陈旧预选)保持原有退出行为。_is_current_skill_max、_wait_until_appear、_return_to_tactical_page、_try_switch_to_next_skill)与被架空的pending_skill_auto_switch管道;_handle_tactical_popups()不再返回无用的第二个值;_tactical_books_choose()恢复单次判定(Returns: bool)。验证
dock(1/1)→ 点 SHIP_CONFIRM;无标记的陈旧预选 → 仍点 BACK_ARROW;dock(0/1)正常选船流程不受影响;两个开关都关 → 仍关闭技能界面;该舰娘没有可学技能 → 仍退出;教材first兜底开课 / 未命中则走取消而不是越界。python -m py_compile;CI 的tests.test_ci_import6/6 OK;git diff --check干净。实机确认点
日志应为
[战术-技能] 选择技能→[战术-船坞] 确认继续学习的舰船→选择战术教材,且该槽位里仍是同一位舰娘在学第二个技能;若又出现[战术-船坞] 船坞中有预选舰船,重新进入,说明那次的船坞不是紧跟技能确认出现的。Sourcery 摘要
确保战术学生在进入下一项技能时仍分配到同一艘飞船,并恢复可靠的自动技能切换。
错误修复:
增强功能:
Original summary in English
Sourcery 摘要
修复战术学院技能衔接流程,确保舰娘满级后能可靠地继续学习下一项技能。
错误修复:
功能增强:
Original summary in English
Sourcery 摘要
修复战术技能学习的连续流程,并增强战略地图和剧情自动化功能,以应对无法到达的事件、错误识别的选项以及误判的点击循环。
新功能:
Bug 修复:
STORY_OPTION设置。改进:
测试:
杂项:
Original summary in English
Sourcery 摘要
修复战术学院连续技能学习流程,并恢复可靠的自动技能切换。
错误修复:
改进:
Original summary in English
Summary by Sourcery
修复战术学院连续技能学习流程,并恢复可靠的自动技能切换。
Bug Fixes:
Enhancements: