Event: A unit starts the effect of an ability
Conditions: Ability being cast = YourSpellX
Actions
Set TUnit = Target Unit of Ability Being Cast
Set TUnit2 = Triggering Unit
If/Then/Else
If (Boolean Comparison) TUnit belongs to an ally of Owner of (TUnit2) = true
Then: Set Current HP of TUnit = (Curret HP of TUnit + (1000 + (5 x TUnit2 strength)))
Else: Set Current HP of TUnit = (Curret HP of TUnit - (1000 + (5 x TUnit2 strength)))