Skip to content

LanesOptions beta ​

Interface of @v12-engine/engine

ts
export interface LanesOptions

What a game's lanes do (lanesPack). Every part has the engine's own when left out

Members ​

cores ​

ts
cores: string | ((world: World, entity: Entity) => boolean) | false;

What the cores are: the unit type's id, or a test of a unit. A side whose cores have all fallen has lost, and the last side with one wins. Said by the game (the engine names none); false keeps the game's own way of winning (Rules.victory)

every ​

ts
every?: number;

Seconds between one wave and the next; 30 when left out

firstWave ​

ts
firstWave?: number;

Seconds from the start to the first wave, and between waves: 20 and 30 when left out

goal ​

ts
goal?: (world: World, minion: Entity, lane: Lane, from: 0 | 1) => Vec2 | undefined;

Where a minion goes once it is at the far end of its lane, fighting on the way: the nearest structure of another team to that end when left out (their core), the end itself when there is none

minionAggro ​

ts
minionAggro?: {
        radius?: number;
        chase?: number;
        leash?: number;
    } | false;

Minions turn on a hero who hits a hero of their side near them (within radius cells of it), chase it for chase seconds at most and no further than leash cells from their lane, then go back to it the way they were going: 7, 2.5 and 10 when left out. false for minions that keep to their lane

minions ​

ts
minions?: {
        melee: string;
        ranged: string;
        siege?: string;
    };

The unit types of the engine's waves, by role: three to five close, two or three that shoot, a siege now and then (melee and ranged are needed, siege is left out of the waves when it is). The engine names none: a game that gives no wave of its own says these

towerAggro ​

ts
towerAggro?: number;

Seconds a hero who hit a hero is the towers' first target for: 3 when left out

towers ​

ts
towers?: (world: World, entity: Entity) => boolean;

What the lane towers are: they hit minions before anything else, and a hero who hits a hero of their side within their reach before minions (as in a MOBA). Structures that attack, other than cores, when left out

wave ​

ts
wave?: (world: World, wave: LaneWave) => string[];

The unit types of a wave, in the order they come out: the engine's grow with time, from minions