So this is a bit hard to explain so follow along. But I have a mechanic enemies do where they give themself a state called “Rage” on one turn, then on the next turn they unleash a strong attack
Sound simple? Other RPGs do this probably
So I’m thinking to make it more interesting where if you attack an enemy with rage you have a percentage chance to break their rage and give leave them stunned
SOOOO… any ways to make this a reality? I can probably tinker with events but I doubt I’d get far
Without plugins you'd have to set up every damaging skill to call up a Common Event that checks if the target has Rage, use variables to check if they break, then successful breaking removes the state and adds Stun.
With Yanfly's Buffs and States Core, you'd do basically all that but inside the Rage state itself with <Custom Respond Effect> and that lets you use the damage 'value' as part of the check (for instance, maybe more damage breaks the Rage or maybe less does). You also wouldn't need to use a regular variable and just use a temporary one.
In either case, to actually have the enemy use a powerful attack requires the Condition to the Rage state and the Rating to be 3 higher than anything else (otherwise another move might get picked). And then likely remove the state with the chosen skill or have the state last for only one action.
Probably yanfly buffs and states and some notetag js magic.
Edit: Ninja'd
I must be a bit thick this morning, but I am not sure what you need a plugin for. Most battle skills use the "Attack" or "M.Attack" parameters. Have "Rage" increase the parameters "Attack" and "M.Attack" in the traits. You could think about increasing the "Agility" parameter as well.
I suggest clicking the "Remove at battle's end" box. I don't know whether you should use 1 or 2 for "Duration in turns" - you will need to experiment.
Presumably "Rage" would normally be applied by a skill. The only problem that I could see if is "Rage" is mainly intended for enemies, there is a danger that the enemy would use "Rage" twice in succession. If all the enemy does against the party is the standard "Attack" skill, put a restriction on the state to attack an enemy.