Take damage from a shield first, with a part that goes straight to health
A rechargeable shield in front of health sounds easy until a big hit overflows it, a special shot ignores part of it, or a shield that breaks exactly does not register as broken. This entry sorts out the order and the leftovers.
Why this works
A shield is a layer of protection, so a blow meets it first, and only what it cannot hold goes through. A part that ignores the layer is what makes piercing mean something. Splitting the hit before subtracting keeps both facts true at once.
When not to use it
Skip it when one number of health is easier for your players to understand, or when shield and health should be damaged by different kinds of attack. Then keep two separate bars with their own weaknesses, or just one.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 16 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Take damage from a shield first, with a part that goes straight to health" (read_entry shield-then-health-with-armor-piercing) 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