MZ MZ - Skill that allows user to steal buffs/states from enemy

Hello! I'm a newbie that needs help so sorry for my general ignorance. I also don't completely understand the difference between a buff and a state? And how I can play with those two things? I just need a way to be able to easily transfer back and forth specific buffs/debuffs/states that were gained in battle. Thought of using common events to accomplish this, but I am only allowed to change a fixed state, and not necessarily the states that the actor/enemy currently is afflicted with.
States are defined in your database and can have a variety of effects between the database settings and their assigned traits.

Buffs/debuffs are hardcoded into the engine and don't do anything except serve as a multiplier to parameters.

And, of course, they are referenced in entirely different ways in the editor.

You could do it in an event, it would be pretty convoluted because you'd have to check each individual state. And you wouldn't be able to do it with buffs (without getting into scripting).

It's more easily implemented if you use something like VisuStella's Battle Core.

For example, if you have an attack skill that should steal the opponent's states, you'd do:
Code:
<JS Post-Damage as User>
target._states.forEach(state => user.addState(state));
while (target._states.length>0)
    target.removeState(target._states[0]);
</JS Post-Damage as User>
States are defined in your database and can have a variety of effects between the database settings and their assigned traits.

Buffs/debuffs are hardcoded into the engine and don't do anything except serve as a multiplier to parameters.

And, of course, they are referenced in entirely different ways in the editor.

You could do it in an event, it would be pretty convoluted because you'd have to check each individual state. And you wouldn't be able to do it with buffs (without getting into scripting).

It's more easily implemented if you use something like VisuStella's Battle Core.

For example, if you have an attack skill that should steal the opponent's states, you'd do:
Code:
<JS Post-Damage as User>
target._states.forEach(state => user.addState(state));
while (target._states.length>0)
    target.removeState(target._states[0]);
</JS Post-Damage as User>
I do indeed have VisuStella's Battle Core installed. So would putting that code in the note box thing of the desired skill make it be able to steal states automatically once it is used? Would it just be easier to use states to serve as the buffs for these stat multipliers then too?
Moved to: Plugin Support

Original thread: https://forums.rpgmakerweb.com/threads/mz-skill-that-allows-user-to-steal-buffs-states-from-enemy.157843/