Stop Animation in Battle

Is it possible to interrupt a battle animation? For example, if there’s an animation of a projectile flying at a battler and a QTE is successful so that said fireball is dispersed, is there a script that will end the animation early or at least set the opacity to 0 or the x or y to a position off screen?

I’m aware I COULD split the animation into separate parts and show certain parts based on if the skill hit or not but simply stopping the animation would be quicker and less work overall.
This script call is completely untested so it will probably need some adjustment:
JavaScript:
// Game_Actor or Game_Enemy reference
var battler = undefined;  // edit this
// find sprite and set all their animations to 0 duration
var ss = SceneManager._scene._spriteset[(battler.isActor() ? '_actor' : '_enemy') + 'Sprites'];
var ix = 0;
for (let n = ss.length; n--;)
  if (ss[n]._battler === battler) { ix = n; break; }
var sa = ss[ix] ? ss[ix]._animationSprites : [];
for (let n = sa.length; n--;)
  sa[n]._duration = 0;
You'd have to figure out how to get the battler reference, since that depends on your setup.
Thank you for this! I'll test it out and see what I can scare up. I appreciate you!
You're welcome, good luck! 👋

Original thread: https://forums.rpgmakerweb.com/threads/stop-animation-in-battle.153580/