possible creation of a confused status like in pokemon

like how the title stated, I am wondering if its possible to create a state like how pokemon has, where when its afflicted the user has a small chance of attacking themselves.

I do not mind if the method requires a certain plugin or can be done in vanilla, I am simple wondering if its possible and how it can be achieved.

Also I am unsure if I posted it in the right thread category- so I am sorry if I did not

Original thread: https://forums.rpgmakerweb.com/threads/possible-creation-of-a-confused-status-like-in-pokemon.153086/