# Rules table (v0.22.0)

Every number the engine uses. Your bot also receives this table at match start, in `hello.rules`. The raw JSON is at [/docs/rules.json](/docs/rules.json).

## Read this before trusting `zone.start_tick`

`zone.start_tick` is 200, but on the ladder's maps that first scheduled shrink still covers the whole map, so it doesn't hurt. The shrinks that actually move the safe square are listed below (see the zone rulings under Implementation rulings in [/docs/spec](/docs/spec)). Trust `observation.zone.shrinks_in`, which counts down the 20 ticks before each real shrink. Outside the zone you take 5 damage a tick, plus 5 for every 20 consecutive ticks outside.

| map | size | starting radius | shrinks that move the zone |
| --- | --- | --- | --- |
| arena-21 | 21×21 | 10 | tick 260 → radius 9, tick 320 → radius 7, tick 380 → radius 5, tick 440 → radius 3, tick 500 → radius 1 |
| columns-21 | 21×21 | 10 | tick 260 → radius 9, tick 320 → radius 7, tick 380 → radius 5, tick 440 → radius 3, tick 500 → radius 1 |
| pillars-21 | 21×21 | 10 | tick 260 → radius 9, tick 320 → radius 7, tick 380 → radius 5, tick 440 → radius 3, tick 500 → radius 1 |

## Other notes

- Speed and range are in tiles along the major axis (Chebyshev distance), like movement.
- Timing per attack (cooldown, warning by distance) and the cheapest counter to each are on [/docs/frame-data](/docs/frame-data).
- A cooldown of c means the ability is usable again c ticks after you use it.
- `pickups`: every pad is stocked on tick `first_spawn` and restocks `respawn` ticks after it is taken. A `duration` counts the tick the buff is taken, and `damage_multiplier` is a fraction. Pads are listed in `hello.pickups`; each ladder map has 4 of them.

## The table

```json
{
  "version": "0.22.0",
  "ticks_per_second": 10,
  "max_ticks": 600,
  "stats": {
    "max_hp": 130,
    "move_cooldown": 2,
    "sight_radius": 8,
    "armor": 0
  },
  "attacks": {
    "ranged": {
      "kind": "projectile",
      "damage": 12,
      "speed": 2,
      "cooldown": 6,
      "bounces": 1
    },
    "frostburst": {
      "kind": "area",
      "damage": 14,
      "range": 7,
      "cooldown": 14,
      "fuse": 6,
      "radius": 1,
      "slow": 2
    },
    "repulsor": {
      "kind": "burst",
      "damage": 5,
      "range": 1,
      "cooldown": 12,
      "push": 3
    }
  },
  "dash": {
    "distance": 3,
    "cooldown": 12,
    "recovery": 1
  },
  "knockback": {
    "wall_slam_damage": 10,
    "wall_slam_stun": 3,
    "fighter_collision_damage": 5
  },
  "zone": {
    "start_tick": 200,
    "interval": 60,
    "step": 2,
    "min_radius": 1,
    "warning_ticks": 20,
    "damage_base": 5,
    "damage_step": 5,
    "damage_step_ticks": 20
  },
  "pickups": {
    "first_spawn": 20,
    "health": {
      "amount": 32,
      "respawn": 120
    },
    "power": {
      "duration": 50,
      "damage_multiplier": [
        3,
        2
      ],
      "respawn": 200
    }
  },
  "shout": {
    "max_length": 40,
    "cooldown": 20
  },
  "limits": {
    "startup_ms": 10000,
    "tick_ms": 1000,
    "match_budget_ms": 300000,
    "max_consecutive_failures": 10,
    "reconnect_grace_ms": 10000,
    "max_message_bytes": 4096
  }
}
```
