MZ Make a state that swaps parameters?

As per the title, I was thinking of adding such a state to my game; one that for example swaps ATK and MAT for a couple turns (maybe even affected by any stat buffs the affected may gain in the future, if it's not too complicated). I've looked through a couple threads that asked similar questions, but they were years old and never had the original question answered. I have most of VisuStella's plugins available. Is making this state possible, and could someone help me figure out how to accomplish it?
You could probably get this to work with @Eliaquim's (Hakuen Studio) Dynamic Parameters.

But I haven't used it myself, so I couldn't tell you off the bat how to set it up. My understanding is he doesn't actually put the notetags in the states, but you have to configure them in the plugin parameters.
You could probably get this to work with @Eliaquim's (Hakuen Studio) Dynamic Parameters.

But I haven't used it myself, so I couldn't tell you off the bat how to set it up. My understanding is he doesn't actually put the notetags in the states, but you have to configure them in the plugin parameters.
I don't think it will work. Because my plugin does not set a new value into the parameter, but instead, adds or subtracts.

Knowing that, if the OP references the Atk into Mat and the Mat into the Atk, I believe it could cause a stack size error.

I guess to make it work, it will need a way to subtract a value to set the parameter to 0, and then add a value, for example:

Atk = -Atk + Mat
Mat = -Mat + Atk

But either way, this could not be done by using the battle.param(id) functions, because of the stack size. If the OP references the $dataClasses[id].params[id], this could work. But with this, the parameter will not get the extra parameter values on equipment and items.

Mathematically speaking, I'm sure there is a way since the plugin accepts formulas to change the parameter. But there are a lot of catches to consider.

Plugin link

-----------------------
Maybe this little code could help? It will check if the battler has a specific state ID, and if does, every time the game would check the Atk parameter(ID = 2) it will instead check the Mat parameter(ID = 4). And also the otherwise.

You need to replace the State Id with the state you want.

Copy that into a .txt file, save it, change the extension to .js, and save it as a plugin.

JavaScript:
{

const alias = Game_BattlerBase.prototype.param
Game_BattlerBase.prototype.param = function(paramId) {
    if(this.isStateAffected(stateId)){
        if(paramId === 2){
            paramId = 4
        }else if(paramId === 4){
            paramId = 2
        }
    }

    return alias.call(this, paramId)
}

}
For now at least, it seems to work (and even takes my edit for another state in VS core into account!)
Thank you so much @Eliaquim 🙏

Original thread: https://forums.rpgmakerweb.com/threads/make-a-state-that-swaps-parameters.159877/