How should Duergars enlarge power and Squeezing into cramped spaces interact?

The actual RAW rule for the Duergar’s enlarge is:

Enlarge (Recharges after a Short or Long Rest). For 1 minute, the duergar magically increases in size, along with anything it is wearing or carrying. While enlarged, the duergar is Large, doubles its damage dice on Strength-based weapon attacks (included in the attacks), and makes Strength checks and Strength saving throws with advantage. If the duergar lacks the room to become Large, it attains the maximum size possible in the space available.

So, in abbreviated form, I see these effects while enlarged:

  • Status Change: Size is Large.
  • Benefit: For Strength based attacks, double the base weapon damage dice.
  • Benefit: Advantage on Strength checks and Strength save.
  • Special Condition: If not enough room to become Large, becomes maximum possible size instead.

It is this last point, and especially how it interact which with the 3 others, that we are confused about.

Also, here is the rule for cramped spaces:


A creature can squeeze through a space that is large enough for a creature one size smaller than it. Thus, a Large creature can squeeze through a passage that’s only 5 feet wide. While squeezing through a space, a creature must spend 1 extra foot for every foot it moves there, and it has disadvantage on attack rolls and Dexterity saving throws. Attack rolls against the creature have advantage while it’s in the smaller space.

Given the situation as detailed in my question above (i.e. duergar decides to enlarge while in a 1 square wide corridor i.e. a 5 feet wide corridor), what should actually happpens, as per RAW?

[A] There is not enough space for the Duergar to actually enlarge to Large size, so the Duergar remains Medium size. Thus, as a Medium creature, it is not Squeezing into a Smaller space. Also, given that it is not Large, it doesn’t get it’s other Duergar enlargement’s damage and Strength benefits.


[B] The duergar enlarges somewhat to the maximum possible for Medium creatures, becoming noticeably larger but still "barely under" the limit for actually becoming squeezed (kinda like how a Goliath is still a Medium creature but still has a much bigger "build" anyway). But, as there is not enough space for the Duergar to actually truly enlarge to Large size, thus the Duergar remains a Medium size creature. Thus, as a Medium creature, it is not Squeezing into a Smaller space. However, the Duergar still gets all of his other bonuses from his enlargement (weapon damage and strength advantage), because those benefits are dependent upon the activation of the enlargement power, not on the duergar effectivey really becoming Large size.


[C] The duergar enlarges to Large size because it is possible for him to do so anyway: "it attains the maximum size possible in the space available" meaning that it is indeed posssible for a Large creature to exist in a 5-feet wide tunnel, despite the cramped conditions. Thus, the "maximum possible" to exist there is not "Medium", but it is instead "Large + squeezing". Not only does the duergar gets all of his bonuses from being enlarged, but it is also now Squeezing into a smaller space.

So, which is it? DM + players each have their own ideas on how to resolve this, seemingly on opposite ends of the spectrum. We argue the duergar should become squeezed as in [C], thus getting the penalties. Aka "This is really a bad dungeon design for them, all the rooms and corridors where there could be any battle should instead be made to take advantage of their Large size in combat instead". DM is the complete other way as you will see below.

Of course the DM ultimately decides, but we wanted to know what the actually RAW ruling is because a lot more duergars are going to be fought over the next few sessions, we have just entered into a huge dungeon and that dungeon is really seeminggly going to be a big dungeon crawl full of tiny tunnels and tiny rooms, full of duergars all the way to the bottom level.

But it actuallly goes further than even that.

The party is actually good at being fast & sneaky, so the PCs can relatively easily surprise the duergar while they are in a tiny room, to immediately enter the room and position ourselves so that the duergars simply do not have any free 10×10 feet area for them to easily become fully Large size. So, what happens then, when the duergar go into enlargement?

[D] Exactly the same thing as in the 5-feet wide tunnel above (either [A] or [B] or [C]). The PCs are treated as much as "solid obstacles" as the walls are. That is the players’ opinion on things.


