This is trivial, you need two tags, one on weapon that enable this behavior, and another in armor that allow to choose correct target,
then in damage script add something like this (this is not correct script only idea):
weapon.getTag a Tag.NEED_SPECIAL_TARGET;
unit.getTag u Teg.SPECIAL_TARGET;
if neq a 0;
if neq a u;
set power 0;
end;
end;
This make that if weapon have set tag `NEED_SPECIAL_TARGET` then it only can "damage" armor that have setted `SPECIAL_TARGET` with same value.