MV Looking to make a skill that varies with states [MV]

Currently I am trying to make a skill that is described as:
A flurry of attacks with varieties of damage, chance of inflicting a status effect, and even a chance to heal the enemy a small amount!

The skill will hit 5 times, each with a chance of
-Normal Attack (60%)
-Really Strong Attack(5%)
-Really weak attack(10%)
-Status Infliction 1 (10%)
-Status Infliction 2 (10%)
-Chance to heal the enemy (5%)

What I'd like to know is how to do this with one skill and how to make it vary as described above!
with yanfly's skill core, you can try this in the skill's notebox

Code:
<Pre-Damage Eval>
var roll = Math.random();
if (roll < .05) value = Math.ceil(value*3);
else if (roll < .15) value = Math.ceil(value/3);
else if (roll < .25) target.addState(x);
else if (roll < .35) target.addState(y);
else if (roll < .4) value = -value;
</Pre-Damage Eval>
with yanfly's skill core, you can try this in the skill's notebox

Code:
<Pre-Damage Eval>
var roll = Math.random();
if (roll < .05) value = Math.ceil(value*3);
else if (roll < .15) value = Math.ceil(value/3);
else if (roll < .25) target.addState(x);
else if (roll < .35) target.addState(y);
else if (roll < .4) value = -value;
</Pre-Damage Eval>
This works pretty well, one thing I might like is if the attack and state weren't simultaneous and kind of took up a thing on their own. Kind of like:
Attack
Attack
State1 (Taking 3rd hit)
Attack
Weak Attack

This is just to show the state taking up one of the five hits.
This works pretty well, one thing I might like is if the attack and state weren't simultaneous and kind of took up a thing on their own. Kind of like:
ah. try this then

Code:
var roll = Math.random();
if (roll < .05) value = Math.ceil(value*3);
else if (roll < .15) value = Math.ceil(value/3);
else if (roll < .25) {target.addState(24); value = 0;}
else if (roll < .35) {target.addState(25); value = 0;}
else if (roll < .4) value = -value;
ah. try this then

Code:
var roll = Math.random();
if (roll < .05) value = Math.ceil(value*3);
else if (roll < .15) value = Math.ceil(value/3);
else if (roll < .25) {target.addState(24); value = 0;}
else if (roll < .35) {target.addState(25); value = 0;}
else if (roll < .4) value = -value;
This is nice, works as well as I need it to!
How can I edit the RNG btw just in case I decide to mess with it later?
adjust the "roll < .x"bit for each of the lines. the gist is that the chance of the thing you want happening is equal to the total so far + the chance you want. that 3rd line there as an example has a 10% chance of happening since the total up to that point was .15 and it covers from there up to .25
adjust the "roll < .x"bit for each of the lines. the gist is that the chance of the thing you want happening is equal to the total so far + the chance you want. that 3rd line there as an example has a 10% chance of happening since the total up to that point was .15 and it covers from there up to .25
Alright thank you! It works really well! 😀

Original thread: https://forums.rpgmakerweb.com/threads/looking-to-make-a-skill-that-varies-with-states-mv.167427/