Game freeze with skill use

My game is freezing when i used this one skill right after the cast. The skill worked fine before i added all the passives so im guessing that the issue but I don't know what passive is messing it up.
Some notetags are too long
Blizzard state: 90

<Custom Apply Effect>

user.opponentsUnit().aliveMembers().forEach(member => {

member.addState(90);

})

$gameParty.members().forEach(function(actor) {

actor.addState(90);

});

</Custom Apply Effect>



<Custom Regenerate Effect>

if (Math.random() < 0.5) {

if (target.isActor()) {

target.addState(88);

target.gainHp(-100);

}



else if (target.isEnemy()) {

target.addState(91);

target.gainHp(-1000);

}





target.startDamagePopup()

}

</Custom Regenerate Effect>


Snowblind: 88 - just applies blind on actor

Snowblind: 91 - For enemies

<Custom Apply Effect>



if (!target.name().includes("head")) {

target.removeState(91);

}





$gameTroop.members().forEach(function(enemy) {

enemy.addState(92);

});

<Custom Apply Effect>

Blind: 92 - just a blind but invisible
Blizzard state: 90

<Custom Apply Effect>

user.opponentsUnit().aliveMembers().forEach(member => {

member.addState(90);

})
if you have a state that has an apply effect, you shouldnt make that effect to give another another the same state unless youre managing it somehow. if Blizzard has an apply effect to give all battlers Blizzard, then its going to do exactly that. Every time it gets applied, its also going to try to apply it to all battlers. and on every one of those applications will try to do the same again, and those will try to apply the state to everyone, and so on.

youd need to make it so that it doesnt give the state to anyone that already has it. Alternatively, its also the exact use case for yanfly's passive aura effects plugin.
if you have a state has an apply effect, you shouldnt make that effect to give another another the same state unless youre managing it somehow. if Blizzard has an apply effect to give all battlers Blizzard, then its going to do exactly that. Every time it gets applied, its also going to try to apply it to all battlers, and on every one of those applications will try to do the same again, and those will try to apply the state to everyone, and so on.

youd need to make it so that it doesnt give the state to anyone what already has it. Alternatively, its also the exact use case for yanfly's passive aura effects plugin.
i see, so like since i want the state applied on everyone i could do <Everybody Aura: 90> on the state?
so like since i want the state applied on everyone i could do <Everybody Aura: 90> on the state?
Per the instructions, it has to go on a separate state.
1746392948814.png

if someone somewhere has a passive state for blizzard, then try putting the aura there.
yeah it works now thanks, but the blizzard randomizer doesn't, its supposed to have a chance of applying the blind state but it always applies it
nothing should have changed in that regard. how many attempts did you give it?
wdym?
but the blizzard randomizer doesn't, its supposed to have a chance of applying the blind state but it always applies it
were you not referring to states 88 and 91? the only states behind a Math.random() condition? If they worked before and they arent now, nothing about making the state an aura effect should have changed how it determines if either of them are applied.
they never worked just the like skill itself without any states. I just made the blizzard give me a passive that has

<Everybody Aura: 90>

but the blind always procs on the enemies no matter what, but seems to not always proc on actors
ok i solved it finally, i just make the enemy state different from the player state and it seemed to work, idk why I tried it but it worked lol, thanks for helping me out.

Original thread: https://forums.rpgmakerweb.com/threads/game-freeze-with-skill-use.177423/