Multi hit attack, that if kills target remaining hits next target.

Is it possible to create an attack that hits 4 times but if the target dies, the remaining hits continue onto another eligible target.

I have a skill Shockwave, Hits 4 times enemies in the front row. If the enemies in front row all die, then the remaining hits will hit then next row and so forth. Additionally the end of the ability applies a def debuff to the targets hit.

I use action sequence to apply it once at the end because otherwise each hit will apply the def debuff, stacking to 4 only after one use of the skill.
bump

Original thread: https://forums.rpgmakerweb.com/threads/multi-hit-attack-that-if-kills-target-remaining-hits-next-target.122124/