MZ [Visustella Battle AI] Multiple skill usage conditions?

So I don't want to talk anyone's ear off, but basically,

I got a system where if you hit an enemy with an element they're weak to, state 14 (I'm just making up numbers here) is applied. If you hit an enemy with state 14 with an element they resist, state 14 gets overridden by state 15. Again, don't want to bore anyone with details, but I had this system back in an MV project, and it was fun.

But what really made it fun was that the enemy could use the system against you, and this is something I achieved with Yanfly's Battle AI. Visustella's version, however, made a few changes that, while it's probably mostly a complete upgrade, muddy the water on this a bit for me specifically.

So essentially, an elemental skill usable by an enemy would need the following "any" conditions (i.e. as long as one of these bullet points is met, the skill will activate), in order of priority:
  • target resists skill's element but has state 14 applied (triggering state 15 should be priority #1 for them)
  • target is weak to skill's element and does NOT have state 14 applied (to trigger state 14 as often as possible)
  • target is weak to skill's element (for when the first two conditions are fulfilled)
  • random chance to just use it anyway
As you probably notice, those first two have two conditions attached, and that's the core issue here, as I didn't find anything in the Battle AI documentation. (though I also tend to skim and miss stuff, so there's that.)

The workaround I currently have is two versions of any elemental skill enemies can access: one to trigger state 14 with and another that takes priority to trigger state 15. This would omit bullet point #2, but it would work... however, that would also be kind of an unwieldy database, so I'd like to avoid that if possible. My hopes aren't high considering the documentation seemingly didn't include anything on this, but I wanted to be sure.

Or maybe there's some other plugin out there that does what I want? Nothing's off the table for me!
Hmmm, if there's no keywords, it does read code, but you have to write it in the correct way with a comparison operator. I think I've gotten it to work with stuff like X.isStateAffected && X.elementrate > 1 [in the 'any' notetag].
But you'd have to find out how it's referencing the battler that it's evaluating. Maybe the unobfuscated MV version can offer some hints?

Original thread: https://forums.rpgmakerweb.com/threads/visustella-battle-ai-multiple-skill-usage-conditions.173958/