AbilityState beta
Interface of @v12-engine/engine
export interface AbilityStateWhat a unit holds of one of its abilities: its level, cooldown, charges and autocast
Members
autocast
autocast: boolean;Whether the ability is cast by itself when its conditions are met
charges
charges?: number;Uses left, of an ability with charges (AbilityDef.charges): all it holds when left out, and chargesLeft says how many that is. Set while it holds fewer
cooldown
cooldown: number;Seconds until it can be used again
data
data?: Record<string, unknown>;The game's own state of the ability on this unit, plain data (numbers, text, lists and plain objects of them): ammo, a count of what it hit, a mark it left. Saved with the unit and told to its owner's screen with the rest of the ability (AbilityInfo.data), for a button to show. Nothing of the engine's reads it
id
id: string;The id of the ability this is the state of
level
level: number;0 for an ability a hero has not learned yet
point
point?: Vec2;Where it was last aimed
recast
recast?: RecastWindow;Its window to be cast again, while it is open (AbilityDef.recast): the next cast is a recast
refill
refill?: number;Seconds until the next use is back, while it holds fewer than it can
to
to?: Vec2;For one aimed along two points (vector): the second, the way it went from point