five-on-it / packages/ai/src/police-helicopter
packages/ai/src/police-helicopter
The police helicopter (C14, GAME_DESIGN §12 at seven stars; M4, M14): one over each player whose stars ask for it (police-ladder.ts), a flyer of @foi/sim's flyers.ts the AI flies by writing its input, as it flies the drone (police-drones.ts): on station above and behind the player, HELICOPTER's height over the roofs, faster and bigger than the drone.
- The searchlight (M4): pointed where the police think the player is (on them while one of the police's eyes has them, else where they were last seen), its pool of light swinging there at its own pace, so a fast car outruns it. A player in its pool with nothing between them and the helicopter is seen (helicopterSees: a sighting on the radio,
police.ts), at night too; without its light (shot out: its own hit points, spent first, the anti-material rifle's one round) the helicopter sees only by day, as the drone does. Cover from above (a roof, a deck, an arcade, a tunnel) and smoke hide from it. - The door gunner (C23's laser rule,
police-snipers.ts): a round at the player every six seconds at most, each after a second and a half of laser on them that held. - Strips ahead: a nail strip dropped across the road the player is predicted to take (
police-precrime.ts), HELICOPTER.stripAheadmetres on, at most every twenty seconds, one of the police's strips (nail-strips.tsreels it in). - The weather (M14): fog or a downpour grounds it (isGrounded): none comes (the radio says so, once), and one up flies home.
It costs three of the room's police actors. Shot down (150 hit points), it falls and lies a wreck a while, a crime and an escalation as the drone's (wanted.ts), and another comes after a while. Deterministic: players by stars then client id, the helicopters in the order sent.