I am trying to create a "Death Shield" ability. Basically, the ability gives a target unit a "Death Shield" behavior for 15 seconds. If the target dies during that time, it will instead become invulnerable for a short time and regenerate 20% of its health.
Unfortunately, while the behavior prevents death just fine, it will NOT regenerate its health. What I've tried is to create a second behavior, "Reviving", to restore its health, and to have the "Death Shield" behavior apply that "Reviving" behavior on taking fatal damage via the "effect - handled" field in the behavior's damage response. But no matter what I do (and I've been beating my head against this for days), the "Reviving" behavior will either not apply at all, or will apply to either the attacking unit or to the spellcaster instead of the unit with the Death Shield.
Does anyone know what is going on here, or how to make this ability work as intended?