Hidden mechanics

The math behind the tooltips. Understand this and you build top-tier without trial and error.

Per-instrument scalers

The hidden mechanic that changes everything. Each character has a unique scaler stat that multiplies its damage 1x to 9x. This is the dial to max.

CharacterFormulaMax at cap
guitar1 + min(armor x 1.2, 4)5x (armor cap 5)
violin1 + critChance x 29x (critChance cap 4)
flute1 + speed x 25x (speed cap 2)
piano1 + (maxHpBonus%) x 2uncapped (HP scales)
drum1 + missingHp% x 23x (at 0% HP)
microphone1 + range x 29x (range cap 4)
tambourine1 + luck x 25x (luck cap 2)
trumpet1 + lifeSteal x 24x (lifeSteal stat cap 1.5)

The trick: scalers stack with damage. The scaler does not replace the damage stat. It multiplies on top. If you raise damage to cap (x4) and your scaler to cap (x5 to x9), final multiplier reaches x20 to x36 before the soft cap.

Damage formula

What happens on each shot, in order.

1. Base damage in shot-context

baseDamage = 1 x roleDamageMult x instrumentScaler = 1 x (0.75 to 1.4) x (1 to 9)

2. Damage multiplier in buildLoopModifiers

rawDamageMult = (1 + upgrades.damage x 3) // additive, cap 4x at damage=3 x roleDamageMult // 0.75 to 1.4 x deepFocus(1.15) x suit x dress // situational x berserkerMult // drum bloodRhythm x crescendoBoost // 1.0 to 1.4 (cap) x harmonicConvergence // 1.10^3 = 1.33x (post-fix) x corruptionEmbrace // 1.0 to 1.3 x finalChorus // 1.25 if HP <=15% x extendedMelody // 1.15 if buff active x characterDamageMult // warDrum x deathMarch x ... damageMult = softCapDamage(rawDamageMult x surge) SOFT_CAP = 4.0, excess x 0.6

3. Crit roll in damage.ts

critChance = max(0, upgrades.critChance) // NO upper clamp critMult = 1 + max(0, upgrades.critDamage) // cap 5, x6 isCrit = random() < critChance // >=1.0 means always crit damage = isCrit ? round(base x critMult) : base

critChance has no upper clamp. Stat cap 4 means every shot crits. Combined with critDamage cap 5 (x6 mult), violin or tambourine builds can generate astronomical damage before the soft cap. Intentional, the glass cannon identity.

Defensive stack (21 layers)

Each hit goes through this pipeline in order (player-damage-apply.ts).

  1. Invulnerability gate: nowMs < s.fx.invulnerableUntil, full immunity
  2. Death March (drum): 1HP invuln window, CD 30s
  3. Jingling Shroud (tambourine): absorbs next hit
  4. Pickup Ghost: phase through 5s
  5. Pickup Shield: HP shield absorber
  6. Fortissimo Barrier: consume 1 stack (cap 3)
  7. Rhythm Shield: 2s absorb, CD 5s
  8. Flute Tornado: full invuln during 3 to 4s tornado
  9. Guitar Dash: 260ms invuln (rollUntil)
  10. Tambourine Lucky Negate: chance up to 0.75. gamblersFortune heals plus invuln
  11. Evasion roll: cap 0.95 sum (evasion plus luckyStep plus glissando plus sustainPedal plus slipstream)
  12. Armor flat: totalArmor cap 15 (stat plus adaptive plus bonus plus battleScar plus ivoryFortress plus crowdCrush). max(1, dmg - armor)
  13. Rosin Barrier (violin): flat reduction floor(marks/5), cap -4
  14. Damage Reduction stat: cap 0.5 (50%) hard, multiplicative
  15. Crowd Surf: cap 0.15 per enemy count
  16. Sanctuary Aura (piano): 20% DR during 3s post-pulse
  17. Rhythmic Resilience (drum): 20% DR when <50% HP
  18. Brass Barricade (trumpet): 30% DR 1.5s post-catch
  19. Echo Shield (trumpet): 35% DR with 3+ boomerangs in flight
  20. Cyclone Aegis (flute): 50% DR 3s post-tornado
  21. Resonant Barrier (microphone): 0.88^echoes, floor 0.5

Realistic stack. Multiplicative DR layers 14 to 21 are instrument-specific. A single character only stacks its own plus DR stat plus crowdSurf. Worst case: 0.5 x 0.85 x 0.5 (instrument) = 0.21, around 79% effective DR plus flat armor 15. No build reaches sustained immortality.

Stat caps reference

From src/lib/game/game/rules/stat-weights/stat-caps.ts

StatCapNotes
damage3 (300%)Additive in formula (1 + dmg*3)
fireRate2Multiplicative cooldown
range4Mic damage scaler
critChance4 (400%)No upper clamp in damage.ts, >=1.0 means guaranteed crit
critDamage5 (x6 mult)Multiplies baseDmg on crit
evasion0.5 hardSums with relic bonuses, final cap 0.95
armor (stat)5Total armor (with relics) cap 15
multiHit0.5 hard50% chance double-shot proc
damageReduction0.5 hardMultiplicative
cooldownReduction0.5 hardDash, abilities
lifeSteal (stat)1.5Operational heal cap 0.30
healingBoost0.75Post-heal multiplier
maxHpno explicit capPiano scaler compounding
luck2Tambourine scaler
speed2Flute scaler
projectileCount5Bullets per shot
heal-per-frame0.04 x maxHpLifesteal only (piano pulse capped at 30% per pulse)