Let magic shields absorb damage in the right order before health
A hero can wear a blessing, a spell barrier and a potion shield at once, and each one runs out on its own clock. Hits must eat them in a sensible order, spill into health only when they are empty, and some damage should ignore them entirely.
Why this works
Spend first what would be lost anyway. A shield about to vanish helps nobody later, while a long-lasting one still can. Keeping each shield separate, with its own end, is what makes that choice possible.
When not to use it
Skip it when the hero only ever has one shield, or when the choice should belong to the player, such as picking which shield to break first. Then show a single bar or let the player choose.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 32 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 magic shields absorb damage in the right order before health" (read_entry stacked-shields-expire-in-order) 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