Using Yanfly Row formation, im trying to figure out a skill that does 20% of DMG dealt to primary target to all others in row? If possible also to select one other member of the same row.
Im having trouble figuring it out. Basing it off Magnet Skill in tips and tricks;
Im having trouble figuring it out. Basing it off Magnet Skill in tips and tricks;
Code:
<Post-Damage Eval>
// Get the target's row ID.
var row = target.row();
// Get the target's alive allies.
var members = target.friendsUnit().aliveMembers();
// Loop through each member.
for (var i = 0; i < members.length; ++i) {
// Get current looped member
var member = members[i];
// Check if member exists and if the row doesn't match the target's row
if (member && member.row() == row && value > 0 ) {
target.gainHp( Math.ceil(-0.2 * value));
if (user.isDead()) {
// If the attacker is dead, make it collapse.
user.performCollapse();
}
}
}
</Post-Damage Eval>