Delete a large set of outdated documentation (many files under docs/ and .hermes/plans/, including audits, design, prd, technical, planning, assets, and todos). Update and consolidate .hermes content: refresh shared-memory pages (decision-log, development-workflow, document-map, pitfalls, project-overview, team-conventions) and several skills/references under .hermes/skills. Also modify AGENTS.md, README.md, UI_CODING_STANDARD.md, docs/README.md and .encoding-check-ignore. Purpose: clean up stale planning/audit material and keep current hermes documentation and related top-level docs in sync.
2.5 KiB
2.5 KiB
module-combat
日期:2026-04-21
1. package 职责
module-combat 是 M4 阶段的战斗规则 crate,当前负责:
battle_state首版领域类型与字段校验resolve_combat_action的纯规则推进fight / spar两种模式下的战斗收束规则- 为
spacetime-module提供可直接复用的战斗状态与 reducer 输入输出类型
2. 当前实现范围
当前已经真实落地:
src/domain.rs承接战斗 ID 前缀、版本、伤害、切磋保底生命、旧攻击 function 列表和BattleMode / BattleStatus / CombatOutcomeBattleStateInput / BattleStateSnapshot / BattleStateQueryInputResolveCombatActionInput / ResolveCombatActionResultBattleStateProcedureResult / ResolveCombatActionProcedureResultbattle_attack_basic / battle_recover_breath / battle_use_skill / battle_escape_breakout- 旧攻击类 function 的兼容解析
chapter_id / experience_reward最小承载字段,供spacetime-module在胜利时联动成长结算
当前刻意未做:
inventory_use- 掉落、好感、任务信号联动
- story AI 续写触发
- 多目标或完整 build / cooldown 真相建模
3. 配套文档
落地依据见:
- ../../../docs/【玩法创作】平台入口与玩法链路-2026-05-15.md
- ../../../docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md
- ../../../docs/【玩法创作】平台入口与玩法链路-2026-05-15.md
- ../../../docs/【玩法创作】平台入口与玩法链路-2026-05-15.md
- ../../../docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md
- ../../../docs/【玩法创作】平台入口与玩法链路-2026-05-15.md
4. 边界约束
module-combat只做纯规则、纯状态推进,不承接 HTTP、LLM、OSS 或文件 IO。- 任何与
inventory / progression / npc / story的联动,都应先在文档里冻结边界后再继续接入。 - 该 crate 的目标不是替代 Axum facade,而是成为
spacetime-module里的战斗真相规则层。