Status effect with probability on critical hit?

Is there a script or could one be made to where if a player actor lands a critical hit, a status effect is added to the actor that landed the critical hit?

I still need to incorporate the Super Brick powerup in my BreakThru! game and in the original, those show up after receiving a ton of points at once. I want to simulate that when an actor lands a critical hit.


Ideally, in the script, you would designate a state using the ID of the state, within the script. That state would be applied when an actor lands a critical hit given the RNG behind it allowed it. Ideally, the script would read the actor's "State Rate" flag for that state to determine the probability of a critical hit giving the actor the status effect. If the "State Rate" is 10%, there would be a 10% chance that a critical hit will give the actor that state when he lands a critical hit.


Could someone conjure up something like this for my BreakThru! game? I would appreciate it very much. Please and Thank You. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/status-effect-with-probability-on-critical-hit.164714/