A useful set of rules to help detect when/who Mercy is damage boosting.
Player.F is a boolean representing whether or not mercy is currently boosting anyone.
Player.E is the player that mercy is boosting.
I hope you guys find this useful and consistent. It's not perfect; there are edge case scenerios where the algorithm struggles and that may be problematic for you, but it works like 90% of the time.