{
  "schemaVersion": 1,
  "atomId": "bubble_shooter.aigameplay",
  "bundleType": "aigameplay",
  "category": "gameplay",
  "mode": "fixed",
  "label": {
    "zh": "泡泡射击消除",
    "en": "Bubble Shooter gameplay"
  },
  "tags": [
    "gameplay",
    "bubble",
    "shooter",
    "eliminate",
    "casual",
    "color",
    "aim"
  ],
  "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": "bubbleTextures",
      "description": "泡泡颜色贴图集",
      "bindAs": "bubbles",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": [
        "tileTextureSet"
      ],
      "allowedBundleTypes": [
        "aiimage"
      ]
    },
    {
      "slot": "levelDataPack",
      "description": "关卡数据包",
      "bindAs": "levels",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": [
        "levelDataPack"
      ],
      "allowedBundleTypes": [
        "aiconfig"
      ]
    },
    {
      "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": "bubble_shooter",
    "rules": {
      "minClusterSize": 3,
      "wallBounceEnabled": true,
      "orphanDropEnabled": true,
      "advanceRowAfterShots": 5,
      "colorCount": 6
    }
  },
  "result": {
    "outputFile": "reducer.ts",
    "format": "typescript",
    "constraints": {
      "testCasesMustPass": true
    }
  },
  "binding": {
    "role": "gameplayRule",
    "target": "game/gameplay/bubble_shooter/reducer.ts",
    "type": "gameplay-module-reference",
    "constraints": {
      "interface": [
        "init(config)",
        "dispatch(action)",
        "getState()",
        "calculateTrajectory(state, angle)",
        "snapToGrid(position)",
        "findCluster(board, col, row)",
        "popCluster(state, cluster)",
        "findOrphans(board)",
        "dropOrphans(state, orphans)",
        "calculateScore(popped, dropped)"
      ]
    }
  },
  "files": {
    "skill": "SKILL.md",
    "pgsSchema": "ref/pgs-schema.json",
    "reducerTemplate": "ref/reducer.template.ts"
  }
}
