Charge a fair price for repairing only a part of the damage
A full repair costs four iron. The shield is only a little scratched, so the game asks for 0.2 iron, rounds it to nothing, and repairs are suddenly free. Or it rounds up to a full price for a tiny fix. This entry prices every fraction and repairs as much as the bag can pay for.
Why this works
Small prices disappear when rounded to the nearest whole piece, and players find that gap quickly. Always rounding in the shop's favour means splitting a job into slices can never beat paying for it at once, so the price stays honest at every size.
When not to use it
Skip it when repair is meant to be free or nearly so, such as a forgiving game where upkeep should never stop the fun. There a flat fee at the workbench, or an automatic fix between levels, is simpler and kinder.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 26 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 "Charge a fair price for repairing only a part of the damage" (read_entry partial-repair-cost-rounds-up) 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