# If you are flanking a foe and they provoke an attack of opportunity from moving away, is your attack of opportunity at advantage from the flanking?

When using the optional flanking rules giving advantage on attacks versus a flanked target, if the target tries to move out of reach, are any resulting attacks of opportunity against that target still at advantage from the flanking combatants?

Or do the attacks of opportunity technically not happen until the target is almost out of reach and therefore is no longer flanked?

• Are you asking about what happens when moving out of reach and out of flanking at the same time, or are you interested to learn about any way someone could try to move out of a flanked position without being attacked while being flanked (which may include moving to other spaces within reach first)? Commented Nov 25, 2022 at 21:50

## It depends on where they are when they leave your reach

Looking at the rules for Opportunity Attacks:

You can make an opportunity attack when a hostile creature that you can see moves out of your reach. To make the opportunity attack, you use your reaction to make one melee attack against the provoking creature. The attack occurs right before the creature leaves your reach.

So the attack will happen before the creature leaves a space that is within your reach. Or said another way, just before it's left a grid square that is in your reach a creature can attack.

And per the optional rules of flanking:

Flanking on Squares. When a creature and at least one of its allies are adjacent to an enemy and on opposite sides or corners of the enemy’s space, they flank that enemy, and each of them has advantage on melee attack rolls against that enemy.

So the key part of this is, the two characters need to be on opposite sides of the creature in order to be "flanking".

## To diagram it out

Consider:

1 A 3
4 Z 6
7 B 9


Where A is your character, B is the ally on the other side of the flank and Z is the creature on the move.

If Z attempts to move to 7 or 9, then they would still be flanked when leaving your area. So A would get an AoO, but not B. Similarly, if Z tried going to 1 or 3, then B would get the AoO with advantage, but not A.

So in all of these cases, yes, one of the characters would have advantage due to flanking. But the creature would have not left the reach of the other character, so they do not get any attack.

### However

If Z moved sideways first, to either 4 or 6, then they have not left your reach yet so there is no Opportunity Attack. This also means that flanking is no longer an issue. From here, Z can move as they wish.

This "sideways" movement does not work on a grid if A and B are diagonally flanking Z as every open square moves Z out of at least one of the pair's range.

This same sideways movement can happen (and I believe even more likely due to how "opposite" on a grid works) with creatures that are of size Large or bigger.

## Long answer, short

If the creature moves away from one character towards another, before leaving their square, one character can make an Opportunity Attack at advantage due to flanking.

Depending on how the characters and creature are arranged, if the creature spends an extra 5' of movement to go sideways first, they can get out of the flanked situation without leaving anyone's reach. From there they can move in any other direction. They will still be subject to AoO attacks, but none of which are at advantage from flanking.

So it all depends on the direction the creature takes as to whether the flanking condition still exists.

• @Exempt-Medic: You are correct that in a diagonal situation, the creature cannot escape as easily. But I wasn't to to write about every tactical situation. And it does matter when the creature leaves A & B's reach. That's the whole point. Where are they standing when A and/or B get the AoO. If they are in the center, then they are flanked. If they move to the side (which is covered by the whole "However" section) then they are no longer flanked and can keep moving without flanking being an issue. Commented Nov 25, 2022 at 7:22
• I think, while it is not directly answering the question (which is about what happens if the creature leaves reach and flanking at the same time), this is a quite useful supplemental answer that highlights they may be able to leave flanking without leaving reach. Commented Nov 25, 2022 at 9:04
• @Exempt-Medic I rewrote my answer a little to focus more on if a creature moves directly away from one of the two flanking character. But I think it's important to call out that it's not an always automatic thing. That there will be situations where the creature moves away from both characters and ends flanking prior to the AoO happening. Commented Nov 25, 2022 at 21:47

## The attack has advantage

I understand your question to be about the situation where the opponent leaves both the flanking situation and your reach at the same time. For options of leaving flanking without leaving reach, and then later leaving reach, which is possible in some situations, please check out MivaScotts answer.

The rules for attacks of opportunity (PHB p. 195) state:

The attack interrupts the provoking creature’s movement, occurring right before the creature leaves your reach.

As the attack happens right before the creature leaves your reach, it is still in the same space when you attack it, and it therefore is still flanked.

• Wait. Are you sure of it? "Right before leaving reach" and "still in the same space" are not the same thing. Moving inside an enemy's reach does not provoke AOO. It is possible for an enemy to move to another "threatened" square where they are not flanked, and only then move out of the player's reach, provoking an AOO without advantage. Note that this might cause an AOO from the other flanker but let's leave that as an exercise for the reader. I side with MivaScott. Commented Nov 25, 2022 at 20:45
• @Mindwin, I think I can clear up your confusion. I believe this question is asking if you can leave flanking and reach at the same time: " versus a flanked target, if the target tries to move out of reach". If they first move to somewhere else in reach and then move on from there, they are not a flanked target trying to move out of reach any more. I have no doubt that you can first move out of being flanked without triggering AOO (see MivaScotts answer for examples), and then move out of reach. But I think that is not what is being asked here. No need to side, I think both answers are OK. Commented Nov 25, 2022 at 20:57
• I rewrote my answer a little to focus more on if a creature moves directly away from one of the two flanking character. But I think it's important to call out that it's not an always automatic thing. That there will be situations where the creature moves away from both characters and ends flanking prior to the AoO happening. Commented Nov 25, 2022 at 21:45
• @MivaScott I think it would probably be easiest if the quearant clarified what he actually is asking for. Because to me, that you can move within reach without triggering an AOO is so obvious that I did not really consider that is what they might be interested in -- but that presumes maybe a level of rules internalization that is incorrect to assume. Commented Nov 25, 2022 at 21:48
• +1 The thot plickened! :) Commented Nov 28, 2022 at 18:23