{
  "schemaVersion": 1,
  "atomId": "eight_ball_pool.aigameplay",
  "bundleType": "aigameplay",
  "category": "gameplay",
  "mode": "fixed",
  "label": {
    "zh": "8球台球玩法",
    "en": "8-Ball Pool gameplay"
  },
  "tags": [
    "gameplay",
    "billiards",
    "pool",
    "physics",
    "aim",
    "sports"
  ],
  "bindingRoles": [
    "gameplayRule"
  ],
  "imports": [
    {
      "slot": "engine",
      "pinAtomId": "phaser.aicomponent",
      "edgeKind": "requires",
      "bindAs": "engine"
    },
    {
      "slot": "bgMusic",
      "description": "背景循环音乐",
      "bindAs": "bgm",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": [
        "bgMusic"
      ],
      "allowedBundleTypes": [
        "aiaudio"
      ],
      "constraints": {
        "loop": true
      }
    },
    {
      "slot": "background",
      "description": "台球桌背景图",
      "bindAs": "bg",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": [
        "backgroundTexture"
      ],
      "allowedBundleTypes": [
        "aiimage"
      ]
    },
    {
      "slot": "tutorial",
      "description": "新手引导浮层",
      "bindAs": "tutorial",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": [
        "tutorialOverlay"
      ],
      "allowedBundleTypes": [
        "aicomponent"
      ]
    },
    {
      "slot": "winPanel",
      "description": "通关反馈面板视觉",
      "bindAs": "winPanel",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": [
        "successFeedbackPanel"
      ],
      "allowedBundleTypes": [
        "aiimage"
      ]
    },
    {
      "slot": "losePanel",
      "description": "失败反馈面板视觉",
      "bindAs": "losePanel",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": [
        "failFeedbackPanel"
      ],
      "allowedBundleTypes": [
        "aiimage"
      ]
    },
    {
      "slot": "endScreen",
      "description": "可玩广告结算屏（含 CTA 按钮）",
      "bindAs": "endScreen",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": [
        "playableEndScreenLayout"
      ],
      "allowedBundleTypes": [
        "aicomponent"
      ]
    }
  ],
  "generation": {
    "kind": "pgs",
    "pgsVersion": "1.0",
    "gameplayType": "eight_ball_pool",
    "rules": {
      "ballCount": 16,
      "pocketCount": 6,
      "physicsStepsPerFrame": 10,
      "minSeparationAngle": 5,
      "singlePlayer": true
    }
  },
  "result": {
    "outputFile": "reducer.ts",
    "format": "typescript",
    "constraints": {
      "testCasesMustPass": true
    }
  },
  "binding": {
    "role": "gameplayRule",
    "target": "game/gameplay/eight_ball_pool/reducer.ts",
    "type": "gameplay-module-reference",
    "constraints": {
      "interface": [
        "init(config)",
        "dispatch(action)",
        "getState()",
        "aimCueBall(state, angle, power)",
        "shootCueBall(state)",
        "applyPhysicsStep(state, dt)",
        "checkPockets(state)",
        "determineTurn(state)"
      ]
    }
  },
  "files": {
    "skill": "SKILL.md",
    "pgsSchema": "ref/pgs-schema.json",
    "reducerTemplate": "ref/reducer.template.ts"
  }
}
