Me beta
Interface of @v12-engine/engine/ai
export interface MeThe player a brain plays, as its picture of the game shows them: what the snapshot has of one's own player (PlayerState.own), beside who they are. Mutable for the think: a module that sends a train bumps supplyUsed itself, so that the next module does not queue past the cap before the command lands
Members
availability
availability?: Record<string, boolean>;What the game's available hook decided, where it differs from what their race says (PlayerState.own.availability)
defeated
defeated: boolean;Whether the player is out of the game
heroes
heroes: HeroSummary[];The player's heroes, each in short
id
id: PlayerId;The player's id
income
income?: Record<ResourceId, number>;What the player gathers of each resource a minute, of late, as the brain's knowledge works it out (Knowledge.own.income): set by the brain after the view is made; left out for a view of no brain's
name
name: string;The player's name
objectives
objectives: ObjectiveState[];What the player is set to do, in a mission. Empty in a game without objectives
purse
purse?: Readonly<Record<ResourceId, number>>;What is free to spend this think, by resource: the resources less what is promised and held, less what the think spent so far (the brain's purse, ai.purse). Set by the brain after the view is made; left out for a view of no brain's
race
race?: string;The race they play (raceOf): left out in a game without races
researching
researching: string[];The ids of the upgrades being researched
resources
resources: Record<ResourceId, number>;What they have of each resource, by resource id
supplies
supplies?: Record<string, {
used: number;
cap: number;
}>;The game's other pools of supply, by name (RuleSettings.supply.pools)
supplyCap
supplyCap: number;How much supply the player may use at most
supplyUsed
supplyUsed: number;How much supply the player's units and queues use
team
team: number;The player's team number
tech
tech: string[];Types of the finished buildings the player has, with what those count as
unlocks
unlocks?: Record<string, Message | null>;What the game's requirement hook decided, where it differs from what the requirements say (PlayerState.own.unlocks)
upgrades
upgrades: Record<string, number>;The levels of the upgrades the player has, by upgrade id
upkeep
upkeep: {
tier: number;
name: string;
income: number;
};What the size of the army costs in income