zizi 7033cef382 feat(contracts): M-c批② idle+tycoon契约面——双schema+双designer v1.0.0+registry两条目+Golden六守卫样本
- idle.schema(11字段)/tycoon.schema(10字段)全收敛 integer/string/const(judge零改);升级档扁平化(upgradeCost+upgradeMultiplier)/顾客节奏档位化(customerIntervalLevel)规避judge新分支
- 对抗/fix版本一字不动(创始人拍板不升patch);Golden append-only +6守卫(idle/tycoon各 kill题文不符+kill越模板机制+accept正例),README记v1.1.2维持+守卫为细则①跨域验证手段+级3全中为放行硬前提

HJ-MC-TPL-EXEC-002 §3/§4

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 16:45:42 +00:00

76 lines
5.0 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://wanxiang.ai/contracts/templates/idle.schema.json",
"title": "IdleGameConfig",
"description": "idle(放置挂机)模板 GameConfig 契约(HJ-MC-TPL-EXEC-002 §3,owner=WS2)。GamePackage 契约(#4)gameConfig 字段的模板级细化。玩法:点击产出资源 + 每秒自动产出,资源攒到 targetResource 即通关;攒够 upgradeCost 可购升级使自动产出 ×upgradeMultiplier;离开再回来按速率补发离线产出(钳 offlineMaxMinutes 上限 + offlineEfficiencyPercent 折扣,防爆数值)。诚实边界:idle runtime 本波(M-c 批②)已实现(game-studio/src/host/runtime/index.ts 按 templateId 分发 initIdle),可据此宣称可玩——区别于 dodge/runner/match(仅契约落盘未实现)。离线产出走纯前端时间差 + SDK storage 通道(宿主受信边界落 localStorage,拍板2),不做服务端存档。字段风格对齐 clicker/merge.schema.json:const templateId 精确等值防串台 + additionalProperties:false;字段全为 integer/string/const,无 array/object(judge 子集内)。",
"type": "object",
"required": ["templateId", "title", "theme", "clickYield", "autoYield", "targetResource", "upgradeCost", "upgradeMultiplier", "resourceLabel", "offlineMaxMinutes", "offlineEfficiencyPercent"],
"additionalProperties": false,
"properties": {
"templateId": {
"description": "玩法模板 ID,必须精确等于 \"idle\"(精确等值校验,防 LLM 跨模板串台)。",
"const": "idle"
},
"title": {
"description": "游戏标题,非空且非纯空白。回调组包时截 60 字落 GamePackage.meta.title,经 feed 卡片对玩家展示。",
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"theme": {
"description": "主题/氛围描述,非空且非纯空白,为生成与对抗评审提供题文一致性语境;runtime 据此哈希派生底色(M-b② 渲染面)。",
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"clickYield": {
"description": "点击产出量,整数且 1≤clickYield≤10 含边界。每次点击产出的资源数。下界 ≥1 保点击有效,上界 ≤10 防一击爆数值(保留挂机价值)。",
"type": "integer",
"minimum": 1,
"maximum": 10
},
"autoYield": {
"description": "每秒自动产出量,整数且 1≤autoYield≤20 含边界。挂机每秒自动产出的资源数(开局即生效)。下界 ≥1 保「放置」机制成立(CDP 等待型取证依赖自动产出推演达标时刻),上界 ≤20 配合 targetResource 保单局取证 ≤90s。",
"type": "integer",
"minimum": 1,
"maximum": 20
},
"targetResource": {
"description": "目标资源量,整数且 50≤targetResource≤600 含边界。资源累计达此值即通关。范围保单局 ≤90s 可通关(CDP「点击为主+短等待」策略,最坏 60s 点击 + 30s 等待)与确定性取证。",
"type": "integer",
"minimum": 50,
"maximum": 600
},
"upgradeCost": {
"description": "升级成本,整数且 10≤upgradeCost≤200 含边界。花费此资源数购买一次升级(自动产出 ×upgradeMultiplier)。语义约束 upgradeCost<targetResource(schema 无法跨字段表达,由 prompt 硬约束 + runtime 钳制 min(upgradeCost,targetResource-1) 兜底,防「升级比通关还贵」)。",
"type": "integer",
"minimum": 10,
"maximum": 200
},
"upgradeMultiplier": {
"description": "升级倍率,整数且 2≤upgradeMultiplier≤5 含边界(整数倍规避浮点,落 judge integer 子集与 CDP 确定性推演)。购买升级后自动产出量 ×upgradeMultiplier。2-5 倍保升级有感而不破坏 ≤90s 上限。",
"type": "integer",
"minimum": 2,
"maximum": 5
},
"resourceLabel": {
"description": "资源文案(如「金币」「能量」「星星」),非空且非纯空白。runtime 绘进度文案用(如「金币 120 / 300」)。",
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"offlineMaxMinutes": {
"description": "离线产出上限分钟数,整数且 5≤offlineMaxMinutes≤120 含边界。再入补发离线产出时离线时长钳上限为此值(防长期离线爆数值 / 防改本地时钟刷无限产出)。补发量 = autoYield × min(离线分钟, offlineMaxMinutes) × 60 × offlineEfficiencyPercent/100(§5.4 公式)。",
"type": "integer",
"minimum": 5,
"maximum": 120
},
"offlineEfficiencyPercent": {
"description": "离线效率折扣百分比,整数且 10≤offlineEfficiencyPercent≤100 含边界(整数百分比规避浮点)。离线产出按此百分比折扣(如 50=半速)。下界 ≥10 保离线有产出,上界 ≤100 不超在线速率。",
"type": "integer",
"minimum": 10,
"maximum": 100
}
}
}