Heal from damage that was really dealt, not from overkill
A vampire-style weapon that heals by a share of damage sounds easy, until a huge blow on a nearly dead rat fully heals the hero, or small hits heal nothing at all. This entry shows what counts as dealt damage and what to do with the leftovers.
Why this works
Healing is a reward for harm that really happened. Counting only what the target lost closes the loophole of hitting something nearly dead as hard as possible, and keeping the leftover fractions makes small hits count over time.
When not to use it
Skip it when healing should come from a choice, not from fighting, such as a game built around potions and rest. Also skip it for weak enemies in huge swarms, where it makes the hero immortal.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 26 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 "Heal from damage that was really dealt, not from overkill" (read_entry lifesteal-from-real-damage-only) 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