I want to implement a lifesteal powerup that would restore player's HP based on damage dealt to the enemy combatant.

I achieved a great result by doing this:
1. Creating Status Effect called Lifesteal (with default settings)
2. On ability itself called e.g. Spell 1 I have set User change > Value change > HP with a requirement: Status Effect > Lifesteal
image

There I define efficiency, which defines how much HP should be restored based on the DMG formula. E.g. Restores 50% of the dmg dealt.

This works like a charm, but I would like to avoid setting this up for each ability separately. Is there any smarter way how to achieve the desired behaviour?

Thank you
  • Status effects can do this directly - in the effect's Status Conditions, set up a condition for your health status value and enable Absorb Damage (with some additional settings for control over it).

    This'll absorb any damage the combatant with the effect applies deals to others with abilites or items that have Use Absorb Effect enabled in their target changes.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Works like a charm, thank you!
Sign In or Register to comment.