combat-flow-design
Skill4 starsChanged 54 days agoMITView on GitHub
定可入库的战斗流程骨架:标准步骤 id、时间模型、资源轴、判定公式语法与胜负条件,供代码管线与配表直接引用。触发:战斗流程、combat flow、步骤名标准化、判定公式、接代码。
In this repository112 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .kimi-code/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/全局.mdcCursor rule
- anim-event-hookSkill
- anim-set-checklistSkill
- anti-cheat-hook-checkSkill
- 产物登记Skill
- assemble-craft-flowSkill
- attr-family-syncSkill
- attribute-frameworkSkill
- audio-fmod-checklistSkill
- auto-test-scaffoldSkill
- bind-rig-checklistSkill
- blockout-passSkill
- bug-report-writeSkill
- build-acceptanceSkill
- build-gate-checklistSkill
- case-automation-mapSkill
- character-asset-checklistSkill
- ci-smokeSkill
- client-bugfixSkill
- client-combat-frame-debugSkill
- collab-protocolSkill
- combat-feel-checklistSkill
- combat-modelingSkill
- compat-smokeSkill
- concept-key-artSkill
- copy-passSkill
- counter-matrix-passSkill
- damage-formula-passSkill
- data-readiness-checkSkill
- deliverable-sheetsSkill
- dependency-mapSkill
- device-matrix-passSkill
- diagram-packSkill
- dialogue-passSkill
- doctorSkill
- economy-loop-analysisSkill
- encounter-scriptSkill
- env-asset-checklistSkill
- event-specSkill
- excel-com-writeSkill
- excel-formatSkill
- excel-readSkill
- experience-critiqueSkill
- export-naming-gateSkill
- export-pipeline-fixSkill
- feature-gdd-sliceSkill
- feature-vertical-sliceSkill
- file-pack-layoutSkill
- fmod-bank-buildSkill
- 交接Skill
- iap-catalog-checkSkill
- import-validateSkill
- inflation-stressSkill
- level-goals-specSkill
- The first 60 shown.
The file
Files
战斗流程怎么定骨架(可接代码)
本技能产出必须能进代码与配表:步骤用稳定英文 id,判定用可解析公式语法,中文只作说明,不进标识符。
何时用
- 新战斗系统或大改时间/资源/判定管线
- 步骤名口语化、无法映射状态机或表主键
- 判定公式写法不统一,客户端/服务器/数值对不齐
- 关卡与数值对一局结构理解不一致
标准标识约定(全局)
| 种类 | 语法 | 例 |
| 步骤/状态 id | snake_case,前缀 cf_ | cf_startup cf_active cf_recovery |
| 事件 id | snake_case,前缀 ev_ | ev_hit_confirmed ev_whiff |
| 资源 id | snake_case,前缀 res_ | res_stamina |
| 属性主键 | 与属性框架一致 | atk_phys hp_max |
| 公式 | 纯函数表达式,字段用 {attr} / {res} / 字面量 | max(0, {atk_phys} * {skill_coeff} - {def_phys}) |
| 时间 | 仿真 tick(整数),禁止用渲染帧口语代替字段 | startup_ticks active_ticks |
禁止:中文当字段名、空格/驼峰混用当表主键、用「大概一下」描述窗口。
怎么做
1. 写 brief 与成功标准(可测)
做
- 读支柱与(若有)遭遇目标;写 ≥3 条成功标准,每条绑定测量:战斗日志计数、tick 秒表、调试 overlay。
- 禁改区表:
attribute-framework/ 关卡预算 / 网络权威 / 既有skill-kit——标locked或open。 - 模式:
mode=new|extend|audit;audit默认不改产品表。 - 输出路径:
combat/flow_<flow_id>_brief.md(flow_id为snake_case)。 - 自检:
rg -n "success|locked|mode=" combat/flow_<flow_id>_brief.md无空槽。 - 失败→回本步:成功标准无测量面或禁改空。
做到:brief 含 flow_id、≥3 条可测标准、禁改表、mode。
2. 冻结时间模型(标准字段)
做
- 选定
time_model∈realtime_fixed_tick|semi_realtime|turn|timeline_pause;写入time_model_version。 - 冻结推进单位:
tick_hz(如 30/60)与字段:startup_ticks/active_ticks/recovery_tickshitstun_ticks/blockstun_ticks/iframe_ticks
- 管线阶段顺序(代码必须同序,id 固定):
cf_input_collect
→ cf_validate_actor
→ cf_skill_timeline
→ cf_hitbox_window
→ cf_target_filter
→ cf_hit_resolve
→ cf_damage_calc
→ cf_apply_effects
→ cf_emit_present- 权威边界:伤害结算只在
cf_damage_calc+权威侧;表现只订cf_emit_present事件,不改 HP。 - 去重:同一
attack_uid对同一target_id在窗口内只结算一次(hit_once_set)。 - 失败→回步骤 1:与禁改「网络权威」冲突则改模型或升级决策。
做到:time_model_version 冻结;上列阶段 id 写入骨架;未冻结不得填技能前摇字段。
3. 资源轴(表字段)
做
- 写
combat/resource_axis.csv列:
res_id,attr_key,cap_src,regen_per_tick,persist_ooc,empty_effect,ui_always_onattr_key必须存在于属性框架;缺则先补框架。- 产品表列 vs 运行时字段分界写入清单;改产品表走表格写入配方。
- 同窗口资源总负担上限向用户索取;超限先砍技能包结构。
- 验证:耗尽后释放应走
cf_validate_actor失败;日志关键字reject_reason=res_empty。 - 失败→回步骤 2。
做到:csv 每行合法;空资源释放实验符合预期。
4. 判定与伤害公式(标准语法)
做
- 判定管线只用下列事件 id(可增补但必须登记):
ev_hit_confirmed/ev_whiff/ev_blocked/ev_iframe_ignore
- 命中条件公式字段(布尔表达式,可进配置):
hit_gate = in_range({dist}, {range_max})
&& facing_ok({attacker_yaw}, {target_pos})
&& not in_iframe({target_id})
&& not already_hit({attack_uid}, {target_id})- 伤害公式(纯函数,结果写入
damage_out):
damage_out = max(0,
({base_damage} * {skill_coeff} * {zone_coeff})
* (1 - {mitigation})
+ {flat_bonus}
)
mitigation = clamp({def_score} / ({def_score} + {def_k}), 0, 0.9)- 公式里每个
{token}必须映射到:属性主键、技能表列、或运行时常量;输出combat/formula_<flow_id>.json:
{
"flow_id": "example",
"hit_gate": "…",
"damage_out": "…",
"tokens": { "base_damage": "skill.base_damage", "atk_phys": "attr.atk_phys" }
}- 版本字段
formula_version;变更要可 diff。 - 失败→回属性框架或缺列:token 无法解析则不许标通过。
做到:公式文件可被校验器解析;无中文标识符;formula_version 有值。
5. 节奏模板与胜负 id
做
- 四段模板 id:
seg_open/seg_pressure/seg_release/seg_close;每段:pressure_band、new_info_budget、exit_cond_id。 exit_cond_id/win_cond_id/fail_cond_id用snake_case,供encounter-script引用。- 可读性预算:
max_onscreen_threats、max_vfx_disturb;超限降级策略写入骨架旁注。 - 一页骨架:
time_model + resource_axis + stages + formulas + segments + winlose。 - 与
skill-kit-design的释放窗字段对齐(startup_ticks等同名)。 - 失败→回步骤 3/4:缺资源或公式 token。
做到:≥1 个遭遇可引用 flow_id;胜负 id 可指;无中文主键。
6. 接入代码管线自检
做
- 对照清单:阶段 id 表、事件 id 表、公式 token 表、资源 csv、cond id 表。
- 用仓库或工具链里已有命名检查(若有)跑一遍;没有则人工
rg中文/空格字段名。 - 调试:打开 hitbox overlay + damage log;同一
attack_uid不得双计。 - 登记产物路径到产物索引。
- 失败→回对应步骤;不把「口算过」当通过。
做到:自检清单全勾;日志无双计;产物已登记。
下一步常接:skill-kit-design;combat-modeling;encounter-script;combat-feel-checklist。
参考类型(非原文)
- 固定 tick 伤害管线与去重 / 权威结算
- 帧数据:startup/active/recovery、hitstun、i-frame
- 规则层与表现层分离(rules → outcome → present events)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

