Skip to content

five-on-it / packages/ai/src/police-heavy

packages/ai/src/police-heavy ​

The heavy response (GAME_DESIGN §12, seven stars, "Heavy response"; the police bikes from four): what each star's row of the ladder asks for beyond the cruisers (police-ladder.ts), and the book of it. Every unit has a tell and a counter (M4).

  • Police bikes (C8) from four stars: units of their own (kind bike) on the police bike, the cruisers' fast partners, the officer's profile of the stars; they thread the traffic a cruiser cannot, and a bump throws their rider (the simulation's two-wheeler fall).
  • The APC (C10): a unit (apc) of the armoured battering-ram truck that drives to ram (apcProfile: it never gets out, and its plate rams a car at a standstill too, which a cruiser never does); its plate shoves parked cars out of its way (@foi/sim's mods.ts). Its tell is its horn and its diesel (the client's), its line on the radio; its counters a charge, the anti-material rifle, or outrunning it (it is slow).
  • The water cannon (C11): a unit (cannon) that parks 15 to 25 m off the player (cannonProfile) while its operator works the jet in bursts (cannonOperator): on foot it knocks the player down, in a car it shoves the car. Every burst hisses half a second first (the jet's pressure, @foi/sim's jets.ts): its tell; its counters cover, distance (25 m), the operator in its cab shot.
  • The helicopter (C14, police-helicopter.ts), the rooftop snipers (C23, police-snipers.ts), the police boats on the water (C9, R15, police-boats.ts) and the cruisers' fittings, the Grappler and the GPS dart (C3, C4, police-fittings.ts).

The heavy units go down the players most wanted first, one sent at a time every HEAVY.dispatchTicks, while the room's cap on police actors allows (police.ts). A player the debug command sent a unit to alone (sendHeavyUnit, solo) gets nothing else from the police, so the unit can be tried by itself. Deterministic: the players by stars then client id, the units in the order they were sent; the book is hashed (heavyHashFields).

Interfaces ​

Type Aliases ​

Variables ​

Functions ​