Does moving behind full cover count as “leaving the opponent’s reach” for purposes of Attack of Opportunity?

Suppose I am fighting an enemy with the usual 5-foot reach. He is standing next to a wall beside an open doorway. I am in next to him in the room. Without leaving his 5-foot range, I move to the other side of the wall. Does he get an attack of opportunity?

                                                 M --------  -----    to  --------M -----  to--------  -----            EM                     E                  E 

Assume that the wall is only a foot thick and is halfway in E’s square and halfway in mine, so that E(nemy) and M(e) are in adjacent squares in the final diagram. But the enemy cannot reach me through the wall, so have I “left his reach” taking an attack of opportunity while in the doorway?

If there was no wall there, I could move to that position without provoking any opportunity attack. Does the wall being there make it easier for the foe to attack me somehow?

Does your analysis change in the 3-dimensional case where the creature potentially leaving reach is an incorporeal creature moving from the square next to an enemy to the square (cube) next to and below the enemy?

What is the highest value a condition could reach?

I’m making a Pathfinder 2e character sheet on Google sheet to automate as much number-crunching as possible. Currently, I’m making a dropdown list for conditions, as well as formulas for calculating their penalties.

I find adding conditions with pre-determined values much simpler than conditions with fillable values. For example, instead of clumsy and a blank slot for its value, the dropdown list will have clumsy 1, clumsy 2, clumsy 3, and so on. It’s ugly, but it greatly simplifies the formula. However, if a condition’s value could reach a really high number, then it will be too cumbersome to use.

The highest I have found is stupefied 4 from feeblemind and unfathomable song. I’m also pretty sure I’ve seen an ancestry/heritage/feat which could increase the maximum value of dying to 5.

So what is the highest value/penalty a condition could reach? For the supremely meticulous: what is the highest value each condition could reach?

When an invisible character leaves a blindsight creature’s reach, does the creature get an Opportunity Attack?

A character in the party cast Invisibility on herself, making her invisible. She then tried to move past a Giant Spider, which has Blindsight 10 ft. Per “Does Blindsight detect Invisibility?” the Spider can still tell that the character was there, since the rules for Blindsight say “A monster with blindsight can perceive its surroundings without relying on sight”

But, as she leaves the Spider’s reach, does the Spider get an Opportunity Attack? Per the rules, “You can make an opportunity attack when a hostile creature that you can see moves out of your reach.”

Blindsight just says “can perceive”, but an Opportunity Attack requires “you can see”. Is the “perceiving” of Blindsight enough to be able to “see” for the purposes of the Opportunity Attack rule?

As the DM, I ruled “no” simply on the principle that “When in doubt, rule in favor of the players”, but I’m really not sure that’s right, as I may be taking things too literally.

Time taken by virus to reach all nodes

Given a connected graph, with weighted edges, a virus starts from a given node. It takes x seconds for the virus to travel from a node to one of its neighbours where x is directly proportional to the weight of the edge.

If you are allowed to remove one edge from this graph in order to maximize the ammount of time it takes for the virus to infect all the nodes. How to find this edge?

I could come up with an O($ n^2$ ) solution to remove every edge one by one and then run BFS to find out the time it takes for the virus to infect every node. Is there a better solution in terms of time complexity?

What happens when I redirect an attack with mounted combatant but I am outside the reach of their weapon on a grid?

The mounted combatant feat (PHB 168) allows someone to "force an attack targeted at your mount to target you instead."

Suppose I am playing on a grid. Let E be enemies without reach/ranged weapons. M be the spaces a large mount occupies. And R be the space I occupy while riding the mount.

$ \begin{array}{|l|l|r|} \hline \text{E} & \ \hline \text{E} & \text{M} & \text{R}\ \hline \text{E} & \text{M} & \text{M} \ \hline \end{array} $

What happens when I redirect an attack with mounted combatant but I am outside the reach of their weapon on a grid?

When using a reach weapon, which squares around me can I attack?

Considering a medium creature, with 5ft of reach, wielding a reach weapon such as a longspear.

By the rules:

With a typical reach weapon, you can strike opponents 10 feet away, but you can’t strike adjacent foes (those within 5 feet).

Squares within 5 feet would be all adjacent squares to the creature, including diagonal ones (first diagonal being counted at 5ft).

It appears clear that the weapon will allow attacks into four squares: those 5ft away from the creature in the north, east, south and west directions. They are 2 squares away in a straight line, thus 10ft away, within reach.

But now, what about the squares diagonally away, beyond 5ft, north-east, south-east, south-west and north-west of the creature? According to the rules, the second square of a diagonal line is considered 15ft away when it comes to movement. Does this also apply to attack distances?

Also, what about squares reachable by going diagonally once, then straight up/down/left/right? This would usually count at 10ft of movement, so are they attackable?

Here’s a diagram:

??x?? ?...? x.C.x ?...? ??x?? 

C is the creature, dots are where I assume you cannot attack, Xs are where I assume you can attack and question marks are where I’m not sure you can.

EDIT:

The Case of the Missing AOO

I’ve come across an interesting point on the Paizo forums. If you are in one of the far corners and you consider these not threatened, then you can diagonally move towards the character and never provoke an AOO (that is, per RAW)… and yet, logically, a threatened area should make an uninterrupted circle around the creature. This may explain why 3.5 made an exception out of this.

Mounted Combatant: How does reach of attack interact with the feat’s deflection?

I was playing a campaign, and my DM attacked the mount. Imagine this is the battlefield (seen from above); I was on the C, my mount is large (A), and the monster is M:

# # # # # # # # # # A C # # # # # A A # # # # M # # # # # # # # # # # 

When I said “I deflect the attack to me,” the DM said “But the foe does not reach you, which means you can’t pull the attack to yourself.” That got me thinking. I’m wanting to know how this works in this situation.