- Joined
- Jun 15, 2014
- Messages
- 240
- Reaction score
- 41
- First Language
- English Spanish
- Primarily Uses
Hi!! Im using a lunatic mode notetag skill from yanfly tricks named "Piercing Shot", this skill checks for the row of the target and damages it and then damages targets with higher rows. I actually want to simplify it, not using rows at all and just making an attack on a target and then hit all remaining enemies for less damage.
This is the code:
Thanks!!
This is the code:
Code:
<Custom Target Eval>
// Get the target's current row.
var row = target.row();
// Get the target's allies.
var group = target.friendsUnit();
// Loop through each of the rows in your game.
for (var i = row; i <= Yanfly.Param.RowMaximum; ++i) {
// Get the members of the row's alive members.
var members = group.rowAliveMembers(i);
// Check if the member group is larger than 0.
if (members.length > 0) {
// Add a random target from that group.
targets.push(members[Math.floor(Math.random() * members.length)]);
}
}
</Custom Target Eval>
<Damage Formula>
// Default the chain multiplier to 1.
this._chainmultiplier = this._chainmultiplier || 1.0;
// Calculate the damage formula.
value = user.atk + user.agi;
// Apply multiplier to damage formula.
value *= this._chainmultiplier;
// Reduce the multiplier by 0.15 per target.
this._chainmultiplier -= 0.15;
</Damage Formula>

