Let's say a Darkness spell is casted on a specific point:
Magical darkness spreads from a point you choose within range to fill a 15-foot-radius sphere for the duration. The darkness spreads around corners. A creature with darkvision can't see through this darkness, and nonmagical light can't illuminate it.
Now let's assume Alice moves inside this Darkness. Bob has seen Alice move in and wants to shoot at her with a bow. Nor Alice neither Bob has a way to see through this darkness. How does that work?
Among the possible rulings I can think of:
- Bob is able to follow Alice's steps since she never used an action to Hide, and can shoot at her. He gets a disadvantage on his attack (because he can't see his target), but also an advantage (because his target is blinded) and thus they get cancelled out. In the end, walking in has no substantial mechanical effect.
- Bob has to pick a specific square he wants to attack. If it happens that this is the square where Alice is standing, the attack would proceed normally. Otherwise the attack is an automatic miss.
Now, what if instead of Darkness there is an opaque wall. Alice goes behind it. Bob has seen her but he can't shoot through the wall. Charlie on the other hand could easily cast a small area-of-effect spell above the wall, but Charlie has been unconscious until now (they just got healed by Bob) so they actually haven't seen Alice at all. Would they be able to know where Alice is? Does it work the same as with Darkness?
Lastly, what if on top of the lack of line of sight, the area was also covered by a Silence spell? Would that change the outcome?
relatedRelated: How does fighting in an area covered by the Darkness spell work? However this other question is focused on the "(dis)advantage" aspect, where mine is focused on targeting.