Making a stat equal to another stat through states

Trying to find a way to change attack into magic attack for the duration a state is active

Is their a way to do this through something like common events and variables, or is it a pipe dream idea that needs plug-ins?
if you want it to be on a state in battle, then you'll need a plugin.

A common event could handle this only if you had definite marks on when to change it back (like a skill that changes the values and needs to executed a second time to change them back)
Thank you Andar

Original thread: https://forums.rpgmakerweb.com/threads/making-a-stat-equal-to-another-stat-through-states.112773/