[E] As the duergar enlarges, it also automatically pushes away any PCs into nearby empty spaces. The player decides which way he is pushed back (this is not a Shove Action made on purpose, after all), with a Strength Save to try to resist the push (duergar ability DC being 8 + 2 Proficiency + 2 STR = DC 12). If pushed and the only way to be pushed back is right into a hole, the PC falls, with a DC 12 Dex Save allowed to hang onto the ledge. This is a "middle ground" approach we tried to negotiate.


[F] Same as E, however since the enlargement is "magical" in nature, it pushes back so strongly that it is the duergar’s space that always takes priority, forcing PCs to be the ones pushed not only backways but even sideways too. Basically it works EXACTLY like a free multi-target Shove that is always automatically succesfull, without any opposing resisting check. So in other words it is the duergar who chooses which way we get pushed, even to the point of being forced to end up with 2 or more PCs forced into the same space. Thus, not only does the duergar end up with zero penalty for cramped space, but it is the PCs that end up being the ones that are all squeezed up! And if 3 or more PCs are forced into the same space, they get squeezed so much so that they automatically fall Prone, can’t attack at all, and have to Crawl to get out of the "body pile", provoking an Attack of Opportunity in the process. That is the DM’s stance.

The DM retroactively said that that dungeon has lots of small tunnels and rooms on purpose: he actually built that duergar-built "fortress dungeon" fully with "Interpretation F" in mind.

