PlayerFacts beta
Interface of @v12-engine/engine
export interface PlayerFactsWhat there is to know about a player, for whether they can make something
Members
availability
availability?: Record<string, boolean>;What the simulation's available hook decided, where it differs from what their race says (availableTo): by unit or structure type, and upgrade:<id>
heroes
heroes: readonly string[];Types of the heroes they have, fallen ones and ones being made included
race
race?: string;The race they play (raceOf): left out in a game without races
resources
resources: Readonly<Purse>;What the player has of each resource, to meet a cost
supplies
supplies?: Readonly<Record<string, {
used: number;
cap: number;
}>>;The game's other pools of supply, by name (RuleSettings.supply.pools): left out in a game with none
supplyCap
supplyCap: number;The most supply the player may use
supplyUsed
supplyUsed: number;Supply the player's units and queued units take up now
tech
tech: ReadonlySet<string> | readonly string[];Unit types they have, finished, which is what requirements ask for
unlocks
unlocks?: Record<string, Message | null>;What the simulation's requirement hook decided, where it differs from what the requirements say: by unit or structure type, and upgrade:<id> for the next level of research. A reason, or null for "may, for all that"