MZ Make both Evasion stats count against a skill

Hello! I'm sure someone somewhere has asked this before, but I tried searching for it and couldn't find anything, so here I post.

I'm currently using some VisuStella plugins for my game, including the Battle Core, so the accuracy formula has the QoL change of simply being "Hit% - Eva%". What I want to be able to do is have some skills with the accuracy formula "Hit% - Physical Eva% - Magical Eva%", in that the two Eva% stats are added together and both counted against the Hit%.

Does anyone know how to make this happen, either with the VisuStella plugins or otherwise?
There doesn't seem to be a setting in the BattleCore plugin to modify the accuracy formula, but if it is only on some attacks you could definitely use Custom Action Sequences to get it done.
.
Untitled.png
just setup a common event something like the above. I believe the VisuStella example project has some demos of how these work, too. You can modify the Hit Rate with a formula, so you'd just have to find a way to get the target's magical evasion.
.
Untitled2.png
Then setup the skill with the <Custom Action Sequence> notetag and make it call the common event you made.
There doesn't seem to be a setting in the BattleCore plugin to modify the accuracy formula, but if it is only on some attacks you could definitely use Custom Action Sequences to get it done.
just setup a common event something like the above. I believe the VisuStella example project has some demos of how these work, too. You can modify the Hit Rate with a formula, so you'd just have to find a way to get the target's magical evasion.
Then setup the skill with the <Custom Action Sequence> notetag and make it call the common event you made.
Sick, this looks like exactly what I need, thanks! I have some skills in my game that are both physical and magical, and I want both halves of each thing to apply to them. Seems like this will do the trick, I'll report back tomorrow to confirm 😂
So, I think I've figured out how to make this work, but have one remaining issue - JavaScript makes my brain melt 👋

I'm setting up two Common Events for composite attacks: one for the "physical hit" and one for the "magical hit," because I want some to have cast animations and some to not [also it saves me some steps, I think]. So, for the "physical hit" version, I'll just subtract the target's Magic Evade in the "Flat" part of the Hit Accuracy formula, and do the reverse for the "magical hit" version.

The issue is that I have no idea what JS to plug in there to make it call the EVA/MEV of the targeted enemy and subtract it from the hit rate. I tried looking through Trihan's Jump into Javascript post but I can't learn code from just reading it, it makes my brain melt. Do you know what code to plug in for it?
hmm, it should be something like:
$gameTroop.members()[BattleManager._action._targetIndex].mev * -100
for flat, or:
1 - ($gameTroop.members()[BattleManager._action._targetIndex].mev)
for rate. It definitely gets the target's magic evasion that way, but for some reason MECH: Multipliers doesn't seem to be having any effect.. wonder if it's a VisuStella bug, or I'm just not understanding it correctly?

Original thread: https://forums.rpgmakerweb.com/threads/make-both-evasion-stats-count-against-a-skill.146024/