I dont think theres a way to do that directly since damage area is from the map itself and doesnt have an ally
But you could heal allied units within that range for that damage right after the damage goes through
Problem with that is if the unit is below 50 hp it will die before it can be healed
You would have to add an if statement that checks if they are below 51 and heal them first, then do the damage right after
Would look something like this:
Just put your actions where that comment is (outside the if statement) and have the 2nd set life line at the end
Also i cant remember if your own units count as allied to you, if they dont, it would need to be changed a bit, but it wouldnt be too hard
Matching unit may need to be picked unit, i havent actually tested it
You would be better off just changing damage area to an actual spell though
So that it can truly ignore allies and self