Help me modify this code please?

Magusalfador

Veteran
Veteran
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:
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>
Thanks!!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top