Selling an upgraded tower should return a share of what the player really paid
A player upgrades a tower three times and then sells it. If the refund is based on the list price of the top level, discounts and sales promotions become free money; if it is based on the base price, upgrading feels wasted. This entry shows what to remember per tower and why selling in the middle of an attack should pay less.
Why this works
A refund is a statement about what the player gave, so it must follow what was actually spent, remembered at the moment of spending. Prices on a menu change with sales and patches, but a record of real payments does not. Paying less in a crisis makes selling a plan.
When not to use it
Skip it when selling is meant to be free and instant, such as a puzzle where the player rearranges pieces to try ideas. A loss there only punishes experiments. Refund everything, or let the player undo the last moves.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 22 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 "Selling an upgraded tower should return a share of what the player really paid" (read_entry tower-sell-value-follows-what-was-really-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