Skip to content

BuffDef ​

Interface of @v12-engine/engine

ts
export interface BuffDef extends ScaledStatChange

Something lasting on a unit that changes what it can do

Members ​

airborne ​

ts
airborne?: boolean;

Thrown into the air for as long as it lasts. Comes with a stun, the rest is for the eye

avoids ​

ts
avoids?: string[];

Tags of abilities that do nothing to who carries it, for as long as it does: ground for someone up in the air

basedOn ​

ts
basedOn?: string;

The definition this one is a copy of, made from the data (copyOf in a data.json, the editor's Copy as new): what it is drawn, heard and pictured as where the game gives it no look of its own

breaksOn beta ​

ts
breaksOn?: BuffBreak[];

What takes it off before its time: damage (its carrier hurt: Sleep), attack (an attack of its carrier lands, after what the attack sets off: Wind Walk), cast (its carrier casts an ability other than the one that put it on)

camouflage beta ​

ts
camouflage?: number | ((world: World, carrier: Entity, instance: BuffInstance) => number);

Its carrier is camouflaged while it lasts, in a game with the vision pack (visionPack): its enemies see it only from within this far of it (a unit of theirs that near), unless something finds it (trueSight, detect, revealUnit) or it attacked them a moment ago: Pyke's Ghostwater Dive, Rengar's Thrill of the Hunt, Viego's mist. A function says how far for one carrier, one moment

change ​

ts
change?: (world: World, carrier: Entity, instance: BuffInstance) => StatChange | undefined;

Stats of its own, worked out in code, on top of what it declares: "+2 armor for each ally near". Asked when the carrier's stats are added up, which is only when something they come from changed: what this depends on beyond the buff (allies near, the time) calls invalidateStats when it changes

cleave beta ​

ts
cleave?: Cleave;

Its carrier's blows from up close strike the enemies around their target too, a part of their damage each, as an attack's own cleave (AttackDef.cleave): the larger part counts

control beta ​

ts
control?: ControlKind | BuffControl;

It takes its carrier's orders while it lasts: what it was told waits (a channel is broken off), the player's and anyone's new orders are refused, and it goes on with what it was told after, as from a stun. fear: it walks away from who put it on; charm: it walks to them; taunt: it attacks them (walks to them where it cannot). Code (BuffControl) steers it itself every tick. The last of them it carries is the one it does

description ​

ts
description?: string;

What the buff does, in words, shown when the pointer is over it

disarm ​

ts
disarm?: boolean | BuffCheck;

Who carries it does not attack while it lasts: burrowed, or disarmed. Or while its function says

dispellable ​

ts
dispellable?: boolean | ((world: World, carrier: Entity, instance: BuffInstance, by: Entity) => boolean);

Whether a dispel takes it off (see the effect dispel). Yes when left out: no for what nothing should end early. Decided in code for each dispel: by who dispels it (by), its level

down ​

ts
down?: boolean;

Knocked down: it lies on the ground for as long as it lasts, and gets up at the end. For the eye, like airborne

drain beta ​

ts
drain?: Record<string, number>;

What it takes of its carrier each second while it lasts, by pool (UnitTypeDef.pools) or mana, in a game with the resources pack (resourcesPack): taken off when there is not enough for the next second's (Immolation, a Glacial Storm kept up)

duration ​

ts
duration?: number;

Seconds. Lasts until removed when left out

grounded beta ​

ts
grounded?: boolean;

Its carrier cannot rush or jump anywhere of its own: an ability of its with a dash or a blink is refused ("Grounded"), and such an effect of its does nothing (Singed's Mega Adhesive). Not grounds, which brings a flyer down

grounds ​

ts
grounds?: boolean;

Brings what flies down: it counts as being on the ground, for whatever is aimed at it

harmful ​

ts
harmful?: boolean;

A debuff: by default it goes on enemies

id ​

ts
id: string;

The buff's id, shared by every game: give it a prefix of the game's

invisible ​

ts
invisible?: boolean | BuffCheck;

Its carrier is invisible to enemies for as long as it lasts, unless they find it (detect): a Wind Walk. A function says so for one carrier, one moment

invulnerable beta ​

ts
invulnerable?: boolean | BuffCheck;

Who carries it takes no damage while it lasts, and no enemy's ability may be cast on it (Divine Shield, Kayle's Intervention, Zhonya's stasis with a stun). Effects other than damage still reach it. Or while its function says

maxStacks ​

ts
maxStacks?: number;

How many of it one unit can carry at most. What puts it on says whether it adds one (stack)

minHealth beta ​

ts
minHealth?: Scaled | ((world: World, carrier: Entity, instance: BuffInstance) => number);

The least health damage leaves its carrier with while it lasts (Tryndamere's Undying Rage at 1, Kindred's Lamb's Respite at a tenth of its max): a number, one per level, or code with the carrier. It is hurt down to it, never past it. The highest of what it carries counts

name ​

ts
name: string;

What the player sees the buff called

onApply ​

ts
onApply?: EffectDef[] | BuffHandler;

What happens as it is put on: effects in the name of who put it there (while they live), or code

onCarrierDeath beta ​

ts
onCarrierDeath?: EffectDef[];

What happens where its carrier dies carrying it, in the name of who put it on (while they live): Doom's demon, Black Arrow's skeleton, a mark that spreads

onEnd ​

ts
onEnd?: EffectDef[];

What happens around who carried it when its time is up, in the name of who put it there. Not when it is taken off

onMaxStacks beta ​

ts
onMaxStacks?: EffectDef[];

What happens to its carrier as an effect (stack) brings it to maxStacks, in the name of who put it on: Gravity Field's stun on the third, Hemorrhage's might on the fifth. A removeBuff among them spends the stacks

onRemove ​

ts
onRemove?: (world: World, carrier: Entity, instance: BuffInstance, expired: boolean) => void;

Code run when it comes off, run out (expired) or taken off. Not for the buffs of something that dies

onTick ​

ts
onTick?: {
        every: number;
        effects?: EffectDef[];
        run?: BuffHandler;
    };

What happens every every seconds while it lasts: effects in the name of who put it there (while they live), or code, which runs whoever is left

overheal beta ​

ts
overheal?: {
        buff: string;
        part?: Scaled;
        most?: number;
        of?: 'given' | 'taken';
    };

The healing past full health that its carrier gives (given, when left out) or gets (taken) becomes a shield on whoever was healed: the buff buff (its own time, and a shield of its own where it says), holding part of what spilled over (all of it when left out), up to most of the healed one's max health (a third when left out)

passive beta ​

ts
passive?: EffectDef[];

What its carrier's attacks, hurts, casts and kills set off while it carries it, as an ability's passive does (onHit, onKill, onCast, onDamaged, onAbilityHit, onLowHealth), in the carrier's name: Frost Armor's slow on who strikes it, a Thorns Aura's buff, the empowered next attack of a buff a cast put on

paysWithHealth beta ​

ts
paysWithHealth?: boolean | number;

Its carrier pays for its abilities with health, not mana, while it carries it: this much health for each point of mana they cost (1 for true). It cannot cast with no more health than that; items still cost nothing

perStack ​

ts
perStack?: boolean;

Its stats count once for every stack it has (stacks), rather than once: "each stack, -5% move speed"

phasing beta ​

ts
phasing?: boolean | BuffCheck;

Its carrier walks through other units, and they through it, while it lasts: neither steers round nor pushes the other (a Ghost, a Phantom Stride). Walls, cliffs, buildings and trees still stop it. A function says so for one carrier, one moment

recharge ​

ts
recharge?: number;

The shield is as good as new once the unit has not been hurt for this many seconds

revealed beta ​

ts
revealed?: boolean;

Its carrier is seen by the team of whoever put it on while it lasts, wherever it stands: in the fog, in a bush, invisible or camouflaged (the fog lit where it stands, as for what a detect found), in a game with the vision pack (visionPack): Kindred's mark, a hunter's quarry

root ​

ts
root?: boolean | BuffCheck;

The unit cannot move from the spot. It can still fight and cast. A function says so for one carrier, one moment

shield ​

ts
shield?: Scaled;

Damage it takes in place of the unit, for as long as the buff lasts and there is something left of it

shieldScaling ​

ts
shieldScaling?: Scaling;

What the stats of whoever gave the shield add to it

silence ​

ts
silence?: boolean | ((ability: AbilityDef) => boolean);

The unit cannot use its abilities. What it carries and the spells every hero has still work. A function says which abilities it keeps it from ((ability) => ability.tags?.includes('fire')): the screen asks it too

spellImmune ​

ts
spellImmune?: boolean | BuffCheck;

Who carries it is immune to spells while it lasts, as an avatar is (see UnitTypeDef.spellImmune). Or while its function says

stacking ​

ts
stacking?: 'strongest' | 'refresh' | 'perSource' | 'independent' | ((existing: BuffInstance, incoming: IncomingBuff) => 'replace' | 'renew' | 'add' | 'keep');

What happens when it is put on a unit that has it already. strongest (the default): the higher level wins, the longer among equals. refresh: the time starts over, the level the new one's. perSource: one of it for every unit that puts it on, each of its own (two poisons from two casters). independent: a new one every time. A function decides from the one there and the one coming: replace it, renew its time, add another, or keep

stun ​

ts
stun?: boolean | BuffCheck;

The unit cannot do anything. A function says so for one carrier, one moment

suppress beta ​

ts
suppress?: boolean;

Held like a stun, and more: tenacity does not cut it short and a cleanse does not take it off (Malzahar's Nether Grasp, Skarner's Impale)

tags beta ​

ts
tags?: string[];

Free words to find it by and to sort it with (fire, slow, anti-heal), as abilities and units have: what a search matches, what a game's code asks (buffsTagged)

trueSight beta ​

ts
trueSight?: number;

Its carrier finds what of its enemies is invisible or camouflaged within this far of it, for its team, while it lasts, in a game with the vision pack (visionPack): an Oracle Lens, a Magic Sentry on a tower

unstoppable beta ​

ts
unstoppable?: boolean;

Nothing that holds a unit up does anything to its carrier while it lasts: harmful stuns, roots, silences, disarms, controls, suppressions and grounds on it hold nothing, new ones do not take, and it is neither thrown nor pulled (Olaf's Ragnarok, Malphite's Unstoppable Force). Slows still slow

untargetable beta ​

ts
untargetable?: boolean | BuffCheck;

Who carries it is out of reach while it lasts (Fizz's Playful, Zed's Death Mark dash, Vlad's pool): no ability may be cast on it but by itself, no attack is aimed at it nor lands, and no effect of anyone else's reaches it (an area, a missile, a chain), allies' too; it is still seen and still in the way. Or while its function says