Mechanics reference

The combat toolbox the sim (@hnd/sim) exposes — every stat, effect, delivery, status, hook and condition an ability or talent can be built from. Numbers are pulled live from the engine, so this page can't drift from the code. Use it to design new classes & talents: pick a delivery, a payload of effects, and (for passives) hooks or a dynamic modifier.

The one pipeline

Every offensive/defensive interaction funnels through applyPayload: (1) to-hit — hostile only: miss = clamp(avoidance − hitRate) where avoidance is dodge (physical) or spellResist (spell). On a miss only unavoidable effects land. (2) crit — one shared roll, clamp(critChance − critAvoidance). (3) apply each effect in order. Then hooks fire (onHit / onHitTaken / onCritGiven), and any hp drop fires onDamaged + a death/kill-credit check.

Stats 15

Read only through getStat(). Power & hp scale with level; the 0..1 avoidance/crit/mitigation stats do not (keeps them readable). Buffs, items and talents adjust stats by pushing modifiers.

keyunitmeaning
maxHphplevel-scaled max health
moveSpeedm/schase/patrol speed; slow reduces it (strongest-wins)
attackPowerpowerphysical damage base (level-scaled)
spellPowerpowerspell damage base (level-scaled)
healPowerpowerhealing base (level-scaled)
hitRate0..1attacker: reduces the target's avoidance
critChance0..1attacker: chance to crit
critMultiplier×attacker: crit damage/heal multiplier
critAvoidance0..1target: subtracts from attacker's critChance
dodge0..1target: avoid a physical hit
spellResist0..1target: resist a spell (allies never resisted)
physicalReduction0..0.8target: multiplicative physical mitigation
spellReduction0..0.8target: multiplicative spell mitigation
aggroRangeMmNPC: notice range
hpRegenPShp/sout-of-combat regen

Effects 12

The payload. ability.effects[] (and hook effects[]) are a discriminated union, applied to each chosen target. Unavoidable effects land even on a miss; self effects act on the actor. *applyStatus is only avoidable when hostile (a debuff on a foe).

typeparamsclassnotes
damagecoefficientavoidableschool-scaled, mitigated, can crit
healcoefficientfriendlyhealPower-scaled, never missed, can crit
flatDamageamountunavoidableflat, no to-hit/crit/mitigation (thorns/procs)
percentHealthpct, of, heal?unavoidable% of max/current hp, flat
pushspeedMS, fromavoidableknockback impulse (decays via friction)
applyStatusstatus, to?avoidable*apply a status; to:'self' rides a targeted cast
removeStatusmatchdispel/cleanse/purge by polarity/kind/element
consumeStatusesmatch, perStackCoefficientavoidabledetonate stacks for bonus damage (Execute)
teleportmode, distanceM?selfinstant blink (forward=aim, toTarget=adjacent)
jumpmode, distanceM?, speedMSselffast glide to destination
resetCooldownabilityKind?selfreset one/all of the actor's cooldowns
lifestealfractionselfheal actor for a fraction of damage dealt

Deliveries 7

How targets are chosen — orthogonal to effects (any payload rides any delivery).

selfno target — hits the actor
single { rangeM, minRangeM?, melee? }one target in range; impact delay syncs melee
projectile { rangeM, speedMS }homing bolt; to-hit rolled at impact
arc { rangeM, arcDeg }frontal cone; each target rolls its own hit/crit
aoe { radiusM, center, filter }everyone in radius of self/target; flat damage
groundAoe { radiusM, placeRangeM }drag to place a center within reach
aura { radiusM, status, filter }persistent field applying a link status

Statuses 9

Everything time-boxed lives in one list; capabilities derive from it each frame.

stuncan't move/turn/act/regen
sleeplike stun; breaks on any damage
immobilizecan't move (turn/act ok); blocks self-moves
slowmoveSpeed × (1 − magnitude); strongest active wins
dot / hotperiodic damage/heal; snapshot at apply, no crit/variance
buffmodifier bag + hooks + duration (debuff = polarity)
stealthunseen unless within 50% melee; breaks on offense/damage
tauntforces an NPC's target onto the caster
auraLinkmembership token placed by an aura field

Stacking

refreshreset duration (default; sleep, dot/hot, buffs)
takeLongerkeep the greater remaining (hard CC: stun, immobilize)
strongestall coexist, only the max-magnitude is active (slow)
stackincrement stacks to maxStacks; modifiers scale by stacks

