Want beta
Interface of @v12-engine/engine/ai
ts
export interface Want extends Omit<WantData, 'count' | 'when' | 'near' | 'placement'>A want with the function forms: how many as a function of the brain, a condition as code, a place found each think, a placement strategy of the game's own (ai.plans.want, BuildPlanOptions.wants)
Members
count
ts
count?: number | ((ai: Brain) => number);How many of the type the want asks for, or a function of the brain that gives it; 1 when left out
near
ts
near?: Vec2 | string | ((ai: Brain) => Vec2 | undefined);Where to build: a point, the name of an entity or region the map gave, or a function of the brain that finds one each think
placement
ts
placement?: PlacementName | PlacementStrategy;How the spot is chosen: a strategy by name or a function; the build plan's table or the type's own when left out
when
ts
when?: AiCondition;A condition the want holds only while true; when it is false the want is not pursued