Questions about RPG Maker damage formulas

I'm thinking about purchasing one of the RPG Maker products to make a video game. The game I want to make will be a little unusual by giving each character two numbers for each stat (I call them physical and elemental stats), and to make it work, I'd like to be able to do the following:
-The damage formulas will use two different stats each (both physical and elemental) from the attacker, his/her chosen move, and the defender, so I would like a way to directly create and adjust those functions.
-There will be a function that changes which speed stat is used, so I'd like a way to change which one is used at the beginning of each round of battle. I also want the game characters, both player and enemy, to be able to trigger this change while in battle.

So, with that in mind, will any of the products allow me to do that?
The damage formulae of all later RMs are actually eval'd in the code language that the Maker runs its game in (JavaScript for MV, Ruby for XP to VXA), so anything that can be written in code can be done there.
That answers my question. Thanks, Andar.

Original thread: https://forums.rpgmakerweb.com/threads/questions-about-rpg-maker-damage-formulas.86234/