Buffs and debuffs: every field
Every field of BuffDef, as the engine’s own words have it, with a League of Legends and a Warcraft III example of each. A debuff is a buff with harmful: true. How to use them: Buffs and auras, Crowd control, Triggers and passives.
| Field | Type | What it does | League of Legends | Warcraft III |
|---|---|---|---|---|
stats | Partial<Record<StatKey, Scaled>> | Amounts added to stats, by stat, each growing with the ability's level | Rabadon’s Deathcap’s ability power while carried | Devotion Aura’s armor |
percent | Partial<Record<StatKey, Scaled>> | Parts stats grow or shrink by, by stat, each growing with the ability's level | Phantom Dancer’s attack speed | Endurance Aura’s move and attack speed |
id (required) | string | The buff's id, shared by every game: give it a prefix of the game's | 'ignite' | 'frostArmor' |
name (required) | string | What the player sees the buff called | Ignite | Frost Armor |
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 | a data.json copy of Ignite with other numbers | a copy of Frost Armor for a second hero |
description | string | What the buff does, in words, shown when the pointer is over it | “Burns for true damage over 5 seconds” | “Slows whoever strikes the carrier” |
duration | number | Seconds. Lasts until removed when left out | Ignite, 5 seconds | Bloodlust, 40 seconds |
harmful | boolean | A debuff: by default it goes on enemies | Ignite on an enemy | Slow from Slow Poison |
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) | fire on Ignite, so Cleanse’s code finds it | poison on Shadow Strike’s debuff |
stun | boolean | BuffCheck | The unit cannot do anything. A function says so for one carrier, one moment | Annie’s Pyromania stun | Storm Bolt |
airborne | boolean | Thrown into the air for as long as it lasts. Comes with a stun, the rest is for the eye | Malphite’s Unstoppable Force knock-up | Thunder Clap’s fling (none in WC3: Shockwave does not lift) |
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 | Alistar’s Pulverize landing | War Stomp (the knocked down get up) |
grounds | boolean | Brings what flies down: it counts as being on the ground, for whatever is aimed at it | — | Ensnare bringing a Gryphon down |
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 | Twitch’s Ambush | Wind Walk |
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 | Morgana’s Dark Binding | Entangling Roots |
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 | Garen’s Decisive Strike silence | Silence (Banshee) |
shield | Scaled | Damage it takes in place of the unit, for as long as the buff lasts and there is something left of it | Barrier | Mana Shield’s pool (as damage taken before health) |
shieldScaling | Scaling | What the stats of whoever gave the shield add to it | Janna’s Eye of the Storm, grown by ability power | a shield grown by the hero’s level |
recharge | number | The shield is as good as new once the unit has not been hurt for this many seconds | Kled’s Skaarl, back after not being hurt | a shield a Mountain King’s bulwark regrows |
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 | Fizz in the air avoids ground spells | a Gryphon Rider avoiding ground spells |
disarm | boolean | BuffCheck | Who carries it does not attack while it lasts: burrowed, or disarmed. Or while its function says | Jax’s Counter Strike disarm (as items had it) | Curse (misses) made total; a burrowed Crypt Fiend |
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 | Morgana’s Black Shield (spells only) | Anti-magic Shell, Avatar’s immunity |
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 | Kayle’s Divine Judgment | Divine Shield |
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 | Fizz’s Playful, Vlad’s Sanguine Pool | Wisp’s Detonate (no WC3 unit is untargetable while in play) |
minHealth | Scaled | ((world: World, carrier: Entity, instance: BuffI… | 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 | Tryndamere’s Undying Rage (1) | Reincarnation’s moment, as a floor |
dispellable | boolean | ((world: World, carrier: Entity, instance: Buff… | 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 | Morgana’s Black Shield cannot be cleansed off | Dispel Magic takes Bloodlust off: dispellable left on |
maxStacks | number | How many of it one unit can carry at most. What puts it on says whether it adds one (stack) | Hemorrhage, 5 | Hex’s stacks (none: 1) or Bash’s counter |
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 | Zilean’s Time Bomb bursting as it ends | Doom summoning its demon as the carrier dies: onCarrierDeath; Soul Burn’s end |
perStack | boolean | Its stats count once for every stack it has (stacks), rather than once: "each stack, -5% move speed" | Nasus’s stacks, each adding damage | Plague Cloud, each stack more damage |
change | (world: World, carrier: Entity, instance: BuffInstance) =… | 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 | Sona’s aura, stronger by allies near | Command Aura, stronger by the hero’s level in code |
stacking | 'strongest' | 'refresh' | 'perSource' | 'independent' | (… | 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 | Two Ignites: the fresh one refreshes | Two Slow Poisons: perSource, one from each |
onApply | EffectDef[] | BuffHandler | What happens as it is put on: effects in the name of who put it there (while they live), or code | Vayne’s Silver Bolts third stack bursting | Storm Bolt’s stun as it lands |
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 | Ignite’s damage every second | Rejuvenation’s heal every second |
onRemove | (world: World, carrier: Entity, instance: BuffInstance, e… | Code run when it comes off, run out (expired) or taken off. Not for the buffs of something that dies | code as Zilean’s Chronoshift is used up | code as Wind Walk breaks |
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 | Fiddlesticks’s Terrify (fear), Ahri’s Charm, Rammus’s taunt | Howl of Terror (none: WC3 fears nothing); Cripple as a taunt |
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) | Malzahar’s Nether Grasp, Skarner’s Impale | Entangling Roots on a hero without a dispel |
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 | Singed’s Mega Adhesive, Cassiopeia’s Miasma | — |
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) | Anivia’s Glacial Storm mana a second | Immolation’s mana a second |
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 | Olaf’s Ragnarok, Malphite’s R while rushing | Avatar (held by nothing) |
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 | Kindred’s mark, Caitlyn’s Headshot trap | Faerie Fire |
camouflage | number | ((world: World, carrier: Entity, instance: BuffI… | 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 | Pyke’s Ghostwater Dive, Rengar’s Thrill of the Hunt | Shadowmeld at night |
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 | Oracle Lens, a Control Ward | a Gnoll Overseer’s true sight; Magic Sentry on a tower |
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 | Ghost (walks through units) | Phantom Stride; a Spirit Walker’s Ethereal form |
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 | Tiamat’s cleave on a buff | Cleaving Attack on a Tauren |
overheal | { buff: string; part?: Scaled; most?: number; of?: 'given… | 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) | Sona’s Aria of Perseverance shield from a full heal | a Priest’s heal past full held as a shield |
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 | Vladimir, Mundo, Zac: health for mana | a Death Knight whose spells cost life |
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 | Frost Armor’s slow on who strikes it (as a buff’s) | Frost Armor, Thorns Aura |
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) | Zoe’s Sleepy Trouble Bubble (damage) | Wind Walk (attack), Sleep (damage) |
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 | Zed’s Death Mark spreading as its carrier dies | Doom’s demon, Black Arrow’s skeleton |
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 | Vayne’s Silver Bolts, Braum’s Concussive Blows | Hemorrhage-like stacks bursting on the fifth |