Skip to content

LanesPlayOptions beta ​

Interface of @v12-engine/engine/ai

ts
export interface LanesPlayOptions

How a lanes brain plays (lanesPlay(options), the seat's AiOptions.lanes over it): its heroes' rest, how far it goes for an ally or a camp, how near its wave it walks. Data, but for units and home as functions

Members ​

backAt ​

ts
backAt?: number;

The share of its health under which a hero goes home to rest: 0.35

backOdds ​

ts
backOdds?: number;

The odds where a hero stands on its lane under which it falls back along it: 0.3

behind ​

ts
behind?: number;

How many cells behind its side's wave a hero walks: 3

camps ​

ts
camps?: false | {
        reach?: number;
        odds?: number;
    };

A camp it takes with no wave to walk with: within reach cells (50), where the odds against it are at least odds (0.6). false never

help ​

ts
help?: false | {
        reach?: number;
        odds?: number;
    };

An ally's hero in a fight it goes to: within reach cells of it (30), where the odds with it are at least odds (0.4). false never

home ​

ts
home?: Vec2 | ((ai: Brain) => Vec2 | undefined);

Where its heroes go to rest: a point, or a function. Its side's building by its side's ends of the lanes when left out (a core)

lanes ​

ts
lanes?: string[];

Only these lanes, by their path's name: every lane of the map when left out

lastHits ​

ts
lastHits?: boolean;

Whether a hero hits the minion its next hit kills before anything else (a last hit): yes when left out

recall ​

ts
recall?: boolean;

Whether a hero going home uses an ability that takes it there (a recall), where nothing hostile is near: yes when left out

restFor ​

ts
restFor?: number;

Seconds a hero rests at home at most, healed or not: 40

returnAt ​

ts
returnAt?: number;

The share at which a resting hero goes back out: 0.85

units ​

ts
units?: (ai: Brain, unit: EntityState) => boolean;

Which of its units it commands: its heroes when left out. The rest (the minions) are the lanes', and walk as they were sent