{
  "bundleVersion": "3.0.0",
  "name": "心情条",
  "description": "角落里的一个小条，显示主角现在对玩家的心情。AI 随剧情加减，玩家也可以按「逗一逗」。",
  "tags": [
    "界面",
    "关系"
  ],
  "createdAt": "2026-11-30T00:00:00.000Z",
  "entries": [
    {
      "id": "mood-guide",
      "name": "心情条说明",
      "content": "主角此刻对 {{user}} 的心情是 {{mood}}（满分 100）。0 到 29：冷淡、话少。30 到 69：平常。70 到 100：热情、愿意多说。让它影响主角说话的样子。",
      "role": "system",
      "section": "system-presets",
      "position": 0,
      "enabled": true,
      "alwaysSend": true,
      "keywords": [],
      "conditions": [],
      "conditionLogic": "all"
    }
  ],
  "variables": [
    {
      "id": "mood",
      "name": "心情",
      "type": "number",
      "defaultValue": 50,
      "min": 0,
      "max": 100,
      "description": "主角对玩家的心情",
      "behaviorRules": "玩家友善、有趣或帮了忙时加 3 到 10。玩家无礼或冷淡时减 3 到 10。每回合最多变 10。"
    }
  ],
  "rules": [],
  "reactions": [
    {
      "id": "cheer-up",
      "name": "逗一逗按钮",
      "when": {
        "eventType": "action:fired",
        "match": {
          "actionId": {
            "operator": "eq",
            "value": "cheer_up"
          }
        }
      },
      "conditions": [],
      "conditionLogic": "all",
      "then": [
        {
          "type": "set",
          "path": "mood",
          "operation": "add",
          "value": 10
        }
      ],
      "priority": 0,
      "enabled": true
    }
  ],
  "audioTracks": [],
  "rootComponent": {
    "id": "mood-meter-ui",
    "name": "心情条",
    "entryFile": "index.tsx",
    "files": {
      "index.tsx": "export default function MoodMeter() {\n  const api = useYumina();\n  const mood = Number(api.variables.mood ?? 50);\n  const color = mood < 30 ? \"#6b8cff\" : mood < 70 ? \"#e0b44c\" : \"#ff6b8a\";\n  return (\n    <div style={{ position: \"fixed\", top: 64, right: 12, zIndex: 50, width: 168, padding: \"10px 12px\", borderRadius: 14, background: \"rgba(20,22,32,0.82)\", color: \"#fff\", fontSize: 13, fontFamily: \"system-ui, sans-serif\", boxShadow: \"0 6px 18px rgba(0,0,0,0.3)\" }}>\n      <div style={{ display: \"flex\", justifyContent: \"space-between\" }}>\n        <span>心情</span>\n        <b>{mood}</b>\n      </div>\n      <div style={{ height: 6, borderRadius: 3, background: \"rgba(255,255,255,0.15)\", margin: \"8px 0\" }}>\n        <div style={{ width: mood + \"%\", height: \"100%\", borderRadius: 3, background: color, transition: \"width .4s\" }} />\n      </div>\n      <button type=\"button\" disabled={api.readOnly} onClick={() => api.executeAction(\"cheer_up\")}\n        style={{ width: \"100%\", border: \"none\", borderRadius: 8, padding: \"6px 0\", cursor: \"pointer\", background: color, color: \"#1b1e2b\", fontWeight: 700 }}>\n        逗一逗\n      </button>\n    </div>\n  );\n}\n"
    },
    "updatedAt": "2026-11-30T00:00:00.000Z"
  }
}
