Skip to content

AttackWave beta ​

Interface of @v12-engine/engine/ai

ts
export interface AttackWave

One wave (the classic attack wave): its group, when it goes, how much of it is enough, how long it gathers, whether it goes again, together or not, and where to

Members ​

after ​

ts
after?: number;

Seconds after the wave before it (after the start, for the first) before it may go: 0 when left out

gatherFor ​

ts
gatherFor?: number;

Seconds it gathers at the rally before it goes, whoever is late: 15 when left out

group ​

ts
group: string | Record<string, number>;

Its group: a group's name (WavesOptions.groups), or the units in place ({ footman: 4 })

minForces ​

ts
minForces?: number;

The share of its group that is enough to go with, 0 to 1: all of it when left out

rally ​

ts
rally?: Vec2 | string;

Where it gathers: a place, or a name the map or the rules gave. A little out of home towards the target when left out

repeat ​

ts
repeat?: boolean | number;

Whether it goes again once sent: true for ever, a number for so many times in all. Once when left out

target ​

ts
target?: WaveTarget;

Where it goes: their base nearest home when left out

together ​

ts
together?: boolean;

Whether it waits for its team's attack together (TeamOptions.together, C5)

when ​

ts
when?: AiCondition;

Only when this holds as its turn comes: a wave whose condition fails is skipped