toucanbuzz
No rule is inviolate
Conclusion: PC gets an attack of opportunity on the Orc.
Let's get our rules first.
Diagonals
Only apply to movement on a grid (can't go diagonal with a wall). So that's a red herring issue.
Attacks of Opportunity
PHB p195: The ONLY qualifiers for an AOO is that (1) "a hostile creature that you can see" (2) "moves out of your reach." It has nothing to do with your movement options or diagonals.
The AOO occurs "right before the creature leaves your reach." It has nothing to do with your movement options or diagonals.
Cover
In summary, cover is never granted around a corner to adjacent foes. See DMG p251 on cover in that you can draw imaginary lines from the bottom right corner of the PC's square without obstruction to all points in the orc's square.
Sight When Target Leaves Its Square, aka "Hiding"
It's odd "hiding" comes into play, but bear with me. Being around a corner can provide cause for a Hide action. So, is the PC aware of the Orc, or is it "hidden" to him? Per the PHB p177, unless the Orc was doing something special to hide himself, the PC is going to be aware of him when the orc tries to move by. As such, the PC is going to see the Orc. As such, the PC is going to be able to attack the Orc when it leaves the adjacent square.
Analysis: Orc moves into threatened square by Grim and is spotted, even if previously hiding. Orc could attack Grim, Grim could attack Orc. Orc moves out of Grim's reach. Grim attacks him right before Orc moves out of reach.
Let's get our rules first.
Diagonals
Only apply to movement on a grid (can't go diagonal with a wall). So that's a red herring issue.
Attacks of Opportunity
PHB p195: The ONLY qualifiers for an AOO is that (1) "a hostile creature that you can see" (2) "moves out of your reach." It has nothing to do with your movement options or diagonals.
The AOO occurs "right before the creature leaves your reach." It has nothing to do with your movement options or diagonals.
Cover
In summary, cover is never granted around a corner to adjacent foes. See DMG p251 on cover in that you can draw imaginary lines from the bottom right corner of the PC's square without obstruction to all points in the orc's square.
Sight When Target Leaves Its Square, aka "Hiding"
It's odd "hiding" comes into play, but bear with me. Being around a corner can provide cause for a Hide action. So, is the PC aware of the Orc, or is it "hidden" to him? Per the PHB p177, unless the Orc was doing something special to hide himself, the PC is going to be aware of him when the orc tries to move by. As such, the PC is going to see the Orc. As such, the PC is going to be able to attack the Orc when it leaves the adjacent square.
Analysis: Orc moves into threatened square by Grim and is spotted, even if previously hiding. Orc could attack Grim, Grim could attack Orc. Orc moves out of Grim's reach. Grim attacks him right before Orc moves out of reach.