Recreating - Confusion (Pokemon)

In Pokemon, Confusion is a state when the Pokemon starts attacking itself (and if in a double battle) will attack their partner randomly. I wonder if this is possible on RPG Maker MV. It probably is but I am not too familiar with states so if anyone knows, it would be great.
There's an option on States for the restriction "Attack anyone" which will randomly attack and enemy or the battler him/herself or an ally.  That sounds like what you're looking for.  If not, how do you want it to differ exactly?
I haven't noticed that one. But I would rather have it attack the allies and itself instead of the enemies.
"Attack an ally" does this, it also attack itself

Edit: Playing with it right now, I find it fun to see them attack eachothers but they never use any skills while in that state apparently.

Original thread: https://forums.rpgmakerweb.com/threads/recreating-confusion-pokemon.60029/