Let players buy back what they just sold, without making free money
Everyone sells the wrong thing by accident, so a shop should hold it for a short while. Done carelessly, that list lets the player earn gold from nothing or loses a quest item for good. Here are the rules for price, space, time limit and things that may never be sold.
Why this works
A safety net must be free of profit and free of loss. Charging exactly what the shop paid makes the trip there and back neutral, and a short list with a time limit keeps it a helping hand and not a second storage.
When not to use it
Skip it in a game where choices should hurt, such as a survival game where a bad sale is part of the story. Also skip it where the player may sell for whatever price they like; there the neutral trip no longer holds.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- A diagram of every state
- 22 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 "Let players buy back what they just sold, without making free money" (read_entry shop-buyback-list-with-expiry) 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