Attack that adds state to self, rather than enemy

So my old account here was apparently deleted... oh well...

I just have a simple question to ask:

Is it possible to have a non-healing attack inflict a state on the caster, or do I have to script it?

I'm making a magic attack that forces the user to recharge for a turn (think of hyper beam and related attacks from pokemon) and I realised as I'm making it that it will inflict the recharge state on the target, making the spell even more dangerous than it is (it's a reduce hp to one attack to be used by a boss, without the recharge it could easily KO the initial party of one.)
use the formula bar:

a.add_state(state id); damage formula here
thanks.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/attack-that-adds-state-to-self-rather-than-enemy.17527/