{
  "arena": {
    "width": 9,
    "height": 9,
    "rocks": [
      "3,3",
      "5,3",
      "3,5",
      "5,5"
    ],
    "max_ticks": 40,
    "your_rows": "row 0 is your back line, row 3 is your front line; the enemy is mirrored"
  },
  "note": "Squads: five fighters, no shop, no gold, no cost budget. Unit 'cost' is a legacy number from the retired draft mode and does not apply to squads.",
  "legacy_draft_mode_ignore": {
    "seats": 8,
    "start_life": 30,
    "start_gold": 6,
    "max_rounds": 15,
    "shop_size": 5,
    "reroll_cost": 2,
    "bench_size": 6,
    "team_cap_by_round": [
      2,
      3,
      3,
      4,
      4,
      5,
      5,
      6,
      6,
      6,
      6,
      6,
      6,
      6,
      6
    ],
    "income": "5 + 1 per 10 gold saved (max 3) + streak bonus (2+ streak: 1, 4+: 2)",
    "damage": "loser takes 2 + number of surviving enemy units",
    "merge": "3 copies of the same unit and star merge into the next star",
    "star_multiplier": {
      "2": 1.8,
      "3": 3.2
    }
  },
  "units": {
    "Knight": {
      "cost": 3,
      "hp": 26,
      "atk": 6,
      "range": 1,
      "move": 1,
      "armor": 2,
      "speed": 3,
      "tags": [
        "melee",
        "armored"
      ],
      "note": "Sturdy frontline. Armor 2 shrugs off arrows."
    },
    "Tank": {
      "cost": 4,
      "hp": 45,
      "atk": 4,
      "range": 1,
      "move": 1,
      "armor": 3,
      "speed": 1,
      "tags": [
        "melee",
        "armored"
      ],
      "note": "Huge HP, armor 3, slow, weak hits. Soaks damage."
    },
    "Spearman": {
      "cost": 2,
      "hp": 20,
      "atk": 6,
      "range": 2,
      "move": 1,
      "armor": 1,
      "speed": 3,
      "tags": [
        "melee"
      ],
      "note": "Reach 2. +5 damage vs fast units (Scout, Assassin)."
    },
    "Scout": {
      "cost": 2,
      "hp": 15,
      "atk": 5,
      "range": 1,
      "move": 3,
      "armor": 0,
      "speed": 6,
      "tags": [
        "fast"
      ],
      "note": "Moves 3. Cheap. Dives archers and snipers."
    },
    "Assassin": {
      "cost": 4,
      "hp": 16,
      "atk": 12,
      "range": 1,
      "move": 2,
      "armor": 0,
      "speed": 5,
      "tags": [
        "fast"
      ],
      "note": "Hits for 12, ignores armor. Fragile."
    },
    "Archer": {
      "cost": 3,
      "hp": 16,
      "atk": 6,
      "range": 3,
      "move": 1,
      "armor": 0,
      "speed": 4,
      "tags": [
        "ranged"
      ],
      "note": "Range 3. Reliable damage, dies to anything that reaches it."
    },
    "Sniper": {
      "cost": 4,
      "hp": 8,
      "atk": 7,
      "range": 4,
      "minRange": 2,
      "move": 1,
      "armor": 0,
      "speed": 4,
      "tags": [
        "ranged"
      ],
      "note": "Range 4, cannot shoot adjacent. Hard hitting, paper thin."
    },
    "Mage": {
      "cost": 4,
      "hp": 14,
      "atk": 8,
      "range": 2,
      "move": 1,
      "armor": 0,
      "speed": 2,
      "tags": [
        "ranged",
        "splash"
      ],
      "note": "Hits target for 8 and every enemy next to it for 4."
    },
    "Healer": {
      "cost": 3,
      "hp": 14,
      "atk": 2,
      "range": 1,
      "move": 1,
      "armor": 0,
      "speed": 2,
      "tags": [
        "support"
      ],
      "note": "heal action: +6 HP to the most hurt ally within 2."
    },
    "Bomber": {
      "cost": 2,
      "hp": 12,
      "atk": 18,
      "range": 1,
      "move": 2,
      "armor": 0,
      "speed": 4,
      "tags": [
        "fast",
        "splash"
      ],
      "note": "Attacking = exploding: 18 to every enemy within 1, Bomber dies."
    }
  },
  "traits": {
    "Armored": {
      "units": [
        "Knight",
        "Tank"
      ],
      "tiers": [
        {
          "count": 2,
          "effect": "+1 armor to Armored fighters"
        },
        {
          "count": 3,
          "effect": "+2 armor and +6 HP to Armored fighters"
        }
      ]
    },
    "Fast": {
      "units": [
        "Scout",
        "Assassin",
        "Bomber"
      ],
      "tiers": [
        {
          "count": 2,
          "effect": "+1 move to Fast fighters"
        },
        {
          "count": 3,
          "effect": "+1 move and +3 attack to Fast fighters"
        }
      ]
    },
    "Ranged": {
      "units": [
        "Archer",
        "Sniper",
        "Mage"
      ],
      "tiers": [
        {
          "count": 2,
          "effect": "+1 attack to Ranged fighters"
        },
        {
          "count": 3,
          "effect": "+2 attack and +4 HP to Ranged fighters"
        }
      ]
    },
    "Melee": {
      "units": [
        "Knight",
        "Tank",
        "Spearman"
      ],
      "tiers": [
        {
          "count": 2,
          "effect": "+4 HP to Melee fighters"
        },
        {
          "count": 3,
          "effect": "+10 HP to Melee fighters"
        }
      ]
    },
    "Splash": {
      "units": [
        "Mage",
        "Bomber"
      ],
      "tiers": [
        {
          "count": 2,
          "effect": "+3 attack to Splash fighters"
        }
      ]
    },
    "Support": {
      "units": [
        "Healer"
      ],
      "tiers": [
        {
          "count": 2,
          "effect": "+1 attack (heal 3x attack) to Support fighters"
        }
      ]
    }
  },
  "conditions": [
    "always",
    "enemy_in_range",
    "enemy_within:N",
    "no_enemy_within:N",
    "hp_below:P",
    "hp_above:P",
    "ally_hp_below:P",
    "tick_before:N",
    "tick_after:N",
    "outnumbered",
    "enemy_type_in_range:Type",
    "retreating",
    "ally_type_hp_below:Type:P",
    "ally_type_dead:Type",
    "team_hp_below:P",
    "enemy_type_alive:Type",
    "flanked",
    "ally_engaged:Type"
  ],
  "actions": [
    "attack:nearest",
    "attack:weakest",
    "attack:strongest",
    "attack:ranged",
    "attack:type:Type",
    "attack:focus",
    "move:toward_nearest_enemy",
    "move:toward_weakest_enemy",
    "move:toward_ranged_enemy",
    "move:toward_ally_type:Type",
    "move:toward_enemy_type:Type",
    "move:toward_type:Type",
    "move:flank_left",
    "move:flank_right",
    "move:away",
    "move:center",
    "move:toward_ally",
    "move:hold",
    "retreat_until:P",
    "heal"
  ],
  "condition_help": {
    "always": "every tick",
    "enemy_in_range": "an enemy is inside my attack range",
    "enemy_within:N": "an enemy is N tiles away or closer",
    "no_enemy_within:N": "no enemy within N tiles",
    "hp_below:P": "my HP is under P percent",
    "hp_above:P": "my HP is P percent or more",
    "ally_hp_below:P": "an ally within 2 tiles is under P percent",
    "tick_before:N": "before tick N",
    "tick_after:N": "from tick N on",
    "outnumbered": "they have more units alive than we do",
    "enemy_type_in_range:Type": "an enemy of that type is in my range",
    "retreating": "I am currently retreating (set by retreat_until)",
    "ally_type_hp_below:Type:P": "my ally of that type is under P percent",
    "ally_type_dead:Type": "my ally of that type is dead",
    "team_hp_below:P": "our whole team is under P percent of its total HP",
    "enemy_type_alive:Type": "an enemy of that type is still alive",
    "flanked": "I have reached my flank lane",
    "ally_engaged:Type": "my ally of that type has an enemy in its attack range (use it to wait for the tank to go in first)"
  },
  "action_help": {
    "attack:nearest": "hit the closest enemy in range",
    "attack:weakest": "hit the lowest-HP enemy in range",
    "attack:strongest": "hit the highest-attack enemy in range",
    "attack:ranged": "prefer ranged enemies in range",
    "attack:type:Type": "hit that type if in range",
    "attack:focus": "hit the team focus list in order (set in the plan)",
    "move:toward_nearest_enemy": "advance on the closest enemy",
    "move:toward_weakest_enemy": "advance on the weakest enemy",
    "move:toward_ranged_enemy": "charge their back line (ranged units)",
    "move:toward_ally_type:Type": "move next to my ally of that type",
    "move:toward_enemy_type:Type": "advance on the nearest enemy of that type",
    "move:toward_type:Type": "old name: ally of that type first, enemy of that type if I have no such ally",
    "move:flank_left": "hug the left edge column until I am past their front line, then turn in on their ranged units",
    "move:flank_right": "same, down the right edge",
    "move:away": "back away from the nearest enemy",
    "move:center": "take the middle",
    "move:toward_ally": "regroup on the nearest ally",
    "move:hold": "stay put",
    "retreat_until:P": "fall back to the healer (or away) and keep retreating until healed to P percent, then resume orders",
    "heal": "Healer only: heal the most hurt ally within 2"
  },
  "squad": {
    "starters": 5,
    "bench": 3,
    "best_of": 3,
    "levels": "a bot earns 2 xp for a league win, 1 for a loss; level 2 at 60 xp (+25% hp and attack), level 3 at 200 (+50%)",
    "plan": "the general sets focus (target priority), team_rules (run before each bot's own rules), and orders (plain text, for humans)"
  },
  "default_behaviour": "a unit with no matching rule attacks the nearest enemy in range, else moves toward the nearest enemy; a unit that moved still attacks if something is in range"
}