stamina-system
Skill4 starsChanged 2 months agoMITView on GitHub
设计体力消耗、恢复、上限和离线结算,处理重复请求及时间边界。用于体力机制与实现。 Design stamina costs, regeneration, caps, offline recovery and duplicate-request handling.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- build-instant-qte-h5Skill
- build-pseudo-live2d-characterSkill
- day-night-cycleSkill
- day-time-systemSkill
- fps-feelSkill
- free-input-outputSkill
- game-skill-routerSkill
- improve-arpg-hit-feelSkill
- inventory-systemSkill
- number-adventure-likeSkill
- number-card-roguelikeSkill
- number-diablo-arpg-likeSkill
- number-legend-likeSkill
- number-orchestratorSkill
- number-sharedSkill
- number-shmup-likeSkill
- number-sim-management-likeSkill
- number-survivor-likeSkill
- number-tower-defense-likeSkill
- number-turn-card-likeSkill
- scene-transitionSkill
- screen-shake-effectsSkill
- survival-ui-guidelinesSkill
The file
Files
体力扣费与恢复
本模块由 Whaocaii 主导设计与维护,使用 AI 辅助编写。当前版本为 0.1.0 工作草稿。按用户的目标与现有项目约束执行;仅使用实际可用的工具。
输入
- 上限、恢复周期、扣费时点和付费补充规则
- 权威时钟、离线政策与关卡取消行为
工作过程
- 选择在开始、成功还是结算时扣费,列出取消、断线、失败的返还规则。
- 使用体力值与恢复时间锚点表达状态;满额后的时间是否积累必须明确。
- 恢复时只消费已结算的完整周期,保留剩余时间;达到上限后的锚点按已选政策更新。
- 消耗和恢复在同一状态更新中处理,避免并发扣费、重复返还和先后顺序不一致。
- 时间倒退、跨设备和超长离线按权威时钟及明确上限处理,不把客户端时间当作可信收费依据。
交付
- 状态字段、恢复公式与扣费事件表
- 满额、临界恢复、断线与重试的测试样例
检查
- 同一关卡请求不会重复扣费或返还
- 上限附近的时间余量处理符合规则
使用案例
体力每 5 分钟恢复 1 点,满额后立即消耗,玩家是否能马上再恢复?先确定计时规则再写实现。
验收时按上面的检查项判断结果;只读完本文件不代表完成了任务。
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.

