Trying to make an attack skill that buffs the user.

I want to apologize in advance if this has already been asked before or if I'm posting in the wrong forum. My research didn't turn up anything (at least not for VX Ace) and I'm new to this site. Please feel free to move this thread to the appropriate place or point me to an already existing answer.

That out of the way, here is my problem:

I want to make a skill that damages an enemy and simultaneously applies a buff to the user. As I understand it, using the State function of the skill menu can only apply states to the target and not the user. I know that a Common Event could probably be used to do this, but it would be really complex (i.e. beyond my own skillset) to do in my particular game, since I use a system that allows actors to change classes at will, which is to say that I cannot know ahead of time which actor is going to use the skill and therefore need to receive the buff, not to mention multiple actors could be the same class at the same time.

If anyone can help with this I would be incredibly grateful. Thank you.
Look into how to apply damage formulas.
You could do it with your damage formula like this
a.add_state(2); a.atk * 4 - b.def * 2
Thank you so much for the reply. It worked.

The crazy thing is, I had found a topic with a similar suggestion before, but they had it written "a.addState(x); a.atk * 4 - b.def * 2", which didn't work, obviously. But this was on a forum about MV and I simply came to the conclusion that this function didn't exist in VX Ace. Guess I just needed to find the right syntax.

Anyway, thanks again!
One thing to be aware of is that this method causes issues if you use the "auto battle" command at all, because when the battler is testing out what actions they could potentially take they evaluate the damage formula of each one, meaning they'd end up buffed even if they don't use the skill.

@Dicherello, you'll find that almost all functions listed in things for MV are there in VX Ace, but Ruby syntax conventions use underscores to separate the words in method names, while Javascript uses camelCase.
Thank you @Trihan, both are very good to know. I'll be sure to keep that in mind.
Look into how to apply damage formulas.
You could do it with your damage formula like this
a.add_state(2); a.atk * 4 - b.def * 2
Hi. I chanced upon this thread and I was thinking of using this in my game on VX Ace. Thanks for this.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-an-attack-skill-that-buffs-the-user.138542/