Weak hits keep rounding to zero or to one, so armor or bonuses stop mattering
Damage multipliers produce numbers like 2.4, but health is counted in whole points. Rounding that to the nearest whole number erases small bonuses, and a minimum of one makes weak attacks too strong. There is a way to round that keeps the true average without ever showing a fraction.
Why this works
Players cannot see a fraction of a point, but they feel an average over many hits. Rounding up or down by a chance that matches the leftover part gives each single hit a whole number while the long run stays true, so a small bonus still counts a little every time.
When not to use it
Skip it when every hit must be predictable, as in a turn-based tactics game where players plan exact damage ahead. A surprise of one point can ruin their calculation. Round the same way every time there, or show decimals.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 18 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 "Weak hits keep rounding to zero or to one, so armor or bonuses stop mattering" (read_entry fractional-damage-rounded-by-chance-keeps-the-average) 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