Cancelling a building upgrade should refund fairly, with no way to cheat
Players cancel upgrades when an attack comes or plans change. Give back everything and they use the queue as a free bank; give back nothing and they feel robbed. This entry explains a refund that depends on how far the work has come, what a waiting job is worth, and what to do when the storage is already full.
Why this works
A refund should match what was truly given up. Nothing spent yet comes back in full, work already done comes back in part, and a limit on what the store can hold stops cancelling from turning into a free place to park goods.
When not to use it
Skip it in a relaxed building game where mistakes should never be punished and players are just exploring. Refund everything there, and let the cost of time be the only price, since a partial refund feels like a trap to a beginner.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 33 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 "Cancelling a building upgrade should refund fairly, with no way to cheat" (read_entry cancelled-upgrade-refund-without-free-money) 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