Does firing a ranged weapon through a doorway give cover?

I understand that cover works by the attacker deciding on a corner of their square and checking if a line to any of the defenders squares hits something that gives cover.

But if the attacker is on one side of a doorway, and the defender is on the other side and a few squares away (away being to the side of the doorway), two of the attackers lines do not hit anything (the front two corners in the doorway). However the back two do.

Is this rule intentionally vague? Why not say "if any line" rather than "choose a line"?

--------
|   Gb
PC
|
--------


Diagram. The PCs two corners in the doorway do not trace a line into any of the Goblins squares. But the top left corner does.

• Perhaps a diagram would help explain this better? – Shalvenay Mar 16 '16 at 0:16
• Sure, added ascii art – NeomerArcana Mar 16 '16 at 1:31
• Sigh, I was answering and then remembered it's probably different in 3.5 (I no longer have a handy rules reference for 3.5) than for Pathfinder, as I think that's something they worked on between editions. – gatherer818 Mar 16 '16 at 2:36
• Any line means check all corners and see if any of them go through an obstacle. That's for melee cover though. – gaynorvader Mar 16 '16 at 12:17

In your situation, the PC can attack the goblin without cover penalties.

The cover rule says:

To determine whether your target has cover from your ranged attack, choose a corner of your square. If any line from this corner to any corner of the target’s square passes through a square or border that blocks line of effect or provides cover, or through a square occupied by a creature, the target has cover (+4 to AC).

So your PC should choose the bottom-right corner of their square. All 4 lines from there to the 4 corners of the goblin's square are clear.

• Is that corner legal, given that there is a wall at the same intersection? – Giorin Mar 16 '16 at 9:44
• @Giorin Yes, the rule in the PHB pg151 (good diagrams here) states that "the attacker chooses a corner of its square." then goes on to say if any line drawn from this corner to one of the target's corners intersects a wall, the target has cover. – gaynorvader Mar 16 '16 at 12:37

To determine whether your target has cover from your ranged attack, choose a corner of your square. If any line from this corner to any corner of the target’s square passes through a square or border that blocks line of effect or provides cover, or through a square occupied by a creature, the target has cover. When making a melee attack against an adjacent target, your target has cover if any line from your square to the target’s square goes through a wall (including a low wall). When making a melee attack against a target that isn’t adjacent to you (such as with a reach weapon), use the rules for determining cover from ranged attacks.

--------
|   Gb
PC
|
--------


In this instance the PC can determine cover for a ranged attack from the top-right corner and trace a line to each corner of the goblin's square and conclude the goblin does not have cover from a ranged attack. However, the goblin cannot trace an unbroken line to the top-left corner of the PC's square from any corner. Both the PC and goblin have cover from each other using melee attacks.