condition if an attack has a certain target scope?

I'm using yanfly's "single target provoke" state from one of their tips and tricks videos, which uses the following code:

Code:
<Custom Action Start Effect>
// Get current action.
var action = user.currentAction();
// Check if action exists, for an opponent, and that the provoker isn't on the same team
if (action && action.isForOpponent() && origin.isActor() !== user.isActor()) {
  action.setTarget(origin.index());
}
</Custom Action Start Effect>

However, if an enemy under the effect of the "Provoked" state uses a move meant to hit all targets on the opposing side, that move will only hit the actor that provoked it. Is there any way to check if an action has a certain scope?

(this is my second lunatic mode-related question, apologies. surely there's gotta be a list of all these java conditions somewhere...)
Try this:

action.isForAll();

This code is to check if the action is meant to hit all enemies (or allies, depending on what you're going for).
it turns out that yanfly's original code does bypass area-of-effect attacks, and that the test skill i had the enemy use was set to "1 enemy" the whole time, and that i am also very, very stupid. thanks for this code though, it'll probably be useful to me in the future.

Original thread: https://forums.rpgmakerweb.com/threads/condition-if-an-attack-has-a-certain-target-scope.88147/