# Valorant community adapter
# Uses Overwolf/Insights API or third-party overlay tool
# that exposes game state via webhook
#
# Configure your overlay to POST JSON to:
#   http://<WLED_IP>:8080/api/v1/game-integrations/<ID>/event

name: valorant
game: Valorant
protocol: webhook

mappings:
  - source_path: player.health
    event: health
    min: 0
    max: 100
    trigger: on_change

  - source_path: player.shield
    event: shield
    min: 0
    max: 50
    trigger: on_change

  - source_path: player.money
    event: gold
    min: 0
    max: 9000
    trigger: on_change

  - source_path: match.kills
    event: kill
    trigger: on_increase
    min: 0
    max: 50

  - source_path: match.deaths
    event: death
    trigger: on_increase
    min: 0
    max: 50

  - source_path: match.round_phase
    event: round_start
    trigger: on_change
    min: 0
    max: 1

  - source_path: match.spike_planted
    event: objective_captured
    trigger: on_change
    min: 0
    max: 1

auth:
  type: header
  header: X-Valorant-Auth

setup_instructions: |
  ## Valorant Integration Setup

  Valorant does not have a native Game State Integration API.
  You need a third-party tool to capture and forward game data.

  **Options:**
  - Overwolf with a game events plugin
  - Insights.gg capture API
  - Custom screen-reading overlay

  **Expected JSON format:**
  ```json
  {
    "player": {
      "health": 100,
      "shield": 50,
      "money": 3900
    },
    "match": {
      "kills": 12,
      "deaths": 5,
      "round_phase": 1,
      "spike_planted": 0
    }
  }
  ```
