An enemy had grabbed a friendly NPC and was using him as a hostage and standing behind him as cover. The (new) DM seemed to be implying that the archers in our party would risk shooting the friendly.
I thought sacred flame would be good because it can target creatures in cover and seems to go through the environment without damaging anything else. So we reasoned that sacred flame would just fry the enemy and leave our friendly unharmed.
Would sacred flame potentially damage a creature other than the intended target? Or does it only affect the targeted creature?