Hooks 8

Reactive event → effects on a status (usually a buff). Fire flat & unavoidable, no recursion. Power reflect, lifesteal, procs, detonations.

onHitlanded a hostile effect (ctx.other = victim)
onHitTakenhit by a hostile effect (ctx.other = attacker)
onDamagedhp dropped from any source (ctx.other = source)
onDodgedodged a physical hit
onResistSpellresisted a spell
onCritGivenlanded a crit
onKilllanded a killing blow
onExpirethis status expired (Living Bomb detonate)

Hook target

selfthe carrier
sourcectx.other (attacker / victim)
aoeAroundSelffoes-of-the-owner within radiusM of the carrier

Conditions 9

Gate an ability at trigger time (all must pass). Also reused on hooks. Combos read the element/status tags they leave behind.

  • casterOutOfCombat / casterInCombat
  • hasTarget
  • casterStealthed
  • casterHealthBelowPct / AbovePct { pct }
  • targetHealthBelowPct / AbovePct { pct }
  • targetWithinRangeM { rangeM }
  • targetHasStatus { kind }
  • targetHasElement { element }
  • targetIsImmobilized

Casting & channeling

cast: fire on complete; incoming damage pushes it back 500 ms. channel: apply every tick; incoming damage shortens it 500 ms. No global cooldown — per-ability only.

Dynamic modifier

A passive stat whose magnitude tracks live state each tick: basis: missingHpPct | currentHpPct | enemiesWithinM, mode: add | factor, capped. Powers Frenzy (HP-scaled attack) and Bulwark (crowd-scaled mitigation).

Talents

A talent is one effect of a kind below. Points bank (1/level from L2, cap 9); a branch is a diamond — two free talents, two that need 2 in branch, then the capstone that needs 4. No reassign.

kinddoes
grantAbilityadds a new button to the bar
modifyAbilitypatches an existing ability (cooldown, +effects, coefficient, range)
passivean always-on status: modifiers / hooks / dynamicModifier
statModifierflat unconditional stat change(s)

Live inventory

A frontline bruiser who lives in the thick of it. Strong armour and wide swings let the Warrior hold off many foes at once — charge in, take the hits, and hand them back harder.

Rage
Hit fast and reckless — build Rage, dump it in a burst, risk dying.
Reckless Assault passive
Landing or taking a hit builds Rage (harder hits, more crit).
Bloodthirst grantAbility
A melee strike that heals you for half the damage dealt.
Frenzy passive needs 2 in branch
The lower your health, the more attack power (up to +40%).
Rampage passive needs 2 in branch
Kills grant Rage + haste and reset your cooldowns.
Berserk grantAbility needs 4 in branch
Consume Rage: 8s of huge damage + lifesteal, then backlash.
Mastery
Plant damage that compounds, stay glued to the mark, then detonate.
Rend grantAbility
A strike that leaves a stacking bleed.
Sunder modifyAbility
Your melee hits strip the target's armour (stacks).
Duelist's Step grantAbility needs 2 in branch
Leap to a target; your next strike hits harder.
Deep Wounds passive needs 2 in branch
+crit, and your crits refresh the target's bleed.
Execute grantAbility needs 4 in branch
A heavy blow that devours all bleeds & sunders; resets on a kill.
Defence
Gather the crowd, weather the storm, and turn their force back on them.
Bulwark passive
The more enemies around you, the tougher you are.
Challenging Shout grantAbility
Taunt every nearby enemy onto you.
Retribution passive needs 2 in branch
Reflect a bit of every melee hit back at the attacker.
Riposte passive needs 2 in branch
After you dodge, your next hits are massively empowered.
Aegis grantAbility needs 4 in branch
6s near-invulnerability, then a burst of their own damage back.

Tuning baselines

Single source of truth in config.ts — tuned in the lab, shipped as-is.

Player attack/spell/heal power (L1)11
Player maxHp / speed (L1)100 hp / 4 m/s
Damage variance (global spread)±20%
Base crit chance / multiplier10% / 1.75×
Base dodge / spell resist10% / 10%
Mitigation cap80%
Cast pushback / channel shorten500 / 500 ms
Teleport settle window1000 ms
Physical reach (pull / loot-walk)10 m
Regen combat lockout5000 ms