{
  "format": 1,
  "type": "scene",
  "dimension": "2d",
  "name": "HollowHorde",
  "environment": { "background": "#0d1022" },
  "viewport": { "design": [960, 540], "fit": "expand" },
  "physics": { "gravity": [0, 0] },
  "input": {
    "move": {
      "type": "vector2",
      "keys": {
        "up": ["KeyW", "ArrowUp"],
        "down": ["KeyS", "ArrowDown"],
        "left": ["KeyA", "ArrowLeft"],
        "right": ["KeyD", "ArrowRight"]
      },
      "touch": "joystick"
    },
    "pause": { "type": "button", "keys": ["Escape"] },
    "restart": { "type": "button", "keys": ["KeyR"] }
  },
  "assets": {
    "knight": {
      "type": "spritesheet",
      "url": "incanto/assets/characters/medieval-knight.png",
      "frameWidth": 192,
      "frameHeight": 192,
      "filter": "nearest",
      "source": "built-in 'medieval-knight' — idle 0-5, move 6-11. URL injected in main.ts."
    },
    "goblin": {
      "type": "spritesheet",
      "url": "incanto/assets/characters/goblin.png",
      "frameWidth": 192,
      "frameHeight": 192,
      "filter": "nearest",
      "source": "built-in 'goblin' — idle 0-6, move 7-12. URL injected in main.ts."
    },
    "ghost": {
      "type": "spritesheet",
      "url": "incanto/assets/characters/ghost.png",
      "frameWidth": 112,
      "frameHeight": 128,
      "filter": "nearest",
      "source": "built-in 'ghost' — idle 0-5, move 6-11. URL injected in main.ts."
    }
  },
  "root": {
    "name": "Game",
    "type": "Node",
    "script": { "name": "ScoreKeeper", "props": { "scoreToWin": 1, "lives": 1 } },
    "children": [
      {
        "name": "Floor",
        "type": "Node2D",
        "props": { "position": [0, 0] },
        "script": {
          "name": "GridFloor",
          "props": { "color": "#12152a", "line": "#1d244a", "cell": 200, "lines": 26 }
        },
        "uid": "n_gyoazhctbyg011uf"
      },
      {
        "name": "Player",
        "type": "CharacterBody2D",
        "groups": ["player"],
        "props": { "position": [0, 0], "collider": { "shape": "circle", "radius": 15 } },
        "script": { "name": "Survivor" },
        "children": [
          {
            "name": "Skin",
            "type": "AnimatedSprite2D",
            "props": {
              "sheet": "$knight",
              "autoplay": "idle",
              "scale": [0.46, 0.46],
              "anchor": [0.5, 0.56],
              "animations": {
                "idle": { "frames": [0, 5], "fps": 10, "loop": true },
                "move": { "frames": [6, 11], "fps": 14, "loop": true }
              }
            },
            "uid": "n_yll7rl1d6l5iq4c0"
          },
          {
            "name": "Vitals",
            "type": "Node2D",
            "script": { "name": "Health", "props": { "max": 100, "invulnerableFor": 0.6 } },
            "uid": "n_bk99wi475y8y1c1g"
          }
        ],
        "uid": "n_xnwc91u08q2deb34"
      },
      {
        "name": "GoblinSpawner",
        "type": "Node2D",
        "props": { "position": [0, 0] },
        "script": {
          "name": "Spawner",
          "props": { "prefab": "GoblinTemplate", "interval": 1.3, "max": 44, "total": 0 }
        },
        "children": [
          {
            "name": "GoblinTemplate",
            "type": "CharacterBody2D",
            "groups": ["enemy"],
            "props": {
              "position": [0, 0],
              "visible": false,
              "collider": { "shape": "circle", "radius": 15 }
            },
            "script": {
              "name": "Health",
              "props": { "max": 3, "freeOnDeath": true, "knockback": 240, "staggerSeconds": 0.1 }
            },
            "children": [
              {
                "name": "Skin",
                "type": "AnimatedSprite2D",
                "props": {
                  "sheet": "$goblin",
                  "autoplay": "move",
                  "scale": [0.4, 0.4],
                  "anchor": [0.5, 0.58],
                  "animations": {
                    "idle": { "frames": [0, 6], "fps": 9, "loop": true },
                    "move": { "frames": [7, 12], "fps": 12, "loop": true }
                  }
                },
                "uid": "n_9062s2tszonwgz8t"
              },
              {
                "name": "AI",
                "type": "Node2D",
                "script": {
                  "name": "Chase",
                  "props": { "target": "/root/Player", "speed": 62, "moveParent": true }
                },
                "uid": "n_pyb54alv0xh0gvn4"
              },
              {
                "name": "Face",
                "type": "Node2D",
                "script": { "name": "EnemyFace" },
                "uid": "n_uww78ofvpq4ecg8k"
              },
              {
                "name": "Hit",
                "type": "Area2D",
                "props": { "collider": { "shape": "circle", "radius": 18 } },
                "script": {
                  "name": "DamageOnContact",
                  "props": {
                    "amount": 8,
                    "targetGroup": "player",
                    "oncePerTarget": false,
                    "repeatEvery": 0.5
                  }
                },
                "uid": "n_ginsxe3jwhnivcps"
              },
              {
                "name": "Drop",
                "type": "Node2D",
                "script": { "name": "EnemyDrop", "props": { "xp": 1, "color": "#ff8a5b" } },
                "uid": "n_ik9ixyv3h463m3bj"
              }
            ],
            "uid": "n_la5pj943qw63cztp"
          }
        ],
        "uid": "n_28y9rya6vgc6k2fe"
      },
      {
        "name": "GhostSpawner",
        "type": "Node2D",
        "props": { "position": [0, 0] },
        "script": {
          "name": "Spawner",
          "props": { "prefab": "GhostTemplate", "interval": 2.8, "max": 22, "total": 0 }
        },
        "children": [
          {
            "name": "GhostTemplate",
            "type": "CharacterBody2D",
            "groups": ["enemy"],
            "props": {
              "position": [0, 0],
              "visible": false,
              "collider": { "shape": "circle", "radius": 14 }
            },
            "script": {
              "name": "Health",
              "props": { "max": 5, "freeOnDeath": true, "knockback": 240, "staggerSeconds": 0.1 }
            },
            "children": [
              {
                "name": "Skin",
                "type": "AnimatedSprite2D",
                "props": {
                  "sheet": "$ghost",
                  "autoplay": "move",
                  "scale": [0.6, 0.6],
                  "anchor": [0.5, 0.6],
                  "opacity": 0.92,
                  "animations": {
                    "idle": { "frames": [0, 5], "fps": 9, "loop": true },
                    "move": { "frames": [6, 11], "fps": 12, "loop": true }
                  }
                },
                "uid": "n_l6q192h44anj9bhr"
              },
              {
                "name": "AI",
                "type": "Node2D",
                "script": {
                  "name": "Chase",
                  "props": { "target": "/root/Player", "speed": 98, "moveParent": true }
                },
                "uid": "n_runap60ko5ppsjjz"
              },
              {
                "name": "Face",
                "type": "Node2D",
                "script": { "name": "EnemyFace" },
                "uid": "n_wkgtjkvevrhj9z9q"
              },
              {
                "name": "Hit",
                "type": "Area2D",
                "props": { "collider": { "shape": "circle", "radius": 16 } },
                "script": {
                  "name": "DamageOnContact",
                  "props": {
                    "amount": 12,
                    "targetGroup": "player",
                    "oncePerTarget": false,
                    "repeatEvery": 0.5
                  }
                },
                "uid": "n_qhvl3puoq1ar87qr"
              },
              {
                "name": "Drop",
                "type": "Node2D",
                "script": { "name": "EnemyDrop", "props": { "xp": 2, "color": "#8fd0ff" } },
                "uid": "n_ldwl2f8oqqnmv0uc"
              }
            ],
            "uid": "n_2ntnqo7i21w7ci8x"
          }
        ],
        "uid": "n_dywyxuosw77s1c2z"
      },
      {
        "name": "Director",
        "type": "Node2D",
        "script": {
          "name": "Director",
          "props": {
            "spawners": ["/root/GoblinSpawner", "/root/GhostSpawner"],
            "ringMin": 380,
            "ringMax": 560
          }
        },
        "uid": "n_ogqmx4zzhsrcrqk7"
      },
      {
        "name": "Camera",
        "type": "Camera2D",
        "props": { "current": true },
        "script": {
          "name": "FollowCamera",
          "props": { "target": "/root/Player", "smoothing": 0.86 }
        },
        "uid": "n_2c36byg8q2ob5w7l"
      },
      {
        "name": "SfxShoot",
        "type": "AudioPlayer",
        "props": { "preset": "shoot", "bus": "sfx", "volume": 0.28 },
        "uid": "n_d0ejl6328op4o5zo"
      },
      {
        "name": "SfxXp",
        "type": "AudioPlayer",
        "props": { "preset": "coin", "bus": "sfx", "volume": 0.4 },
        "uid": "n_v82hfmgahhqd7qyw"
      },
      {
        "name": "SfxKill",
        "type": "AudioPlayer",
        "props": { "preset": "hit", "bus": "sfx", "volume": 0.3 },
        "uid": "n_7cwqf3w8q2avgnll"
      },
      {
        "name": "SfxHurt",
        "type": "AudioPlayer",
        "props": { "preset": "hurt", "bus": "sfx", "volume": 0.55 },
        "uid": "n_xgtwcz56c0kmh2mr"
      },
      {
        "name": "SfxWin",
        "type": "AudioPlayer",
        "props": { "preset": "win", "bus": "sfx", "volume": 0.8 },
        "uid": "n_ylglu2j9xvu80el3"
      },
      {
        "name": "SfxLose",
        "type": "AudioPlayer",
        "props": { "preset": "lose", "bus": "sfx", "volume": 0.8 },
        "uid": "n_9c48ixvudwh3egqc"
      },
      {
        "name": "Flow",
        "type": "Node",
        "uid": "n_k1b5tdq7qfgute05",
        "script": { "name": "GameFlow" }
      },
      {
        "name": "Hud",
        "type": "HudLayer",
        "uid": "n_t21l3ly0b78tuyhf",
        "children": [
          {
            "name": "PauseMenu",
            "type": "UiPanel",
            "uid": "n_4zudk60s8o480dzn",
            "props": {
              "anchor": "center",
              "layout": "column",
              "gap": 12,
              "padding": 22,
              "visible": false,
              "background": "rgba(10,14,22,0.92)",
              "radius": 12
            },
            "children": [
              {
                "name": "PausedTitle",
                "type": "UiText",
                "uid": "n_jkw1i6abam6b2ich",
                "props": { "text": "PAUSED", "size": 26 }
              },
              {
                "name": "Resume",
                "type": "UiButton",
                "uid": "n_4xe73y1h6dfx33xx",
                "props": { "text": "RESUME", "size": 18 }
              },
              {
                "name": "PauseOptions",
                "type": "UiButton",
                "uid": "n_vld87yos9y2n1ktz",
                "props": { "text": "OPTIONS", "size": 16 }
              },
              {
                "name": "Restart",
                "type": "UiButton",
                "uid": "n_vwt3fbpsozqfdm80",
                "props": { "text": "START OVER", "size": 16 }
              }
            ]
          },
          {
            "name": "Options",
            "type": "UiPanel",
            "uid": "n_u1q9tf8qi4kd95xc",
            "props": {
              "anchor": "center",
              "layout": "column",
              "gap": 10,
              "padding": 22,
              "visible": false,
              "background": "rgba(10,14,22,0.92)",
              "radius": 12
            },
            "children": [
              {
                "name": "OptionsTitle",
                "type": "UiText",
                "uid": "n_9m4wm8glz3ah8rr3",
                "props": { "text": "OPTIONS", "size": 24 }
              },
              {
                "name": "Master",
                "type": "UiVolumeSlider",
                "uid": "n_0xk7mn0j15d0kaq2",
                "props": { "label": "master", "bus": "master", "width": 260 }
              },
              {
                "name": "Sfx",
                "type": "UiVolumeSlider",
                "uid": "n_fdvxcfvz0c2axgm9",
                "props": { "label": "effects", "bus": "sfx", "width": 260 }
              },
              {
                "name": "Mute",
                "type": "UiMuteToggle",
                "uid": "n_f8cpyypniznhbja3",
                "props": { "label": "mute everything" }
              },
              {
                "name": "Quality",
                "type": "UiQualitySelect",
                "uid": "n_d97o1nvn1ujgjfwe",
                "props": { "label": "quality" }
              },
              {
                "name": "Back",
                "type": "UiButton",
                "uid": "n_0c24jyr9ddbkk5vb",
                "props": { "text": "BACK", "size": 16 }
              }
            ]
          }
        ]
      }
    ],
    "uid": "n_tlqu945vs98khzn8"
  },
  "connections": [
    { "signal": "died", "from": "Player/Vitals", "to": "/root", "handler": "loseLife" },
    { "signal": "damaged", "from": "Player/Vitals", "to": "SfxHurt", "handler": "play" },
    { "signal": "won", "from": "/root", "to": "SfxWin", "handler": "play" },
    { "signal": "lost", "from": "/root", "to": "SfxLose", "handler": "play" },
    {
      "from": "/root/Hud/PauseMenu/Resume",
      "signal": "pressed",
      "to": "/root/Flow",
      "handler": "resume"
    },
    {
      "from": "/root/Hud/PauseMenu/PauseOptions",
      "signal": "pressed",
      "to": "/root/Flow",
      "handler": "screen",
      "args": ["/root/Hud/Options"]
    },
    {
      "from": "/root/Hud/PauseMenu/Restart",
      "signal": "pressed",
      "to": "/root/Flow",
      "handler": "restart"
    },
    {
      "from": "/root/Hud/Options/Back",
      "signal": "pressed",
      "to": "/root/Flow",
      "handler": "back"
    }
  ]
}
