Moves: dash, blink, knockback, pull
Abilities that move units: the caster rushing or jumping somewhere, enemies thrown back or dragged in, two units trading places.
Quick start
import type { AbilityDef } from '@v12-engine/engine'
const leap: AbilityDef = {
id: 'leap',
name: 'Leap',
target: 'point',
range: 6,
cooldown: 10,
effects: [{ type: 'dash', distance: 6, speed: 18, leap: 1.5, effects: [{ type: 'damage', amount: 80, radius: 2 }] }]
}The caster jumps up to 6 cells toward the spot, over whatever is in between, and hurts everything within 2 cells where it lands.
Common tasks
Blink or teleport
blink is instant, up to distance. teleport goes any distance: to: 'home', 'point' or 'target'.
import type { AbilityDef } from '@v12-engine/engine'
const blink: AbilityDef = { id: 'blink', name: 'Blink', target: 'point', range: 10, cooldown: 6, effects: [{ type: 'blink', distance: 10 }] }Knock enemies back
import type { AbilityDef } from '@v12-engine/engine'
const shove: AbilityDef = {
id: 'shove',
name: 'Shove',
target: 'none',
cooldown: 12,
effects: [{ type: 'knockback', distance: 4, speed: 12, radius: 3, leap: 1 }]
}Units already rushing somewhere aren't thrown.
Pull a unit in
pull drags its targets to the caster's edge over seconds, following the caster. Its effects run on each as it arrives. toPoint pulls to where it landed instead (a vacuum).
import type { EffectDef } from '@v12-engine/engine'
const vacuum: EffectDef = { type: 'pull', seconds: 0.5, radius: 4, toPoint: true, effects: [{ type: 'damage', amount: 60 }] }A pulled unit does nothing of its own until let go, can't be thrown or blinked, and picks its orders up again after. If the puller dies it is let go where it is.
Dash to a unit
The rest of this page needs movesPack() in Rules.packs.
import { type AbilityDef, movesPack } from '@v12-engine/engine'
const heroicCharge: AbilityDef = {
id: 'heroicCharge',
name: 'Heroic Charge',
target: 'unit',
targets: { enemies: true },
range: 5,
effects: [{ type: 'dash', to: 'target', speed: 20, effects: [{ type: 'damage', amount: 60 }] }]
}
const rules = { /* … */ packs: [movesPack()] }through: 2 dashes through the target, 2 cells past its middle (Yasuo's Sweeping Blade).
Stun on a wall
onWall runs when the moved unit hits a cliff, building, tree or the edge of the map. Vayne's Condemn:
import type { AbilityDef } from '@v12-engine/engine'
const condemn: AbilityDef = {
id: 'condemn',
name: 'Condemn',
target: 'unit',
targets: { enemies: true },
range: 6,
effects: [{ type: 'knockback', distance: 5, speed: 20, onWall: [{ type: 'buff', buff: 'stunned' }] }]
}Hit what the moved unit runs into
collide runs on each enemy it meets on its way, once each. stops makes it stop at the first. Lee Sin's Dragon's Rage:
import type { AbilityDef } from '@v12-engine/engine'
const dragonsRage: AbilityDef = {
id: 'dragonsRage',
name: "Dragon's Rage",
target: 'unit',
targets: { enemies: true },
range: 3,
effects: [
{
type: 'knockback',
distance: 8,
speed: 16,
collide: [
{ type: 'damage', amount: 100 },
{ type: 'knockback', distance: 1.5, leap: 2, speed: 3 }
]
}
]
}Throw over, toward, or along the aim
direction on a knockback: away (default), aim (the way it was aimed), over (lands distance beyond the caster on the far side; give it a leap), towards (to the caster's edge).
import type { EffectDef } from '@v12-engine/engine'
const flay: EffectDef = { type: 'knockback', direction: 'over', distance: 2, leap: 1.5, speed: 10, radius: 3 }Swap places
import type { AbilityDef } from '@v12-engine/engine'
const netherSwap: AbilityDef = { id: 'netherSwap', name: 'Nether Swap', target: 'unit', targets: { allies: true, enemies: true }, range: 7, effects: [{ type: 'swap' }] }Ride another unit
attach puts the rider (the caster, or rider: 'target') out of the world on its host until the host dies, duration runs out, or the caster casts again. Yuumi's You and Me!
import type { EffectDef } from '@v12-engine/engine'
const youAndMe: EffectDef = { type: 'attach', duration: 30, onEnd: [{ type: 'heal', amount: 50, radius: 2 }] }Reference
dash, blink, teleport, knockback, pull, swap, attach
| Field | On | What it does |
|---|---|---|
distance | dash, blink, knockback | How far at most |
speed | dash, knockback | Cells a second |
effects | dash, pull | Dash: around where it lands. Pull: on each as it arrives, in the caster's name |
leap | dash, knockback | How high it rises; a dash with a leap flies over what is in between |
climb | dash | How much higher the ground on its way may be before it is a wall that stops the leap |
buff | dash | Carried while on its way |
seconds | pull | How long the drag takes |
toPoint | pull | Drags to where it landed, not the caster |
to | teleport | home (the side's home, homeOf), point, target |
to: 'target' | dash (pack) | Rushes to the unit cast on, to its edge, following it |
through | dash (pack) | With to: 'target': through it, this far past its middle |
direction | knockback (pack) | away, aim, over, towards |
collide | dash, knockback (pack) | On each enemy met on the way, once, in the caster's name; the moved unit is the origin |
stops | dash, knockback (pack) | With collide: stops at the first met |
onWall | dash, knockback (pack) | On the moved unit as it meets a wall (what flies meets none) |
rider, duration, onEnd | attach (pack) | Who rides, for how long, what happens as it lets go (at the recast's point) |
swap (pack) has no fields: caster and target trade places at once.
Notes
- A
groundedunit can't dash or blink of its own ("Grounded"). Anunstoppableone can't be knocked back or pulled. - While moved, a unit carries the
movedBycomponent (whose name, by what, after whom, who it already met); a rider carriesriding. Both are saved. - Who is in the air (a leap, a knock-up) does nothing until down.
letGo(world, rider, point?)ends an attach in code.checkRuleswarns of a pack field on an effect that doesn't read it, or in a game without the pack;throughwith no unit target;stopswith nocollide.- The screen draws a trail behind every rushed unit; see Ability visuals.