Yanfly Battle Engine and Boomerang code (Fixed!)

I've been struggling with boomerang codes for almost 72 hours but a solution has been found!

There seems to be an odd quirk with the way Yanfly's plugins work and how MoveAnime sets itself up.

In the code, when the boomerang is "returning" to the user from the last/only target, Yanfly's plugin is causing the animations X-coodinate on the target to "flip" to the opposite side of the screen (if it was last target is in the bottom-left corner, it will return from the bottom-right instead). Adding ", mirror" after "animation 160: user" in the <Finish Action> part of the code resolves this issue.

<Custom Target Eval>
targets.push(target);
var members = foes.aliveMembers();
members.splice(members.indexOf(target), 1);
var extraTargets = 3;
while (extraTargets--) {
var member = members[Math.floor(Math.random() * members.length)];
if (member) {
targets.push(member);
members.splice(members.indexOf(member), 1);
}
}
</Custom Target Eval>
<Setup Action>
perform start
eval: setStartPosition(160, user._screenX, user._screenY)
eval: setParams (160, 48, 30, 5)
</Setup Action>
<Target Action>
animation 160: target
wait for animation
action effect: target
eval: setStartPosition(160, target._screenX, target._screenY)
</Target Action>
<finish action>
animation 160: user, mirror
wait for animation
ClearParams (160)
</finish action>

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-battle-engine-and-boomerang-code-fixed.83571/