feat(ops): 人力短缺/罷工事件實效化 + 軸承備品正名(傳動軸承組 T3) - #116
Merged
Conversation
補上兩處「只影響展示、不影響決策」的邏輯完整性缺口: 人力短缺/罷工實效化(#crew): - crew_shortage(-3)/strike(-6) 原本只改展示用 techAvail,OPS_DISPATCH/ OPS_INSPECT 完全不讀 → 事件承諾後果卻不兌現。 - 新增 crewShortfallJobs/effectiveJobCapOf:缺工直接折抵「可同時開的現場 作業面」= max(1, jobCapOf − ⌈(techTotal−techAvail)/CREW_PER_JOB⌉)。 - 滿編不懲罰(以缺額計,不影響頂級船隊)、下限 1(短手仍可派一組、遠端重啟 不占名額、主線工單不受此限)、每日休整回復。 - 開局改滿編 30/30;tech 升級同步 techAvail(+2)避免憑空缺額。 - 戰情室新增「可出勤班組」統計 + 短手 👷 橫幅(vesselCap→cap)+ 成因區分。 軸承備品正名(#bearing): - 主軸承振動(bearing)與發電機振動(gen_vibration)原權宜共用「變槳軸承」 (pitch_bearing)。新增 Tier 3 專屬「傳動軸承組(發電機/主軸)」 (drive_bearing, ◎130萬)並重新指派,與 Tier 4 主軸承全換(main_bearing) 語意區隔(振動維修級 vs 重吊更換)。 - 新增 pitch_bearing_wear(變槳軸承磨耗)事件,讓 pitch_bearing 保有真實 消費端(呼應 cs_pitch_bearing_wear 案例)、不成孤兒。 測試/文件: - test/run.mjs +5 測試(159 passed):crewShortfall/effectiveJobCapOf、 OPS_DISPATCH 缺工受阻 vs 滿編可派、事件連上機制、開局滿編/升級不生 假缺額、drive_bearing 正名與消費端一致性。 - GAME_DESIGN §18、ROADMAP、STATUS.yaml 對齊。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AC7ERcxjL7dhsYv9PncydP
dofliu
marked this pull request as ready for review
July 9, 2026 14:42
dofliu
pushed a commit
that referenced
this pull request
Jul 14, 2026
README.md / README.zh-TW.md: - 更新測試數 154→164、故障型錄「5 種」→「25 種、五大科別」。 - 戰情室補「人力短缺/罷工實效化」(缺工折抵現場作業面)。 - 教學設計補「獨立測驗模式」與「教師檢視面板+掌握度個別鑽取」。 - 技術補「母港建設疊實境/漫畫背景」與 PWA/啟動安全網。 - 專案結構補 exam.ts/mastery.ts/records.ts、ExamModal/TeacherModal/PortModal、cloud/api.ts。 docs/HANDOFF.md: - 全面刷新:現況(main=PR #117、164 測試、dev branch 名)。 - 把 bearing/crew/exam/mastery-cloud/port 五項由「下一步候選」移到「已完成」。 - 重寫「後續接續工作」(立即可做/需後端/願景)並保留視覺驗證與模擬器蝴蝶效應備忘。 docs/ROADMAP.md: - 補 PR #116/#117 完成註記,更新測試數 154→164、複審日期。 - 新增「後續接續工作 — Next」接手清單章節。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AC7ERcxjL7dhsYv9PncydP
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.
概述
接續 §17 內容查核,補上兩處邏輯完整性缺口——把「只影響展示、不影響決策」的事件接上實際機制,並修正一組權宜共用的備品命名。皆為 ROADMAP 明列的待辦項。
1. 人力短缺/罷工事件實效化(#crew)
問題:
crew_shortage(−3)、strike(−6) 事件原本只調整展示用techAvail,OPS_DISPATCH/OPS_INSPECT完全不讀 → 事件承諾了後果卻不兌現(純展示)。做法:缺工直接折抵戰情室「可同時開的現場作業面」
crewShortfallJobs = ⌈(techTotal − techAvail) / CREW_PER_JOB⌉(CREW_PER_JOB = 4)effectiveJobCapOf = max(1, jobCapOf − crewShortfallJobs);兩個 OPS 守衛改用有效上限。設計要點
techAvail = techTotal時 shortfall = 0 → 不影響任何船隊(含頂級母船)。techAvail每日休整 +1 逐步回復。techAvail(+2):避免開局或擴編後憑空產生缺額。FleetOpsModal):新增「可出勤班組」統計;短手時顯示 👷 橫幅(vesselCap → cap、少 N 面)與「現場已滿」成因區分(人力 vs 船舶)。→ 事件從純展示變成「先遠端重啟軟故障 / 批次搶修 / 靠港補人」的真實取捨。
2. 軸承備品正名(#bearing)
問題:主軸承振動(
bearing)與發電機振動(gen_vibration)原本權宜共用「變槳軸承」(pitch_bearing)備品(規避 Tier 閘門)。做法
drive_bearing, ◎130 萬),兩者改指——與 Tier 4「主軸承」全換(main_bearing)語意區隔(振動維修級 vs 重吊更換)。pitch_bearing_wear(變槳軸承磨耗)事件,讓pitch_bearing備品保有真實消費端(呼應既有cs_pitch_bearing_wear案例研究)、不成孤兒。測試與驗證
npm test:159 passed / 0 failed(新增 5 項)crewShortfallJobs/effectiveJobCapOf:滿編不折抵、缺工折抵、下限 1OPS_DISPATCH缺工時第 3 派工受阻 vs 滿編可派(SOV cap 4)crew_shortage/strike事件 apply → techAvail↓ → 有效上限↓(連上機制)drive_bearing正名、pitch_bearing仍有消費端、Tier 一致性不變式npm run typecheck:通過npm run build:通過npm run sim:策略排序維持正確(passive ≪ active < full-crew;full-crew 平均妥善率 97%)變更檔案
src/state/game.ts:CREW_PER_JOB/crewShortfallJobs/effectiveJobCapOf、OPS 守衛、開局滿編、tech 升級同步 techAvailsrc/state/incidents.ts:bearing改指drive_bearing;新增pitch_bearing_wearsrc/ui/data.ts:新增drive_bearing備品(Tier 3)src/ui/faults.ts:gen_vibration改指drive_bearingsrc/ui/FleetOpsModal.tsx:可出勤班組統計、缺工橫幅、成因區分test/run.mjs:+5 測試docs/GAME_DESIGN.md(§18)、docs/ROADMAP.md、STATUS.yaml:文件對齊相容性
techAvail/techTotal既有欄位;舊檔若非滿編僅短暫折抵,每日休整自癒)。🤖 Generated with Claude Code
https://claude.ai/code/session_01AC7ERcxjL7dhsYv9PncydP
Generated by Claude Code