In a game last week there were two enemies trying to break down a door to get to us. We were at the end of the hall and our Sharpshooter archery Ranger was trying to hit them through a small crack in the door that they made. Is this possible, and if so, what type of penalties would occur? Would that be considered 3/4 cover?
[RPG] shoot an enethe through a keyhole or small crack of a door with sharpshooter
coverdnd-5efeatsranged-attack
Related Solutions
In an “anything is possible” game, this is fair. In this kind of game, it is necessary for players to actually, truly believe that they can get themselves into so much trouble that they will not have a “final warning” that their PC is about to die, and Death is the most (and often only) effective teacher in this regard.*
And fortunately, players always get another chance at RPG “life” with a new character.
Look at it another way: if you had strained the group's suspension of disbelief to give this player multiple chances to escape after it was obviously dire straits, they would have seen it for the deus ex machina that it is. Swooping in to visibly save the PC after the party made the choice to go in and publicly murder a high-ranking NPC in their stronghold would have only taught them that death is rarely a possible consequence of even the most disastrous choices, because you will always be metaphorically running around underneath them with a safety net. A game with every sharp corner swaddled in soft padding is not an “anything is possible” game.
In fact, this lesson came cheaply: nearly everyone escaped alive, and they learned a valuable lesson: plan your missions! Scout the area, know the escape routes, have an ingress plan and an extraction plan, and failure can easily mean death. This is a lesson they would not have learned otherwise.
In the kind of game you're running, pulling your DM punches does players no favours, because they learn that the world is safe and that you will always pull their fat from the fire. In the kind of game you're running, deaths that can obviously be traced back to a poor decision are immediately valuable to everyone and will improve their skill as players. No player in our modern world knows how to survive in a lethal world of magic and monsters before they start playing in a campaign, and this is really the only way to learn. It's the only way any roleplayer has ever learned how to excel in a high-stakes game.
Yes, it was entirely fair. And in the kind of game you're running, necessary. Next time, they'll be cleverer and be more awesome. Think of it as investing in their future amazingness as heroes — amazingness they will have earned instead of been given.
In a different kind of game, it could have been totally unfair. If anyone tells you that you're being unfair, they're either misunderstanding the kind of game you're running, sufficiently unaware that it's a possible valid play style to recognise it from your description, or just disagreeing on a philosophical level that any group should be encouraged to play in this manner that lots of people find invigoratingly fun and challenging.
All else being equal, of course
Whether death-by-poor-choices can ever be fair is separate from a few other things. Since it's separate, the above considers only fairness with all else being equal.
So, that this is fair does not mean that talking with your players to set expectations isn't still a great idea. An out-of-game discussion about what the game's fundamental challenges are about can deal with the low-hanging conflict-fruit of players just not realising the kind of game you're going to be running. A talk can't truly prepare players who are unfamiliar with this kind of game though, just prepare them to be unprepared, so a talk can't substitute for learning “in the field” by trial and error. (If you didn't have a talk about expectations before starting the campaign, now is the time to check in with your players and have that talk if necessary.)
Nor does it mean that there is never any room for you to increase your skill at GMing and adjudicating these situations as they approach. The players' skill at recognising and exploiting opportunities is gated by your own ability to communicate (with hints or more overt indicators) that such an opportunity exists. That's a skill to hone at every opportunity, especially in self-reflection post-mortem.
All else being equal, it is fair to have PCs die suddenly due to circumstances of their own creation. Allow them to rise to the occasion and make sure you are rising to the occasion, and you'll maximise the empowerment and fun that is possible in a game that is wide open to anything the players want to try to do, whether clever or ill-considered.
* As opposed to, for example, a Participationist or Illusionist game, in which other concerns take priority in the GM's decision process.
Divine Sense can't target something behind total cover.
Your instincts are correct.
The rules on cover state:
Walls, trees, creatures, and other obstacles can provide cover during combat, making a target more difficult to harm. A target can benefit from cover only when an attack or other effect originates on the opposite side of the cover.
There are three degrees of cover. [...]
[...]
A target with total cover can't be targeted directly by an attack or a spell, although some spells can reach such a target by including it in an area of effect. A target has total cover if it is completely concealed by an obstacle.
The usage of the word "concealed" here is problematic, but I think the usage here is assuming you have a solid, non-transparent object providing your cover. I think the intent is clear – if an attack or effect would be blocked completely, then the target is behind total cover.
Since the paladin's Divine Sense feature cannot detect through total cover, I think you are in the clear. The sheet of ice acts much like a wall of force, except the ice can be damaged or broken through, and I'd rule that wall of force provides total cover to enemies on the other side, as it "makes the target more difficult to harm."
This ruling is further reinforced by an unofficial tweet by rules designer Jeremy Crawford from April 2016, in response to a question about whether wall of force provides cover:
Cover is a physical obstruction, not necessarily a visual one.
This also serves to show that the use of the word "concealed" in the description of total cover was in error.
Best Answer
Yes, you can shoot
You don't need sharpshooter to do this, either.
Cover is covered on page 196 of the PHB, and states (emphasis mine):
As long as that opening is equivalent to an arrow slit, then 3/4 cover and +5 bonus to AC is how you would adjudicate that scenario.
To give some direction here, arrows slits are typically about 2" in width from the exterior.
If it is smaller than a standard arrow slit, you could increase the AC bonus further, but that would be up to the DM whether or not they'd allow the action itself at that point.