I'm trying to create a healing skill that that heals the user to 100% HP every time, and the 'overflow' of the amount healed is split between the other two party members.
ONLY the user can use this skill.
I figured I could just swap the 'user' and 'target' portions of the code using
$gameParty.members().indexOf($gameActors.actor(id))
But the problem is the user's position is never the 'same' in battle, as I have 3 members in battle at a time, and 8 party members total...
Here's the link;
www.yanfly.moe
ONLY the user can use this skill.
I figured I could just swap the 'user' and 'target' portions of the code using
$gameParty.members().indexOf($gameActors.actor(id))
But the problem is the user's position is never the 'same' in battle, as I have 3 members in battle at a time, and 8 party members total...
Here's the link;
Cup of Life (MV Plugin Tips & Tricks) - Yanfly.moe Wiki
<Custom Confirm Effect>
var hpdiff = target.mhp - target.hp;
if (this.isHpEffect() && target.isAlive() && value < 0 && (Math.abs(value) > hpdiff)) {
var difference = Math.abs(value) - hpdiff;
value = -hpdiff;
user.gainHp(difference);
user.startDamagePopup();
user.clearResult();
user.startAnimation(46);
}
</Custom Confirm Effect>
var hpdiff = target.mhp - target.hp;
if (this.isHpEffect() && target.isAlive() && value < 0 && (Math.abs(value) > hpdiff)) {
var difference = Math.abs(value) - hpdiff;
value = -hpdiff;
user.gainHp(difference);
user.startDamagePopup();
user.clearResult();
user.startAnimation(46);
}
</Custom Confirm Effect>