MageObject object = ((CopyEffect) effect).getTarget();
if (object instanceof Permanent) {
// so we will use original card instead of target
Permanent original = (Permanent)object;
// copy it and apply changes we need
original = original.copy();
applier.apply(this, original);
newEffect.setTarget(object);
}
}
}