No, this will consist of 3 triggers.
The first one would add a event called "Unit_Variable takes damage" to the 3rd one.
Then the second one would be where a unit casts a spell and sets the target into the Unit_Variable.
The third one would be event-less (you add it in the first one) and would include your actions incase the target takes damage.
[Notice] Takes Damage isn't the same as Is attacked.
Takes Damage is when the unit actualy gets hit and takes damage.
Is attacked is a bit after the attack issue has been given, when the unit starts the attack animation.