Basically I want a one hit all attack that inflicts stun status effect on all enemies but by default it's 10% however for each extra enemy the chance is increased by 10% so if you have 4 enemies on screen the stun chance is 40% does anyone know how achieve this effect? (I use yanflys plugins so if you got ideas that could utilized through their plugins let me know how to)
MV how do I make a status effect infliction increase chance the more enemies are on screen ?
Javascript/Plugin Supportyanfly's skill core.
Code:
<After Eval>
if (Math.random() < target.stateRate(x) * .1 * target.friendsUnit().aliveMembers().length)
target.addState(x);
</After Eval>
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-a-status-effect-infliction-increase-chance-the-more-enemies-are-on-screen.171439/