GroupEnumUnitsInRect(whichGroup, world bounds)
loop
set u = FirstOfGroup(whichGroup)
exitwhen null == u
call GroupRemoveUnit(whichGroup, u)
if (IsUnitAlly(u, GetOwningPlayer(GetTriggerUnit() and u != GetTriggerUnit()) then
set count = count + 1
call GroupAddUnit(group2, u) //for distributing damage later
endif
endloop
if (count != 0) then
set damage = GetEventDamage()*.24
//might have the wrong order of params here, winging this
//need a DDS to properly do this as the damage may have killed the unit
call SetWidgetLife(GetTriggerUnit(), GetWidgetLife(GetTriggerUnit()) + damage)
loop
set u = FirstOfGroup(group2)
exitwhen null == u
call GroupRemoveUnit(group2, u)
//should probably use UnitDamageTarget here
call SetWidgetLife(u, GetWidgetLife(u) - damage/count)
endloop
endif