five-on-it / packages/sim/src/drone-taser
packages/sim/src/drone-taser
The swarm drones' tasers (GAME_DESIGN §12, eight stars, C15): a flyer whose class carries a taser (flyers.ts' taser) and whose pilot asks it to fire (its input's fire, the AI's dive) winds its dive up for the class's windup ticks, its whine the tell (the dive's ticks go on the wire), then fires at the nearest person on foot within its range it has a clear line to: a shot of the taser from it (the client draws the barbs and plays the snap) and a non-lethal hit on them, and they go down stunned for the taser's stun (status.ts; the juggernaut suit, an adrenaline shot and a robot shrug it off). Nobody in reach, the dive is wasted. It never fires at an officer, a robot or someone seated. Only a world's own flyers fire (a client's twins are placed by the snapshots), so the stun reaches a client by its snapshots, as every weapon's does. Deterministic: the flyers in ascending id order, the people too.