Azymoove Help

What the robot knows: state

Everything the sensors picked up in the last turn.

scan() returns the state, with what the robot knows at the start of the turn:

  • state.me: your robot (position, health, energy, shield, parts and attributes).
  • state.scanned: the enemies the radar is seeing, with the angles ready for aiming. Turning the body by bearing (this.turn(enemy.bearing)) points the gun at them.
  • state.events: what happened in the last turn (shots that hit, collisions…). See Events.
  • state.hazards: the announced scenery events, with the place and the turn of the strike.

The arena can be round or square, small (44), medium (58) or large (90 units). Use me.distanceToEdge for the real edge and me.centerBearing to head back to the center. me.parts and me.specs describe your build.

Every field

JavaScript / TypeScriptPython / Ruby / LuaWhat it does
specialReadyspecial_readyTrue when health is at 30% or less and the special attack hasn't been used yet.
itemsitemsYour items (up to 3, declared in the class with items). Each one: id, usable, ready, cooldown, charges, running, temporary and expires.
usableusableThe item has an ability for use_item (passive-only ones don't).
readyreadyuse_item would work now: no cooldown, uses and energy left.
cooldowncooldownTicks until the item can be used again.
chargeschargesThe item's uses left; nil/None = unlimited.
runningrunningTicks left of the item's effect (nitro, bubble, cloak, overcharge).
temporarytemporaryA temporary item from a mystery box: one use, vanishes in expires ticks.
helpershelpersOn the robot: the instances declared in helpers (new Drone()...), always in the same order. In me: your living helpers (data). In the state: enemy helpers the radar saw (with owner, distance and bearing); they don't go into scanned.
alivealiveThe helper is still in the battle; false once destroyed (it stays in the helpers list).
enemiesenemiesIn a helper's state: enemies the owner's radar or its own sensor sees, nearest first.
enemyHelpersenemy_helpersIn a helper's state: enemy helpers within the sensor's range.
ownerownerThe id of a helper's owner robot.
modemodeThe Drone's mode: follow, attack, guard or repair.
navigationnavigationNavigation at the start of the tick: status idle/moving/arrived/failed, target and reason. goTo returns immediate acceptance; arrived confirms the arrival.
statusstatusThe navigation's state: idle, moving, arrived or failed.
targettargetThe destination asked of the navigation, with x and z; null when there is none.
reasonreasonFailure: outside_map (includes lack of room), obstacle or no_path; null without failure.
mapmapThe robot's static grid (this.map/self.map/map): rows[z][x], 0=empty, 1=floor, 2=obstacle.
rowsrowsThe bitmap's rows; each character is a cell: 0, 1 or 2.
cellSizecell_sizeThe size of a cell in world units.
originoriginThe bitmap's starting corner. Cell center = origin + (index + 0.5) × cellSize.
arenaarenaThe arena's shape and dimensions (width, height). Navigation uses the same sensors in every shape.
centerBearingcenter_bearingHow much to turn the body to point at the center: turn(me.centerBearing). Works in any shape.
specsspecsThe effective attributes of your own assembly: speed, acceleration, range, recharge and costs. bulletSpeed multiplies (1.2 − 0.2 × power).
shapeshapeThe arena's shape: circle or square.
widthwidthThe arena's width in engine units.
heightheightThe arena's height on the XZ plane, in engine units.
maxVelocitymax_velocityThe assembly's effective maximum speed (units per tick).
bulletSpeedbullet_speedShot speed multiplier: (1.2 − 0.2 × power) × bulletSpeed.
chargingchargingWhether it's standing still preparing or recharging the battery.
rechargeRemainingrecharge_remainingPreparation ticks left; zero during the gradual recharge.
ticktickThe current tick number (30 per second).
arenaRadiusarena_radiusThe arena's radius; beyond it the robot falls and is out.
othersothersEnemies still alive.
memeYour robot.
scannedscannedEnemies in the radar's arc, nearest first.
eventseventsWhat happened to you in the last tick.
suppliessuppliesDrone deliveries: health, energy or a surprise chest (it may explode). Collect after land; vanishes at end.
hazardshazardsAnnounced scenery events (lava bomb, hail, lightning, meteor, geyser, rolling boulder).
kindkindThe event's kind: lavaBomb, firePool, hail, lightning, meteor, geyser or boulder.
radiusradiusThe radius of the event's strike.
impactimpactThe tick the event strikes (before that it's only the warning).
xxx position.
zzz position.
headingheadingThe body's direction (radians): it's where it shoots.
radarHeadingradar_headingThe radar's direction.
velocityvelocityUnits per tick (at most 0.26 with treads; depends on the body).
strafeVelocitystrafe_velocitySideways speed (positive = right).
punchCooldownpunch_cooldownTicks until it can punch again (0 = ready).
healthhealthHealth: shots and collisions take it; at 0 the robot is destroyed.
maxHealthmax_healthMaximum health (depends on the body).
energyenergyEnergy: actions use it; recharge() waits 1 s standing still and recovers 1.75 per tick with the default battery.
maxEnergymax_energyMaximum energy (depends on the battery).
shieldshieldShield (shield armor): absorbs damage before health and recharges.
maxShieldmax_shieldMaximum shield (30 with the shield armor, otherwise 0).
outsideTicksoutside_ticksTicks off the arena so far (spider legs hold on for a while).
edgeGraceedge_graceHow many ticks the robot can stay off the arena (spider: 30, others: 0).
partspartsThe enemy's effective parts (body, head, torso, weapon, armor).
bodybodyLocomotion base: wheels (explorador, operario, batedor, oficina), treads (guardiao, carregador, engenheiro, transporte), legs (mecanico, assistente, forca, tita) or spider (aranha, pesquisador, resgate, coletor).
weaponweaponThe right forearm's cannon: cannon, railgun, shotgun or minigun. Each weapon has its own 3D model; it replaces the right hand.
armorarmorArmor: none, plating, shield or reactive.
headheadHead and built-in sensors: the full ID, such as pesquisador.head. Sets range, arc, turning and cost.
torsotorsoTorso with built-in energy, recharge and ability: the full ID, such as mecanico.torso.
gunHeatgun_heatThe cannon only fires with gun_heat at 0.
remainingMoveremaining_moveHow much is left to move.
remainingTurnremaining_turnHow much the body will still turn.
remainingStraferemaining_strafeHow much is left to strafe.
remainingRadarTurnremaining_radar_turnHow much the radar will still turn.
distanceToEdgedistance_to_edgeDistance to the arena's edge (below 0, it fell).
distancedistanceDistance to the enemy.
bearingbearingHow much to turn the body (and the cannon, which is on the arm) to aim at the enemy: turn(target.bearing).
absoluteBearingabsolute_bearingAbsolute angle from you to the enemy.
radarBearingradar_bearingHow much to turn the radar to keep seeing the enemy.
ididThe robot's identifier.
namenameThe robot's name.