Cause AOE effect if target is affected by State

I'm back with another problem to solve. I spent the last few hours trying to solve this one in numerous ways but can't seem to quite get it. Here is what I'm trying to do:

Use a lightning skill on an enemy, causing paralysis. When you use a water spell on the enemy afflicted with Paralysis, it causes an AOE shockwave causing damage to the entire enemy troop. I'm not simply trying to make the water attack AOE, it will always be single target, but if the water attack hits the paralyzed enemy, a whole new skill is unleashed causing thunder damage to the enemy party.

I have tried using HIME's scope editor, but that wouldn't let me change my attack based on the enemy's state, only my own (which will still be super handy for later). I tried making a common event where an animation followed by enemy damage would happen, but doing it this way didn't show enemy damage numbers, and also there didn't seem to be a way to check if an enemy is afflicted with Paralysis.

I played around and tested things, googled a hundred different key words to try and find someone trying to do the same thing as me. Nothing. Any help would be greatly appreciated.
if you have YEP_BattleCore and YEP_Buff&StateCore, you can create a
lunatic code to make the water attack AoE when used on the enemy with
the state active, otherwise, it will be normal one.

while I dont know the lunatic code, there are ppl that knows it.

you basicly first check if the state x = true
if so, it does an AoE dmg, else normal dmg.

there is also a plugin that can be usefull that the state get more dmg, and the other
less dmg which can be nice.
Thanks for the input, but that's kinda what I'm hoping to find in this topic. I already know it's going to have to check if the state is there. But I'm not simply trying to make my water spell deal aoe damage. I'm trying to make the water spell deal double damage, and then send out a lightning aoe attack after the fact.

*edit*
I'd be a step closer if someone knows a way to activate a switch or variable upon application of a state, and switch back off upon removal.
Thanks for the input, but that's kinda what I'm hoping to find in this topic. I already know it's going to have to check if the state is there. But I'm not simply trying to make my water spell deal aoe damage. I'm trying to make the water spell deal double damage, and then send out a lightning aoe attack after the fact.

*edit*
I'd be a step closer if someone knows a way to activate a switch or variable upon application of a state, and switch back off upon removal.

For your spell to do double damage if the target is affected with paralyze:
JavaScript:
if (b.isStateAffected(11)) { (200 + a.mat * 2 - b.mdf * 2) * 2 } else {200 + a.mat * 2 - b.mdf * 2}
You will need to change the state to the state you want the skill to detect, and have the damage formulas modified to meet how you want them to function to deliver damage.

To activate a switch or variable upon application of a state you will need to do as follows:
Have the skill call a common event, turning on a switch.
In your troops menu, set the conditions to check for that switch, and the span be moment.
In there set it to do a conditional IF ELSEIF set of branches to check ALL 8 enemies if they affected by the state.
Set the conditional branch to do a specific effect (turn on switch, turn on variable, etc) if it detects that the enemy has the state.
At the end of the event turn off the switch that called the troop event, and turn off the switch that caused your added effect.

Hope this helps, I think this is what your most recent post was asking about. If not let me know and I can go into more detail on doing these types of checks.

Original thread: https://forums.rpgmakerweb.com/threads/cause-aoe-effect-if-target-is-affected-by-state.120425/