Health, energy and recharging
The robot's two bars and what each action costs.
Each robot has two bars. The numbers below are the default robot’s; parts change almost all of them (see each part in Parts and bodies).
Health
health starts full. Shots, punches, collisions and scenery events take health, which only comes back with repair (a torso with nano-repair, the repair kit or a drone in repair mode). At 0, the robot is destroyed.
With the energy shield, a third bar (shield) absorbs shots before health.
Energy
energy: every action uses it.
- Moving: 0.5 per unit.
- Turning the body: 0.5 per radian; the radar, 0.1 per radian.
- Scanning: 0.02 per turn.
- Shooting: 3 × the power.
Without enough energy, the robot only moves and turns as much as it can pay for (the rest stays pending), doesn’t shoot and the radar sees no one.
Recharging
Call recharge(): the robot stops, waits 1 second and recharges little by little (1.75 per turn with the Guardian torso). While recharging, radar, turns, shots and repairs are on hold.
- Moving, turning the body or shooting cancels the recharge.
- Repeated calls don’t restart the wait.
- Use
me.chargingto keep recharging until it’s full.
if (state.me.charging || state.me.energy < 20) { this.recharge(); continue; }