I like
@Uzuki's Counter Control approach.
Alternatively, you could use another Yanfly script,
Buffs & States Core, which will give you a little more control over the mechanics of how it works, but also will require a bit more effort. I would probably use a <Custom Deselect Effect> notetag for this kind of effect, and use the ".addState(x)" method to apply the Frozen state (I believe the syntax would be
user.addState(x) where x is the State ID of Frozen, but I'm not 100% sure). Depending on whether this effect should apply to only members from the other party, whether it only applies to attacks not magic, etc., you can use additional scripting.
Almost there, I just need to know how to set rate of getting frozen.
What I did was (using Yanflys buff and states core) add this code to the notetag of State#23, where State#15 is the actual frozen State:
<Custom Deselect Effect>
a.addState(15);
</Custom Deselect Effect>
Then using Yanfly auto passive state:
added this to the notetag of armor#1:
<Passive State: 23>
The only problem is, the attacker gets frozen 100% every time it attacks regardless whether the attack hits or not (as intended), which is so OP! haha.
So if i'm missing anything please help me again, much app.
Edit: Hey I think i've done it?
Modifying the code to this, seems to make it work.
<Custom Deselect Effect>
value = (Math.randomInt(4) + 1);
if (value <= 2)
{
a.addState(15);
}
</Custom Deselect Effect>
Now it seems to freeze the enemy 50% of the time, just like I wanted.
But if you guys have any any suggestions on how to improve this, it's still greatly appreciated. Other than that, this thread is pretty much solved.
BTW here is a video of the results:
▶ YouTube video