OwnKnowledge beta
Class of @v12-engine/engine/ai
export declare class OwnKnowledgeWhat a computer player remembers of itself (knowledge.own): what it lost, the attacks it sent, what it gathered
Members
constructor
constructor(knowledge: Knowledge);Constructs a new instance of the OwnKnowledge class
attacks
attacks(withinSeconds?: number): AttackSent[];The attacks sent, oldest first; only within so many seconds where given
attackSent
attackSent(point: Vec2, count: number): void;Notes an attack sent, for whoever asks later (attacks): what a module that sends an army calls
gathered
get gathered(): Readonly<Record<ResourceId, number>>;What was gathered of each resource since the game began, as far as the rises tell
history
get history(): KnowledgeMemory['history'];The samples of what was gathered, oldest first
income
income(kind: ResourceId, seconds?: number): number;What it gathers of a resource a minute, over the last so many seconds (60): from the rises in what it has, so it is at least this (what was gathered and spent between two thinks does not show). Bounty counts as gathered
incomes
incomes(seconds?: number): Record<ResourceId, number>;The income of every resource gathered so far, a minute (income)
lost
lost(withinSeconds?: number): Loss[];What of its own died, oldest first; only within so many seconds where given
lostNear
lostNear(point: Vec2, radius: number, withinSeconds?: number): Loss[];What of its own died within a distance of a place: "we are being raided here"