Skip to content

five-on-it / packages/sim/src/robots

packages/sim/src/robots ​

The police's robots (GAME_DESIGN §12, eight stars, the tech division; C27, C28): what the simulation knows of them. A robot is a character with Character.robot set: a ComplianceBot™ (a person's body, ROBOT.health hit points behind heavy armour) or a robot dog (a dog's body). Both shrug off what lays a person down: gas, the taser, a tranquilizer's dart, a flashbang, a punch (status.ts, gear.ts ask isRobot); what beats them is the AI's to say (an EMP, water, a blast, @foi/ai's police-tech-division.ts), and a fall of more than four metres, which wrecks one outright (character.ts' landing).

The claw. A ComplianceBot grabs a person within its reach (grab): held, they stand still and do nothing but throw what they hold, an EMP at its feet (inClaw; character.ts' held input), until they struggle free (the interaction key pressed ROBOT.struggle times, struggle) or the robot lets go (release: it is down, shut down, hit, gone, or too far). The arrest the hold ends in is the police's (@foi/ai). The held flag goes on the wire, so a client's prediction holds its player still too.

Deterministic: everything here is state on the characters, hashed with them.

Type Aliases ​

Variables ​

Functions ​