Also, the DM made the duergar enlarge power "free" to use and not an "Action" to use. Basically, duergar can grow enlarged and immediately attack on their same turn. Monster Manual however seems to say otherwise? Anyway, that dungeon is full of very deadly traps that the perma-invisible duergars (they constantly short rest all day long to keep invisible, because you can somehow maintain your Concentration fulll time during a short rest?) just enlarge at exactly the right moment in order to auto-shove us into ridiculous damage traps (up to acid and lava pits and non-lootable vorpal wall blades and also "mordenkainen disjunction" traps), with of course being allowwed to make an attack too (making falling into a pit trap, or taking the trap’s weapon damage a second time "as you get whacked all around inside the swift moving blades of the trap even more", becoming a neear certainty (DM makes the save DC based on the total damage they deal). Basically: Big Ouchie.

While a DM is allowed to run his campaign as he sees fit, he also insists that he is applying the rules "by the book", so… as per RAW, is he really in any way in the right here? Please help?


Can Medium creatures squeeze into smaller spaces?

Here are the rules for “squeezing” from the SRD (the PHB text is identical; emphasis mine):

A creature can squeeze through a space that is large enough for a creature one size smaller than it. Thus, a Large creature can squeeze through a passage that’s only 5 feet wide. While squeezing through a space, a creature must spend 1 extra foot for every foot it moves there, and it has disadvantage on attack rolls and Dexterity saving throws. Attack rolls against the creature have advantage while it’s in the smaller space.

What does this mean for Medium-sized creatures? Small creatures take up the same amount of space in combat as medium creatures (5′ x 5′), so by RAW it would seem that Medium creatures cannot squeeze.

But that doesn’t seem right to me; after all, in real life people often fit into spaces that are 2.5′ or less. Does “large enough for a creature” mean something other than the space occupied in combat?

Does P = NP in Cellular Automata of Hyperbolic Spaces?

I read a few years ago in this book that NP problems are tractable in the space of cellular automata in the hyperbolic plane. What does this mean? Does P = NP according to these books/papers?

Some excerpts from the paper:

It is well known that if we have binary trees at our disposal “for free”, it is possible to solve NP-problems in polynomial time, see [14, 5]. However, it is not immediate to implement binary tree algorithms in the pentagrid, and the goal of this section is to indicate how one can proceed.

From my understanding, the P = NP problem is looking for polynomial-time algorithms to solve complicated problems. From my cursory glance through the books and papers, it seems to suggest that he has solved the problem. What am I missing?

Here is another paper, titled In Some Curved Spaces, We Can Solve NP-Hard Problems in Polynomial Time: Towards Matiyasevich’s Dream.

Can creatures with Air-form/Water-form/Fire-form/Amorphous squeeze into spaces smaller than 1 inch?

There are creatures in DND 5e with abilities that allow them to move into spaces as small as 1-inch without squeezing: Air-Form from Air Elementals, Water-Form from Water Elementals, Fire-Form from Fire Elementals, and Amorphous from Oozes.

Therefore can these creatures move through spaces smaller than 1-inch if they use the rules for squeezing? If so what’s the smallest sized space that they’d be able to squeeze through in your option?

For reference the rules for squeezing are:

Squeezing into a Smaller Space

A creature can squeeze through a space that is large enough for a creature one size smaller than it. Thus, a Large creature can squeeze through a passage that’s only 5 feet wide. While squeezing through a space, a creature must spend 1 extra foot for every foot it moves there, and it has disadvantage on attack rolls and Dexterity saving throws. Attack rolls against the creature have advantage while it’s in the smaller space.

How can this Line-Breaking algorithm consider spaces as having width different than 1.0?

The Divide & Conquer Algorithm for Line-Breaking described here is given below, both in Python and in Dart (which is similar to Java/C#).

Line-breaking is also known as “line wrap”, “word wrap”, or “paragraph formation”, and this algorithm is used for achieving minimum raggedness.

This algorithm works, but it considers each space as having exactly width = 1.0 .

My Question:

How can I modify this algorithm so that it ignores spaces? In other words, make it consider spaces as having width 0.0? (or it would also work for me if I could define any width I wanted for the spaces, including 0.0).

Python Implementation:

def divide(text, width):     words = text.split()     count = len(words)     offsets = [0]     for w in words:         offsets.append(offsets[-1] + len(w))      minima = [0] + [10 ** 20] * count     breaks = [0] * (count + 1)      def cost(i, j):         w = offsets[j] - offsets[i] + j - i - 1         if w > width:             return 10 ** 10         return minima[i] + (width - w) ** 2      def search(i0, j0, i1, j1):         stack = [(i0, j0, i1, j1)]         while stack:             i0, j0, i1, j1 = stack.pop()             if j0 < j1:                 j = (j0 + j1) // 2                 for i in range(i0, i1):                     c = cost(i, j)                     if c <= minima[j]:                         minima[j] = c                         breaks[j] = i                 stack.append((breaks[j], j+1, i1, j1))                 stack.append((i0, j0, breaks[j]+1, j))      n = count + 1     i = 0     offset = 0     while True:         r = min(n, 2 ** (i + 1))         edge = 2 ** i + offset         search(0 + offset, edge, edge, r + offset)         x = minima[r - 1 + offset]         for j in range(2 ** i, r - 1):             y = cost(j + offset, r - 1 + offset)             if y <= x:                 n -= j                 i = 0                 offset += j                 break         else:             if r == n:                 break             i = i + 1      lines = []     j = count     while j > 0:         i = breaks[j]         lines.append(' '.join(words[i:j]))         j = i     lines.reverse()     return lines 

Dart implementation:

class MinimumRaggedness {    /// Given some [boxWidths], break it into the smallest possible number   /// of lines such as each line has width not larger than [maxWidth].   /// It also minimizes the difference between width of each line,   /// achieving a "balanced" result.   /// Spacing between boxes is 1.0.   static List<List<int>> divide(List<num> boxWidths, num maxWidth) {      int count = boxWidths.length;     List<num> offsets = [0];      for (num boxWidth in boxWidths) {       offsets.add(offsets.last + min(boxWidth, maxWidth));     }      List<num> minimum = [0]..addAll(List<num>.filled(count, 9223372036854775807));     List<int> breaks = List<int>.filled(count + 1, 0);      num cost(int i, int j) {       num width = offsets[j] - offsets[i] + j - i - 1;       if (width > maxWidth)         return 9223372036854775806;       else         return minimum[i] + pow(maxWidth - width, 2);     }      void search(int i0, int j0, int i1, int j1) {       Queue<List<int>> stack = Queue()..add([i0, j0, i1, j1]);        while (stack.isNotEmpty) {         List<int> info = stack.removeLast();         i0 = info[0];         j0 = info[1];         i1 = info[2];         j1 = info[3];          if (j0 < j1) {           int j = (j0 + j1) ~/ 2;            for (int i = i0; i < i1; i++) {             num c = cost(i, j);             if (c <= minimum[j]) {               minimum[j] = c;               breaks[j] = i;             }           }            stack.add([breaks[j], j + 1, i1, j1]);           stack.add([i0, j0, breaks[j] + 1, j]);         }       }     }      int n = count + 1;     int i = 0;     int offset = 0;      while (true) {       int r = min(n, pow(2, i + 1));       int edge = pow(2, i) + offset;       search(0 + offset, edge, edge, r + offset);       num x = minimum[r - 1 + offset];        bool flag = true;       for (int j = pow(2, i); j < r - 1; j++) {         num y = cost(j + offset, r - 1 + offset);         if (y <= x) {           n -= j;           i = 0;           offset += j;           flag = false;           break;         }       }        if (flag) {         if (r == n) break;         i = i + 1;       }     }      int j = count;      List<List<int>> indexes = [];      while (j > 0) {       int i = breaks[j];       indexes.add(List<int>.generate(j - i, (index) => index + i));       j = i;     }      return indexes.reversed.toList();   } } 

How in command “Reformat Code” of PhpStorm use only spaces?

In my vue page PhpStorm 2019.2.3 with eslint used
Running command "Reformat Code" I got error in my app:

./src/views/About.vue Module Error (from ./node_modules/eslint-loader/index.js): error: Mixed spaces and tabs (no-mixed-spaces-and-tabs) at src/views/About.vue:177:2: 
Code (markup):

Looks like this command use tab symbol for ident spaces and I did not find to to make that command "Reformat Code"
will use only spaces?
I found these

But I do not any option…

How in command "Reformat Code" of PhpStorm use only spaces?

How to get enclosed spaces from a series of connected nodes

I have a bunch of connected walls in a list and the data for them is like so:

Wall {    Node A;    Node B; }  Node  {     float x;     float y;  } 

I want to find the rooms from the connected walls as an array of connected points to represent each room’s perimeter.

This is an example visually of what i am trying to find: enter image description here

The red dots are the nodes, and the lines are the walls, the numbers are the identified rooms that the walls created.

The walls can be at any angle, not sure if that matters though.

I am wondering what algorithms exist that can help me solve this problem, what is the best way to approach this?

How to protect network equipment in public spaces?

I’m curious whether there are standards or recommended best practices to protect network equipment that has to be left unattended and outside (of a secure data-center environment) for example for scientific research?

The assumption here is that even a primitive station would have network equipment (at least a switch/router) that connects to the device taking measurement but also communicates the data back via mobile networks / VPN.

As the equipment obviously has value it is of course at risk of being stolen or even being vandalized. If there is a sophisticated attacker the person might also try to intrude the researchers networks.

Is there best practices or frameworks to follow for this scenario to assess the risk and potential counter measures?

New links in Sharepoint containing spaces include %2520

When I create new links on our Intranet Sharepoint page, if the target file has spaces in it then after the link is created the final result for something like File name becomes File%2520Name. Old links are still using the standard %20 method and work fine. These new links however, are broken. From what I read, %25 is a % so somewhere, Sharepoint is randomly seeing an additional one of those? My steps for adding a new link to a file are: Edit page > Insert > Link > From address. I put in the full file path and precede it with file:// and the end result is a file path with %2520. My only “fix” for this so far has been to rename files to remove the spaces. Any thoughts?