How to make this “Rage Break” idea a reality

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.
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.
This might actually work so I’ll give it a roll. How can I make the common event work in one target tho?
I must be a bit thick this morning, but I am not sure what you need a plugin for.
The important part of the question is that the state can be replaced with a percentage chance from damage, which I don't think is something the engine can do without jumping through tons of hoops.

How can I make the common event work in one target tho?
Oh right, this is MV and not MZ so it won't remember the last target. I'm not really sure, you might have to make all damage skills apply an invisible 'Target' state to enemies it damages so the Common Event can look for enemies with the Target state and then remove it. The logic of the Common Event (that all damage skills must bring up!) is probably something like;
  • For each enemy (remember there are eight slots);
    • check if that enemy has the Target State (this is helpful for general use*)
      • Check if that enemy has Rage.
        • Set a variable to a random number
        • Check if the variable is above a certain number
          • Remove Rage and add Stun
  • Remove Target from all enemies
I don't remember if you need a script call to see what the enemy's Stun resistance is in case you wanted that to factor in. And this doesn't take into account a successful hit that does 0 damage, but maybe you like the idea that smacking someone is enough to break their rage even if it doesn't hurt them.

*This lets you use a singular Common Event to track effects that care about hitting that you would otherwise need plugins for when you come up with similar ideas to this.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-this-rage-break-idea-a-reality.175984/