When a city drops a level, its high-tier buildings should not vanish at once
A plague lowers the city level and half of the buildings the player paid for stop working in the same second, or worse, get deleted. This entry shows a fair middle path: what should still work, for how long, what the player may no longer do, and how a recovery gives everything back without any bookkeeping.
Why this works
Do not store a conclusion that the facts can tell you any time. If a building's state is worked out from the city's level and the day of the drop, then recovery needs no cleanup, and a short grace period gives the player time to react before anything hurts.
When not to use it
Skip it when losing a level should have an immediate, visible price to teach a lesson, as in a harsh strategy game, or when buildings never depend on the city's size. Then apply the loss at once, or do not tie them together at all.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 29 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 "When a city drops a level, its high-tier buildings should not vanish at once" (read_entry demoted-city-keeps-its-buildings-for-a-while) 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