How to make a thorns state?

I want to make a state that deals a flat amount of damage to you when you attack an enemy with the state. Tried looking online but all of the threads were for older engines.
It's basically the same.

If you look at Yanfly's Thornmail Tip & Trick

The code is the same for MZ, you just need to use an MZ plugin for the notetag.

You can use my Eval Tags, linked in my signature; you'd just replace this with skill. It would use the Action Respond Eval.

Or, if you're already using VisuStella plugins, you can use their Battle Core (and Trihan even has a thread you can copy and paste from):

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-thorns-state.170213/