Tsukihime's Heal Effect accidentally resurrects

I am using Tsukihime's Effect Manager, which can be found here: http://dl.dropboxusercontent.com/u/23043573/RPG%20Maker/RMVXA%20Scripts/Effect_Manager.txt

One of the effects I have is for healing the whole party.  Unfortunately, it doesn't have a way of checking to see if the actors are alive or dead, and therefore gives dead character their share of the HP, in effect resurrecting them.  This is a nice effect, which I will use (with higher MP), but I would also like a vanilla healing effect.  Can someone tell me what to amend/insert in order for the effect to check if the actors are alive, and only apply healing to them?

This is the effect in question.  The def item section is written as it is because I am using Yanfly's Battle Engine Script which stores the HP in a different variable from the default script.  I don't think that tweak will affect my basic question.

Effect_Manager.register_effect🙂drain_share, 2.0)class Game_Battler < Game_BattlerBasedef item_effect_drain_share(user, item, effect) drained = @result.instance_variable_get🙂@stored_hp_drain) (user.friends_unit.members - [user]).each {|mem| mem.hp += drained mem.result.hp_drain = drained mem.make_damage_popups(mem) } endendThanks
You should be able to use the alive? method to check. So, something like this should work:

Code:
Effect_Manager.register_effect(:drain_share, 2.0)class Game_Battler < Game_BattlerBasedef item_effect_drain_share(user, item, effect)    drained = @result.instance_variable_get(:@stored_hp_drain)    (user.friends_unit.members - [user]).each {|mem|      next unless mem.alive?      mem.hp += drained      mem.result.hp_drain = drained      mem.make_damage_popups(mem)    }  endend
Thanks for this

If I have this as well as the original revive version, I get the following error message when I start the game

warning: idstring drain_share has already been reserved

the game then goes on to open in what seems to be the ordinary way.

Is this a problem?  If it is, do I do something simple like change 🙂drain_share, 2.0) to, say, 🙂heal_share, 2.0)?  But then does that mean that 🙂@stored_hp_drain) in line 5 also needs to be changed?
You don't need to change @stored_hp_drain but you do need to make two changes to both references of drain_share, the one you mentioned as well as another.

Find this line:

def item_effect_drain_share(user, item, effect)Change it to:

Code:
def item_effect_heal_share(user, item, effect)
thank you.  That sorts out what to put as the tag in the skill note box as well.

This may take a bit of time to fully test, as I shall have to wait until one of my characters dies, but here's hoping!

Original thread: https://forums.rpgmakerweb.com/threads/tsukihimes-heal-effect-accidentally-resurrects.25007/