I was wondering if there is a way to make a Hand of Sacrifice macro that will target the closest friendly player and cast Hand of Sacrifice and if possible combine that with a standard mouse over macro. So when healing in a bg and a mage begins to cast poly I can just reaction click the macro and break CC.

In priority of targeted friendly player > mouse over friendly player > the closest friendly player

I only play BGs and never arenas.