Scenery events
Every 5 to 9 seconds the scenery attacks the arena.

Every 5 to 9 seconds the scenery attacks the arena. Events are announced in advance: the target shows on the ground and in state.hazards (kind, x, z, radius, and the turn of the strike in impact). An attentive robot gets out of the way.
- The damage goes through armor and shield.
- Whoever is hit gets the
hitByHazardevent (hazard,damage, drainedenergy,bearing). - The scenery comes from the battle’s seed, and so do the events: replaying the battle brings the same ones.
| Scenery | Event | What it does |
|---|---|---|
| 🌋 Volcano | lavaBomb |
12 damage and a pool of fire that burns for 5 s. |
| 🪐 Space | meteor |
Long warning, large area: 18 damage, throwing robots away. |
| 🏝️ Island | geyser |
8 damage, launching robots far away. |
| 🧊 Glacier | hail |
7 hailstones in a row, 4 damage each. |
| 🏜️ Canyon | boulder |
A boulder rolls along a lane: 10 damage, pushing robots aside. |
| 🌃 Neon | lightning |
Short warning: 13 damage, draining 25 energy. |
Maps with terrain use their base scenery’s events (for example, the Lava Fortress uses the Volcano’s).
Dodging in code
const state = this.scan();
for (const hazard of state.hazards) {
const dx = state.me.x - hazard.x, dz = state.me.z - hazard.z;
if (Math.hypot(dx, dz) < hazard.radius + 2) {
this.move(5); // leave the area before the strike
}
}



