Damage Formula Lab with TTK Charts

Compare safe game damage formulas through live curves, attack and defense heatmaps, rounding breakpoints, criticals, hits to kill, and time to kill.

Write the damage rule you use now, place an alternative beside it, then tune one combat state. The proving ground shows where each formula lands and how it behaves beyond the comfortable middle.

Private combat model. Formulas and files stay in this browser.

Formula chamber

Formula language

Variables: attack, defense, level, power, resistance, flat, criticalChance, criticalMultiplier
Safe functions: min, max, clamp, abs, sqrt, pow, floor, round, ceil

Combat state

Advanced combat and engine rules
Damage rounding
Modifier order
Live model

Live impact comparison

Damage gap0
Current 0 Expected damage
Hits to defeat
0
Time to defeat
0 s
Challenger 0 Expected damage
Hits to defeat
0
Time to defeat
0 s

Attack trajectory

Attack sweeps from half to twice the current value while defense stays fixed.

0 max
CurrentChallenger
Pressure field + Breakpoint watch

Pressure field

Each tile shows Formula A expected damage across attack and defense combinations.

Attack increases to the right
Defense increases downward

Breakpoint watch

    Expected critical damage is an average, not a random combat simulation. Animation locks, reloads, misses, status effects, player decisions, and encounter rules are outside this model.

    Carry the experiment

    The share link stores configuration in the URL fragment. It is not sent to a server by this tool.

    Zoom 100%
    Utilities Studio

    Want this utility on your website?

    Customize colors and dark mode for WordPress, Notion or your own site.

    Frequently Asked Questions

    What does the damage formula calculator compare?

    It runs two safe mathematical expressions against the same combat variables. You can compare damage curves, hit count breakpoints, time to kill, rounding, resistance order, and a two variable attack and defense heatmap without executing JavaScript.

    Which variables and functions can I use?

    Available variables are attack, defense, level, power, resistance, flat, criticalChance, and criticalMultiplier. Safe functions are min, max, clamp, abs, sqrt, pow, floor, round, and ceil. Operators include addition, subtraction, multiplication, division, exponentiation, and parentheses.

    How is time to kill calculated?

    Hits to kill is target health divided by rounded expected damage, rounded upward. Time to kill is the interval between the first and final hit, so the tool uses hits minus one divided by attacks per second. A one hit kill therefore has a time to kill of zero seconds.

    Why can resistance order change the result?

    Applying a flat modifier before percentage resistance also reduces that flat amount. Applying resistance first leaves the later flat modifier untouched. The lab exposes both pipelines because engines and combat designs may intentionally choose different orders.

    Does a smoother curve mean the game is balanced?

    No. A curve can reveal cliffs, zero damage zones, and breakpoints, but balance depends on goals, player choices, encounter context, feedback, and playtesting. The lab reports numerical behavior and never presents a universal balance verdict.