Magic Reflect

Hi, I'm having a problem with magic reflection. When an ally heals or buffs a character with magic reflection, that ability is also reflected. Do you know of any way to prevent allies' or positive abilities from being reflected? I use RPG Maker MZ and have the Visustella plugin.
You can set them to 'certain hit' so they aren't reflected.
If that's a problem, I think you can modify the reflect function to just check for a notetag.
You can set them to 'certain hit' so they aren't reflected.
If that's a problem, I think you can modify the reflect function to just check for a notetag
I'd prefer to be able to somehow modify the reflection so it distinguishes between enemy and friendly attacks. But I can't find a way to do that. But it's a good alternative, thanks.
Hmmm, does it work if you just add the isForOpponent() check in the magic reflection function:

BattleManager.invokeAction = function(subject, target) {
this._logWindow.push("pushBaseLine");
if (Math.random() < this._action.itemCnt(target)) {
this.invokeCounterAttack(subject, target);
} else if (Math.random() < this._action.itemMrf(target) && this._action.isForOpponent()) {
this.invokeMagicReflection(subject, target);
} else {
this.invokeNormalAction(subject, target);
}
subject.setLastTarget(target);
this._logWindow.push("popBaseLine");
};

Original thread: https://forums.rpgmakerweb.com/threads/magic-reflect.178289/