Spielerando

Critical Hits

A critical hit is a hit that now and then does extra damage. Every hit gets one roll, and the hit is a crit when the roll falls below the crit chance. Bonuses from gear are added up before the chance and the multiplier are capped, and a crit always does at least one point more than a normal hit.

Also called: Crits, Critical strikes, Crit chance, Lucky hits.

A stout orange otter in a copper pot helmet drives a big wooden mallet into a giant green jelly blob, which flattens in a huge white and yellow starburst of impact.
Thistlegong Smash, an invented arena brawler. Invented game, image generated with AI.

Paste this to your AI

Copy it into Claude, Cursor or ChatGPT. It already has good values and the usual mistakes in it.

Add "Critical Hits" to my game.

What it should do: Crits add a little luck to every hit, so fights are not exactly the same twice, and they give gear that raises the chance or the damage a clear meaning. Used with care they add excitement without deciding a fight on their own.

Use these starting values:
- critChance: 0.1
- critMultiplier: 2
- chanceCap: 0.75
- maxMultiplier: 4

Watch out for these common mistakes:
- A chance above one hundred percent: Tell your AI: add up all the bonuses first, then keep the chance between zero and the cap.
- Multipliers that multiply each other: Tell your AI: add the bonuses together first and add the sum to the base multiplier. Then cap the result.
- A crit that does the same as a normal hit: Tell your AI: round the damage to whole points, then make the crit at least one point more than the normal hit.
- Rolling the dice again and again: Tell your AI: roll once when the hit lands, keep that roll with the hit and use it everywhere. Pass the roll in from outside, so the same roll always gives the same result.
- A roll that lands exactly on the chance: Tell your AI: a hit is a crit only when the roll is below the chance, not when it equals it. A roll is a number from zero up to, but not including, one.

Do not change anything else in the game. Do not claim anything without proof: model what it takes, and show me what your solution rests on and how I can see that it works. If you cannot show something, say you do not know. When you are done, tell me in plain words how to try it.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

What it does

Crits add a little luck to every hit, so fights are not exactly the same twice, and they give gear that raises the chance or the damage a clear meaning. Used with care they add excitement without deciding a fight on their own.

Good starting values

ValueStart withWhat it changes
critChance0.1The base chance that a hit crits, from 0 to 1. One in ten is often enough to be noticed within a fight and rare enough to feel like luck. Gear that adds to it has room to matter.
critMultiplier2How many times the normal damage a crit does. Double is easy to see and easy to balance: with a one in ten chance, crits add a tenth to the average damage.
chanceCap0.75The highest the chance can get after all bonuses. Three in four keeps a miss possible, so a build that stacks the chance does not turn crits into the normal hit.
maxMultiplier4The highest the multiplier can get after all bonuses. Without a top, a few pieces of gear can make one hit finish any fight.

What usually goes wrong

A chance above one hundred percent

Gear adds chance on top of chance until it passes one hundred percent, or a penalty pushes it below zero. Nothing is wrong with the roll, but the numbers on the screen stop making sense.

Fix: Tell your AI: add up all the bonuses first, then keep the chance between zero and the cap.

Multipliers that multiply each other

Three pieces of gear that each say a crit does one and a half times more are multiplied together, and a crit does far more than any of them promises.

Fix: Tell your AI: add the bonuses together first and add the sum to the base multiplier. Then cap the result.

A crit that does the same as a normal hit

On a hit of 1 or 2 points, a multiplier of 1.25 rounds away to nothing. The player sees the crit flash and the number does not change.

Fix: Tell your AI: round the damage to whole points, then make the crit at least one point more than the normal hit.

Rolling the dice again and again

A hit with an animation of many frames rolls on every frame, or the game rolls again when the damage is shown. The player keeps getting new chances for the same hit, and the real crit rate is far above the one on the page.

Fix: Tell your AI: roll once when the hit lands, keep that roll with the hit and use it everywhere. Pass the roll in from outside, so the same roll always gives the same result.

A roll that lands exactly on the chance

The game counts a roll that equals the chance as a crit. At a chance of zero, a roll of exactly zero then crits, and the chance is never really zero.

Fix: Tell your AI: a hit is a crit only when the roll is below the chance, not when it equals it. A roll is a number from zero up to, but not including, one.

How to check it works

Works well with

Common questions

what do i tell my ai to add critical hits

Paste this: Add critical hits: each hit gets one roll from zero up to but not including one, passed in from outside. It is a crit when the roll is below the chance, which starts at one in ten and is capped at three in four. A crit does double damage, rounded to whole points, and always at least one point more than a normal hit. Add bonuses from gear together before capping, never multiply them.

how high should the crit chance be

Start with about one in ten. That is often enough to notice within a fight and rare enough to feel like luck. Raise it only with gear, and keep a cap below one, or crits become the normal hit.

should crit bonuses add up or multiply

Add them up. Add all the bonuses together, add the sum to the base multiplier, and cap the result. Multiplying them makes a few pieces of gear far stronger than any one of them promises.

why do my crits feel too frequent or too rare

Check how many times the game rolls for one hit. If it rolls once per frame or once per number shown, the real rate is far above the one you set. Roll once when the hit lands.

Where it comes from

We could not find a reliable origin for this one yet.

Where this mechanic comes from has not been researched yet.

Games are named only as references. Names and marks belong to their owners, and nothing here is endorsed by them.

What was checked

This is what separates the blueprint from a catalogue entry: the values on this page come from code that runs.

Your AI gets the code

Tested example code comes through the Spielerando connection, so your AI can use it right away. How to connect it