Let the player undo an upgrade without creating a material machine
A refund sounds kind until a patch lowers the price and players upgrade, undo and pocket the difference, again and again. Or rounding hands back more than was spent. This entry refunds what was really paid, only from the top level down, and never a unit more.
Why this works
Money should flow back from where it came from. Writing down what each step really cost, instead of looking up today's prices, means a refund can never exceed the payment, and returning only a part makes round trips a loss. Rounding once at the end avoids losing crumbs.
When not to use it
Do not charge for undoing when players are meant to experiment freely, such as in a build-planning screen or a practice mode. A full refund there invites trying things, and only the live game needs the penalty.
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 "Let the player undo an upgrade without creating a material machine" (read_entry upgrade-refund-from-what-was-paid) 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