Many effects deal with hostile or nonhostile creatures. For example, the ability Radiance of Dawn (Cleric of Light channel divinity) affects hostile creatures within range, and Aura of Life affects nonhostile creatures within range.
It is clear that someone attacking you in combat is hostile, and that a party member is nonhostile. The question is does a covert spy in the party count as hostile? Does an invisible enemy stalking the party count as hostile? Does it count as nonhostile, i.e. would it get the benefit of the aura if it were near the party? What steps can I take as a GM to determine their hostility?
Best Answer
There are some guidelines to help a DM decide what category a creature falls under so let's take a look at page 185 of the PHB:
Page 244 of the DMG goes into a little more detail but there's too much to quote it all here so I'll only post the relevant parts.
In general it's up to the DM to use their best judgement to determine which category a creature falls into and whether or not they are affected by certain spells.
If the covert spy in the party works for someone who "opposes the adventurers and their goals" then they might also technically count as hostile. However this is definitely a case where the rules aren't strictly defined and the DM can rule however they like. If the DM doesn't want to "out" the spy and the party thinks he's their friend, it would make sense to rule that something like Aura of Life would work on him. But if the DM wants to reveal the spy for what they really are or at least hint at it than you would be perfectly fine to rule otherwise.
As for whether an invisible creature can be affect by such spells; a creature's visibility has nothing to do with their attitude. If it's hostile when visible, it's hostile when invisible, whether the party knows it's there or not. As such, we still follow the general spellcasting rules regarding invisibility and spells and if a hostile invisible creature happens to be in range of Radiance of Dawn when it's cast, it would still be affected.