it woud remove the ability and all the buffs, making it as if the unit never had the ability in the first place. I'm not really all that experienced with spellbook either. My idea would be to add the special effect, then make a trigger.
Unit is attacked
attacked unit is equal to unit with buff
multiply damage taken by .15 (if the mana shield resists 15 percent) and minus it from mana.
You could perfect that formula to your liking.