A state that lets a single-target skill target All Enemies

Hello all,

What I'm trying to achieve is:
Ylva casts Fire (single target spell) > Hits one enemy
but if
Ylva has the State Spread applied and casts Fire > Hits all enemies

I have found scripts where they allow toggling of targets, but it doesn't seem like they can be applied into a state.

Or if not that, a script that changes what skill is cast when a certain state is applied? I'll probably have to make more skills for this.
Seemed like a lot of scripts like those were avialable in VX but I can't seem to find one for MV.

I can probably create the effect with Common Events but I'd rather avoid using those for every spell if a script like those does exist.

Thanks in advance!
Will this also apply to skills that target 1 ally (will it now target all allies), and 1 dead ally (will it now target all dead allies)?

What if the scope is 1, 2, 3 or 4 random enemies, but not all enemies - will that now target all enemies?

What about items rather than skills? If someone has the state and can now target all enemies/allies with a single-target skill, would their using an item that has one enemy/ally as a target also now target all enemies/allies?

What other plugins are you using that this needs to be compatible with?
Ah yes, I wanted it to also apply to spells that heal and revive allies as well. Not for items though.
I planned on it only working with Single-Target magic spells, so wasn't planning on making it available for characters with Random Enemies skills.

I'm mostly using Yanfly scripts.

An alternative would be a Skill Fusion script like Kread-EX's or Vlue's from back in RPG Maker VX Ace but I'm also not sure if a script like that is available in Javascript yet.

https://grimoirecastle.wordpress.com/2011/12/10/skill-fusion/
Try Himeworks Plugin Scope Change Rules it requires Scope Core. In the skills you want to be affected place this notetag:

<scope change rule: all-enemy>
a.isStateAffected(x)
</scope change rule>

And then have a state let's call it all cast and make it number 25, and in the code replace x with 25. And now all you need to make is a skill called All Cast and have it apply the all cast state.

Just make sure Himeworks plugins are under Yanfly's Pluigns and you should be good.

Original thread: https://forums.rpgmakerweb.com/threads/a-state-that-lets-a-single-target-skill-target-all-enemies.90236/