The original version of the note tag:
original version
<Custom Passive Condition>
// The passive effect will only be true if there's more than 1 member on the field
condition = user.friendsUnit().aliveMembers().length > 1;
</Custom Passive Condition>
<Custom React Effect>
// Check if this dealt HP damage
if (this.isHpEffect() && value > 0) {
// Get the current group of alive allies
var allies = target.friendsUnit().aliveMembers();
// Calculate the amount of damage dealt spread across the allies
var dmg = Math.ceil(value / Math.max(1, allies.length - 1));
// Check if the number of allies is greater than 0
if (allies.length - 1 > 0) {
// If it is, reduce the direct damage to 0
value = 0;
}
// Loop through each of the allies
for (var i = 0; i < allies.length; ++i) {
// Get the currently looped ally
var ally = allies;
// Check if the ally exists and isn't the target
if (ally && ally !== target) {
// Make the ally take damage
ally.gainHp(-dmg);
// Show the damage popup
ally.startDamagePopup();
// If the ally is dead
if (ally.isDead()) {
// Then make the ally collapse
ally.performCollapse();
}
// Clear the ally's results
ally.clearResult();
}
}
}
</Custom React Effect>
// The passive effect will only be true if there's more than 1 member on the field
condition = user.friendsUnit().aliveMembers().length > 1;
</Custom Passive Condition>
<Custom React Effect>
// Check if this dealt HP damage
if (this.isHpEffect() && value > 0) {
// Get the current group of alive allies
var allies = target.friendsUnit().aliveMembers();
// Calculate the amount of damage dealt spread across the allies
var dmg = Math.ceil(value / Math.max(1, allies.length - 1));
// Check if the number of allies is greater than 0
if (allies.length - 1 > 0) {
// If it is, reduce the direct damage to 0
value = 0;
}
// Loop through each of the allies
for (var i = 0; i < allies.length; ++i) {
// Get the currently looped ally
var ally = allies;
// Check if the ally exists and isn't the target
if (ally && ally !== target) {
// Make the ally take damage
ally.gainHp(-dmg);
// Show the damage popup
ally.startDamagePopup();
// If the ally is dead
if (ally.isDead()) {
// Then make the ally collapse
ally.performCollapse();
}
// Clear the ally's results
ally.clearResult();
}
}
}
</Custom React Effect>
user.friendsUnit().aliveMembers().length > 1 => by what script should it be replaced to designate one specific ally or enemy?
target.friendsUnit().aliveMembers(); => same question
Thanks