Refund part of a building's cost without gaining or losing resources over time
Tearing down a hut that cost one plank and returning half of it gives either nothing every time or a whole plank every time, and a player who builds and demolishes in a loop either bleeds wood or prints it. This entry keeps the leftover so the totals stay honest.
Why this works
Whole units cannot be split, so any single rounding choice is unfair to either the player or the economy, and a repeat loop magnifies it. Remembering the leftover and adding it to the next refund makes the small errors cancel out, so the total stays honest over time.
When not to use it
Skip it when costs are large and refunds are never repeated, or when demolishing is meant to refund nothing at all. Then plain rounding is fine and a hidden leftover would only confuse. Use the carry only where small amounts add up.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 17 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Refund part of a building's cost without gaining or losing resources over time" (read_entry demolish-refund-with-carried-remainder) 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