Skip to content

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

packages/sim/src/status ​

Statuses (GAME_DESIGN §8): what state a character is in. Awake is the usual; three statuses lay it down for a while as a tumbling box deaf to its input, the knockdown of character.ts with a reason and a length: stunned (a punch from the front, a few seconds), knocked out (a punch from behind, about a minute) and asleep (a tranquilizer dart, which takes a moment to work: DART_TICKS; a loud noise near the sleeper, or a shake from another NPC, wakes it). Two more are read off the character: down (knocked down and hurt: a car, a fall on a hit) and dead (no hit points left). A character that is not awake does not move or act: the character system ignores its input while it lies, and the AI writes it none that does anything.

The status (the reason it lies) and the dart's clock are components, hashed with the rest; the time left lying is the knockdown's own (Character.down), so a status ends when the character stands up. Waking is that knockdown cut short.

Type Aliases ​

Variables ​

Functions ​