Give a hurt player a moment of safety without making lava harmless
After a hit the hero blinks and cannot be hurt for a moment, which stops being hit three times in one second. But done naively it also makes steady burning damage useless, or lets a trap hurt every frame. This entry sorts out which damage obeys the safe time.
Why this works
The safe time exists to stop one burst of attacks from counting many times. Steady burning is not a burst, it is a slow, deliberate pressure. So protection should answer sudden hits only, and leave constant danger alone.
When not to use it
Skip it in games where being hit is meant to be dangerous and quick, such as a tough survival game, or where many weak enemies are the challenge. There, give each enemy its own short wait before it can hit again.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 24 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 "Give a hurt player a moment of safety without making lava harmless" (read_entry damage-immunity-frames-ignore-ticks) 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