<Category: Bypass Death Removal>
<Custom Deselect Effect>
// Check if the target's HP is 0 or is currently in the death state.
if (target.hp <= 0 || target.isDead()) {
// Play the auto-life animation on target.
user.startAnimation(49);
// Set the forced action for the user.
user.forceAction(108, ally);
// Prepare the battle engine for the forced action.
BattleManager.forceAction(user);
// Process the forced action.
BattleManager.processForcedAction();
// Remove the Auto-Life state.
user.removeState(31);
}
</Custom Deselect Effect>
This is what I have so far, with a skill healing someone else, i thought I would take a crack at it, although I have made little to no progress, if you already found a solution please share. Right now I only got it to heal one person and the user, i don't know what ally would be in this case though.
Okay, so after trial and error, I found what you wanted. The plugins involved are: YEP_BuffsStatesCore, YEP_X_StatesCategories, YEP_TargetCore and YEP_X_SelectionControl for good measure. I used Yanfly's Chain Lightning tip and trick video and the Autolife to make it.
Spoiler
<Category: Bypass Death Removal>
<Custom Deselect Effect>
// Check if the target's HP is 0 or is currently in the death state.
if (target.hp <= 0 || target.isDead()) {
// Set the forced action for the user.
user.forceAction(108, user);
// Prepare the battle engine for the forced action.
BattleManager.forceAction(user);
// Process the forced action.
BattleManager.processForcedAction();
// Remove the Auto-Life state.
user.removeState(31);
}
</Custom Deselect Effect>
Put this in your state, and put this in a skill
Spoiler
<Single or Multiple Select>
<Custom Target Eval>
// Adds the selected target to the target list.
targets.push(target);
// Grab the group of alive foes as candidates.
var members = foes.aliveMembers();
// Remove the target from the group of candidates.
members.splice(members.indexOf(target), 1);
// This is the number of extra targets to select with Chain Lightning.
var extraTargets = 3;
// Loop the extra targets.
while (extraTargets--) {
// Grab a random foe from the alive foes.
var member = members[Math.floor(Math.random() * members.length)];
// Check to see if the member exists.
if (member) {
// Add the member to the group of targets.
targets.push(member);
// Remove the member as a viable candidate.
members.splice(members.indexOf(member), 1);
}
}
</Custom Target Eval>
<Actor or Enemy Select>
In effects, put Recover HP 100% and Remove State Knockout 100%
I put scope to all allies dead for good measure, made it work twice.