I'm making a tanking character for my rpg game and I'm giving her a skill that I got from Yanfly's tips and tricks video. The skill is called Hexdrinker and I grants the user a shield if their health falls below 30%. However I'm looking for a way to only grant shields to the rest of the party and not the user. I've been struggling with this for a week now and I haven't found out how to do it. I'm a novice when it comes to scripting.
The yanfly script is below. Thank you all
<Custom Regenerate Effect>
// Default the Hexdrinker's cooldown to 0.
user._hexdrinkerCooldown = user._hexdrinkerCooldown || 0;
// If the Hexdrinker's cooldown is greater than 0...
if (user._hexdrinkerCooldown > 0) {
// Then decrease its cooldown.
user._hexdrinkerCooldown -= 1;
}
</Custom Regenerate Effect>
<Custom Respond Effect>
// Default the Hexdrinker's cooldown to 0.
target._hexdrinkerCooldown = target._hexdrinkerCooldown || 0;
// Check if the action dealt magical HP damage and if the target's current HP rate is under 30%. Also check if there is no cooldown on the Hexdrinker.
if (this.isMagical() && target.result().hpDamage > 0 && target.hpRate() <= 0.30 && target.hp >= 0 && target._hexdrinkerCooldown <= 0) {
// The amount of points for the absorption barrier.
var barrier = 250;
// How many turns the barrier will last.
var turns = 3;
// Make the target gain barrier points for those turns.
target.gainBarrier(barrier, turns);
// Set the cooldown for the Hexdrinker.
target._hexdrinkerCooldown = 5;
// Play an animation on the target.
target.startAnimation(53);
}
</Custom Respond Effect>
The yanfly script is below. Thank you all
<Custom Regenerate Effect>
// Default the Hexdrinker's cooldown to 0.
user._hexdrinkerCooldown = user._hexdrinkerCooldown || 0;
// If the Hexdrinker's cooldown is greater than 0...
if (user._hexdrinkerCooldown > 0) {
// Then decrease its cooldown.
user._hexdrinkerCooldown -= 1;
}
</Custom Regenerate Effect>
<Custom Respond Effect>
// Default the Hexdrinker's cooldown to 0.
target._hexdrinkerCooldown = target._hexdrinkerCooldown || 0;
// Check if the action dealt magical HP damage and if the target's current HP rate is under 30%. Also check if there is no cooldown on the Hexdrinker.
if (this.isMagical() && target.result().hpDamage > 0 && target.hpRate() <= 0.30 && target.hp >= 0 && target._hexdrinkerCooldown <= 0) {
// The amount of points for the absorption barrier.
var barrier = 250;
// How many turns the barrier will last.
var turns = 3;
// Make the target gain barrier points for those turns.
target.gainBarrier(barrier, turns);
// Set the cooldown for the Hexdrinker.
target._hexdrinkerCooldown = 5;
// Play an animation on the target.
target.startAnimation(53);
}
</Custom Respond Effect>