five-on-it / packages/ai/src/police-lockdown
packages/ai/src/police-lockdown
The lockdown (GAME_DESIGN §12, nine stars and up) and the perimeter (C33, from six): the police's endgame, and the book it keeps (PoliceBook.lockdown, hashed with the rest).
- The perimeter. From six stars the police ring the area where the player was last seen: a ring of the ladder's radius (
police-ladder.ts'perimeter: 150 m from six, 250 m from nine) round that sighting, closing in at PERIMETER.closeSpeeddown to its least radius. A sighting outside the ring draws a new one round it. Inside the ring at nine stars and up the stars never cool; outside it and unseen for PERIMETER.breakSecondsthey cool at double rate (M3: below nine that is a way out of its own, above nine the stars stop at nine, for only an extraction ends the chase there:police-extraction.ts). - The seals. At nine stars the ring is sealed: barricades (
police-roadblocks.ts' own, flaggedseal) at the creators'roadblockSpotplaces inside it first, then on the bridges out of the player's district, then where the roads cross the ring, a bridge or a tunnel before a plain road, as many as the ladder'ssealsand the room's cap allow. - The district sealed. At nine stars the garages of the player's district close (no respray, no upgrade, no storing:
@foi/sim'sclosedGarages), the ambient traffic pulls over to the kerb and stops (traffic-drive.ts), and the bounty app's civilians step into the player's way: one or two pedestrians near them walk to a spot ahead of them for a few seconds (LOCKDOWN.blockers). - The police's places (M13): a level's or a game's named places of a police kind (POLICE_PLACE_KINDS: extraction points, safe houses, sniper roofs, roadblock spots, SWAT staging), which the director prefers when they exist; the server sets them (setPolicePlaces).
The tow trucks (police-tow.ts), the extraction and the safe houses (police-extraction.ts), the budget and the adaptive pressure (police-budget.ts) and the news ticker (police-news.ts) keep their state in the same book. Deterministic: the players in the police's order, the book's lists in the order they were made.