{
  "schemaVersion": 1,
  "atomId": "path_elimination_rules.aigameplay",
  "bundleType": "aigameplay",
  "category": "gameplay",
  "mode": "fixed",
  "label": { "zh": "路径消除核心玩法", "en": "Path elimination core gameplay" },
  "tags": ["gameplay", "path", "elimination", "arrow", "puzzle", "grid", "core", "swipe"],
  "bindingRoles": ["gameplayRule"],
  "generation": {
    "kind": "pgs",
    "pgsVersion": "1.0",
    "gameplayType": "path_elimination",
    "rules": {
      "gridSizeDynamic": true,
      "livesInitial": 3,
      "timerOptional": true,
      "comboEnabled": true
    }
  },
  "result": {
    "outputFile": "ref/pgs-schema.json",
    "format": "json",
    "constraints": { "testCasesMustPass": true }
  },
  "binding": {
    "role": "gameplayRule",
    "target": "src/game/",
    "type": "gameplay-module-reference",
    "constraints": {
      "requiredComponents": [
        "arrow_path_data_format.aicomponent",
        "path_renderer.aicomponent",
        "path_animation.aicomponent",
        "path_input_handler.aicomponent",
        "level_lifecycle.aicomponent"
      ]
    }
  },
  "imports": [
    { "slot": "engine",     "pinAtomId": "phaser.aicomponent",               "edgeKind": "requires", "bindAs": "engine" },
    { "slot": "levelData",  "pinAtomId": "arrow_path_data_format.aicomponent","edgeKind": "requires", "bindAs": "levelData" },
    { "slot": "renderer",   "pinAtomId": "path_renderer.aicomponent",        "edgeKind": "requires", "bindAs": "renderer" },
    { "slot": "animator",   "pinAtomId": "path_animation.aicomponent",       "edgeKind": "requires", "bindAs": "animator" },
    { "slot": "input",      "pinAtomId": "path_input_handler.aicomponent",   "edgeKind": "requires", "bindAs": "input" },
    { "slot": "lifecycle",  "pinAtomId": "level_lifecycle.aicomponent",      "edgeKind": "requires", "bindAs": "lifecycle" },
    { "slot": "boardLayout","pinAtomId": "grid_board_layout.aicomponent",    "edgeKind": "requires", "bindAs": "boardLayout" },
    {
      "slot": "directionalIndicator",
      "description": "棋盘上每条路径末端的方向指示视觉资源（4 方向箭头），可替换为其他视觉风格",
      "bindAs": "directionSprite",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": ["directionalIndicator"],
      "allowedBundleTypes": ["aiimage"],
      "constraints": { "directions": 4 },
      "cardinality": 1
    },
    {
      "slot": "bgMusic",
      "description": "背景循环音乐",
      "bindAs": "bgm",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": ["bgMusic"],
      "allowedBundleTypes": ["aiaudio"],
      "constraints": { "loop": true }
    },
    {
      "slot": "levelDataPack",
      "description": "关卡数据包（RawLevelJson 数组）",
      "bindAs": "levels",
      "required": true,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": ["levelDataPack"],
      "allowedBundleTypes": ["aiconfig"]
    },
    {
      "slot": "themeVariant",
      "description": "主题变体配置（颜色/关卡模式等）",
      "bindAs": "theme",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": ["themeVariantConfig"],
      "allowedBundleTypes": ["aiconfig"]
    },
    {
      "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": "background",
      "description": "游戏背景图",
      "bindAs": "bg",
      "required": false,
      "edgeKind": "compatibleWith",
      "matchBindingRoles": ["backgroundTexture"],
      "allowedBundleTypes": ["aiimage"]
    }
  ],
  "files": {
    "skill": "SKILL.md",
    "pgsSchema": "ref/pgs-schema.json"
  }
}
