How many hits does it take to kill when each hit does a random amount?
Average damage divided by health gives a number of hits that is wrong for everyone who gets a streak of low or high rolls. The real question is how likely a kill is after each hit. This entry shows how to get that table, plus the average number of hits.
Why this works
An average hides the streaks that players actually remember. Following how likely each total of damage is after every hit shows the real odds of a kill at each step, and the average number of hits falls out of those odds without any guessing.
When not to use it
Skip it when the damage range is huge or continuous, or when many other things change the damage, such as armour and criticals on every hit. The table then grows heavy and tells little. Simulate thousands of fights and read the result off.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 35 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "How many hits does it take to kill when each hit does a random amount?" (read_entry chance-to-kill-within-n-hits-when-damage-varies) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP