The problem is you have no idea the kind of damage dealt by the unit, sadly. DDS can't detect damage type (not those CODE/SPELL/PHYS, but NORMAL/PIERCE/CHAOS etc) used by units AFAIR.
Unless the Defend count all kind of damage (NORMAL/PIERCE/CHAOS etc)