Skip to content

AbilityRecast beta ​

Interface of @v12-engine/engine

ts
export interface AbilityRecast

How an ability is cast again after it is cast (AbilityDef.recast): for window seconds the same button casts the recast, count times, each doing its effects (no wind-up, no channel, manaCost its own: none when left out); the cooldown waits for the last recast or the window's end (after) or starts at the first cast (first). The window and its recasts are the ability's state (AbilityState.recast), saved and told to its owner's button (AbilityInfo.recast)

Members ​

cooldown ​

ts
cooldown?: 'after' | 'first';

When the cooldown starts: after the last recast, or the window's end (when left out), with what it was as the ability was cast; or at the first cast, as usual, the recasts not waiting for it

count ​

ts
count?: number;

How many times it may be cast again in the window: once when left out

effects ​

ts
effects?: EffectDef[];

What a recast does: the ability's own effects when left out

manaCost ​

ts
manaCost?: Scaled;

Mana a recast costs: none when left out

mark ​

ts
mark?: string;

A buff the cast leaves on a unit (Sonic Wave's mark): a recast goes to the unit that carries it from the caster (the nearest, where there are more), its target and its point, and is refused while none does (noMark)

range ​

ts
range?: Scaled;

How far away a recast's target may be: the ability's range when left out

target ​

ts
target?: AbilityTarget;

How a recast is aimed: as the ability is when left out; with a mark, at the marked unit, with no aim of its own

window ​

ts
window: Scaled;

Seconds it may be cast again for, from the cast