LanesPlay beta
Class of @v12-engine/engine/ai
export declare class LanesPlayThe lanes of a lanes brain, read as its side sees them, and what its heroes do on them (ai.module('lanes')'s play): the module's goals read it
Members
constructor
constructor(
ai: Brain,
options: LanesPlayOptions);Constructs a new instance of the LanesPlay class
ai
readonly ai: Brain;The brain it plays for
allyAt
allyAt(at: Vec2): EntityState | undefined;The ally's hero nearest a place: what a hero helping goes with
call
call(from: Vec2): Vec2 | undefined;An ally's hero in a fight one of its heroes could go to: the most hurt, near enough; or a person's call for help
camp
camp(hero: EntityState): Vec2 | undefined;The nearest camp it may take from a place: not cleared, in reach, its creeps (as seen) beatable
commanded
commanded(units?: UnitSet): UnitSet;The units it commands: its heroes, or what units says. Alive
fallBack
fallBack(path: string, from: Vec2): Vec2 | undefined;Where a hero outmatched on a lane falls back to: its side's nearest tower behind it, or so far back along it
home
home(): Vec2 | undefined;Where its heroes rest: home, else its side's building nearest the middle of its side's ends of the lanes (a core), else that middle, else its first building
lane
lane(path: string): LaneSide | undefined;A lane of its side's, by its path's name
lanes
lanes(): readonly LaneSide[];The lanes as its side reads them: each measured from the end its side's spawner stands at. None it has no end of
memory
readonly memory: LanesPlayMemory;What the play keeps between thinks, as LanesPlayMemory: the heroes resting and when each was sent home
oddsAt
oddsAt(at: Vec2, reach?: number): number;The odds of its side against theirs where a unit stands (Strength.odds): their towers that reach there count
options
readonly options: LanesPlayOptions;How it plays: the module's, the seat's over it
resting
resting(): readonly EntityState[];The heroes resting, alive
sendHome
sendHome(hero: EntityState): void;Sends a resting hero home: by an ability that takes it there (one whose effects, at its end, teleport home), where it has one ready and nothing hostile is near; else on foot. Nothing while it channels, or once home
spot
spot(path: string): Vec2 | undefined;Where a hero walks on a lane now: a little behind its side's front; with no wave there, by its side's furthest tower on it (or a little out of its end); never into reach of a tower of theirs that no minion of its side is in reach of
stake
stake(path: string): number;What is at stake on a lane, 0..1: how far along its side's wave is (a tower of theirs to take, their core), or how near its side's end theirs is (its own towers under attack), whichever is more
state
state(path: string): LaneState | undefined;One lane as it stands this think
states
states(): readonly LaneState[];Each lane as it stands this think: fronts, minions, heroes, towers. Once a think
think
think(): void;Heroes turned for home, those back out: what the lanes.back goal reads. Each think, before the goals