Tiny attacks do zero damage after armor, and the order of bonuses changes the result
At low levels a fight can freeze because neither side can hurt the other, and two players with the same bonuses deal different damage. This entry shows what to do about rounding and flat reductions so that every number the player sees adds up.
Why this works
Whole numbers hide small errors that pile up, so every step of the calculation should be as exact as possible and rounded only once at the end. A guaranteed minimum then makes sure that no hit leaves a fight stuck for ever.
When not to use it
Skip it when damage is shown as decimals, or in a game where a hit that does nothing is part of the fun, such as a strong shield that blocks weak attacks completely. Then allow zero and give the fight a time limit.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 36 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 "Tiny attacks do zero damage after armor, and the order of bonuses changes the result" (read_entry rpg-damage-rounding-stalemate-and-order) 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