MZ Skill "clashing", and text telling you what skill an enemy is going to use

If there's a way to event this, I'd be glad to attempt it. I'm sure there are specific variables I can use but I'm not good with code so I don't know what they are.

What I want for this plugins is split in two.

CLASHING
Inspired by Library of Ruina. It works as follows:

When the enemy is targeting a character, and this character targets the same enemy, a clash occurs. The damage for each attack is rolled and then compared. Whoever rolled the highest damage then deals that damage to their target, and the target's damage gets fully nullified. If they tie, no one deals damage.

Here's an example of the system in play, starting at 1:40:


Or for a text example:
Spoiler: Text Example
We have Enemy and Actor, who both target each other. Enemy rolls and 8, while Actor rolls a 9. Enemies damage and whatever effects their attacks did get nullified, while Actor deals the full o damage to them.

I don't want to replace the entire system with this. I want to be able to set specific skills that will play every couple of turns to be a clash, but I'm not sure how.

WARNING TEXT
The second part of my request is optional but I think it'd be a nice quality of life feature for the players.

Basically, at the start of a turn when a special clash skill is going to happen, i want to be able to show text on screen to warn the player that the clash will occur so they can act accordingly. I'm thinking of it being placed sorta like this but it doesn't have to be.

k774cx.jpg


Thanks for the help! Anything helps
What's your system to decide who the enemy will target (and show it)? In base code the targets are selected later. I guess you could try to play around with VS Aggro Provokes (but you'd need to find out some of the obfuscated mechanics for those). Then make action sequences to change the skill sequence if there's provoke going on between the battlers. And then change the action of the losing side if they hadn't acted yet.
So far I'm using the base code, without any extra modifications yet. If I'm understanding what you're telling me correctly, the targets aren't set until the turn starts? If that's the case, I suppose it does complicate things a little.

I am willing to make it much, much simpler if need be. Maybe instead of the very specific target vs target, it could clash against whatever is the first attack? Would that make it simpler, or is there another way to make it as simple as possible to program?
Yeah but I suggest using VisuStella Battle Core action sequences. Then you could set the targets in different ways. One way is to roll for index at the start of the turn and then reference that in enemy skill action sequence conditionals to select target. You could show who they're going to attack with a state icon with custom text (VS) or someone might tell you how to draw that kind of curved line between battlers. You can also put the clash in the action sequences as a conditional common event. Then I think you can just change the action of the other battler (who has not yet acted) to null (or some action that does nothing) with a script, if that's what you want.

EDIT: or I guess roll the index at the end of the previous turn, so you see it in input phase
Alright, thank you! I guess I'll have to learn how to use VS Battle Core. I'll reply here if I have more questions

Original thread: https://forums.rpgmakerweb.com/threads/skill-clashing-and-text-telling-you-what-skill-an-enemy-is-going-to-use.181650/