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?

does interaction with a magic neckless count as action in combet

I’m playing in Curse of Strahd model, and there is an item named holy symbol of ravenkind. This item hides behind the paladin character shirt. When the paladin have the sword and shield ready to battle and want to take out the HSOR necklace, does he need to sheathe or drop his sword before he can pull the necklace out? I tried to consult with this spellcasting in combat clarifications and restrictions article but it got me more confused. And if you need to sheathe the sword, does it take 2 action to draw it? example: 1st turn sheathe the sword 2nd turn pull the necklace and use it 3ed turn wear the necklace on the neck and draw the sword 4th turn attack with the sword this is how my DM said it should be, considering the necklace as an item like a sword.

Does Flesh to Stone count the first saving throw?

Flesh to Stone states:

You attempt to turn one creature that you can see within range into stone. If the target’s body is made of flesh, the creature must make a Constitution saving throw. On a failed save, it is restrained as its flesh begins to harden. On a successful save, the creature isn’t affected.

A creature restrained by this spell must make another Constitution saving throw at the end of each of its turns. If it successfully saves against this spell three times, the spell ends. If it fails its saves three times, it is turned to stone and subjected to the petrified condition for the duration.

My reading of this is that the initial save against the spell counts as one of the failed saves so if the target failed an additional two saves it would be petrified. Is this correct or is the correct interpretation that the target must fail three of the subsequent saves to be petrified?

Does playing magical music count as casting a spell?

So in DnD 5e, my bard character happened upon some fragments of a musical composition. When my character tried playing it, it caused some sonic-charged magical effect.

My question is–specifically in the context of conditions like Invisibility where when casting a spell or making an attack drops the Invisibility–does playing this particular piece of music, that happens to have a magical effect, count as casting a spell or making an attack?

i want to count the number of occurrences of certain values of my TagName column

i want to count the number of occurrences of different sensor rows in SQL, but i seem to be doing it wrong and seemingly i am not visualizing it correctly.

if i was doing this in pseudocode in a c style language i would do it like this:

FOR i in range(taglist[i]):          print(taglist[i], count(taglist[i]) ) 

i have been trying this:

Select Count(a) FROM (     SELECT Distinct [TagName]          FROM [A2ALMDB].[dbo].[AlarmMaster]         where (TagName like '%Sensor%' or GroupName like'%Sensors%')     ) a 

it returns ’66’, but i want it to return the count of each of the distinct tagnames that are returned in Select A.

Can anyone help me with how i should be trying to get all the counts of my different sensor occurrences to total instead of a count of all the distinct tagnames?

thanks for the help!

Does casting a Subtle Spell count as surprising a target if target does not know you are caster?

I understand you can’t Sneak Attack with spells, something to do that both abilities scale thus game breaking. So that takes away one aspect of my predicament. However the Assassinate ability still gives Advantage over lower initiative targets, and according to Can an Assassin use Assassinate with ranged spell attacks?, an assassin with surprise will auto-crit with a spell.

If you have the Subtle Spell metamagic, can you still Auto-Crit with a spell attack after the start of the encounter if the target doesn’t know you’re a spellcaster? Does casting a Subtle Spell count as surprising a target if target does not know you are spellcaster?

For example: as an Assassin 3/Sorcerer 3, at start of encounter I shoot a target with a light crossbow and Hex spell, dealing 1d8+2 damage. Target has yet to see if I or any of my allies is caster. Next round I use Chill Touch at same target. Do I auto-crit and roll 2d8 cold damage +2d6?

Is there a better way of displaying ‘Count’ of records beside other columns in a select query?

I have a table with below structure :

Test1(c_num  number ,c_first_name varchar2(50), c_last_name varchar2(50)) 

1)There is a normal index on c_num column.

2)The table has nearly 5 million records.

I have a procedure as you can see below. I want to display the Count(*) along with other columns.I want to know if there are better ways of doing this so that we can have better performance.

create or replace procedure get_members(o_result out sys_refcursor)    is begin  open o_result for   select c_num,          c_first_name,          c_last_name,          (select count(*) from test1) members_cnt -->Is there a better way instead of doing this?   from test1;  end; 

Thanks in advance

How do I DM for this group when we can’t handle a large group properly, but also can’t count on any smaller group all attending?

I just concluded an online game with my players. (We played 5E, but I want to move to Dungeon World.) I started with four players, and that has since grown to around ten people wanting to play, which is a problem as even with only six players I’ve started getting comments about there being too little time spread around to too many people.

I’ve tried a few approaches to help mitigate this, but every time I try playing with a smaller group, I run into the same problem: someone in the smaller party can’t make it.

This means running for the active party is that much harder because so much more of the party is gone, and the inactive players start wanting to play because they actually showed up on time ready to play. But there are enough of them that if I find a narrative reason someone else can come along, they all try to take it, and grumble about having to stay in town (or wherever) for no reason if they don’t get it.

How do I DM for this group when we can’t handle a large group properly, but also can’t count on any smaller group all attending?

Count Unique Subsequences to Destination?

I am looking at this post:

Jamie is walking along a number line that starts at point 0 and ends at point n. She can move either one step to the left or one step to the right of her current location , with the exception that she cannot move left from point 0 or right from point n.

In other words, if Jamie is standing at point i,she can move to either i-1 or i+1 as long as her destination exists in the inclusive range [0,n]. She has a string, s, of movement instruction consisting of the letters l and r, where l is an instruction to move one step left and r is an instruction to move one step right. Jamie followed the instructions in s one by one and in order. For example if s=‘rrlr’, she performs the following sequence of moves: one step right ->one step right ->one step left -> one step right. Jamie wants to move from point x to point y following some subsequence of string s instruction and wonders how many distinct possible subsequence of string s will get her from point x to point y. Recall that a subsequence of a string is obtained by deleting zero or more characters from string.

It has four parameters

  • A String , s giving a sequence of moves using the characters l( i.e. move left one unit ) and r (i.e. move right one unit)
  • An integer n, denoting the length of the number line.
  • An integer x, denoting Jamie’s starting point on the number line
  • An integer y , denoting Jamie’s ending point on the number line.

The function must return an integer denoting the total number of distinct subsequence of strings that will lead Jamie from point x to point y as this value can be quite large.

Sample Input rrlrlr




output = 7

Let’s add few more constraints to simply the questions:

  • 1 <= length of s <= 10^3
  • 0 <= x, y < n <= 2500

I wonder what the runtime is for the proposed solution there:

int distinctSequences (int n, int a, int b, const std::string& actions) {     std::unordered_map<int, int> readyForR, readyForL;     auto res{0};      if (a > 0) {         readyForL.emplace(a, 1);     }      if (a < n) {         readyForR.emplace(a, 1);     }      std::unordered_map<int, int> nextReadyForR, nextReadyForL;      for (auto c: actions) {         nextReadyForR.clear();         nextReadyForL.clear();          if (c == 'r') {             for (auto [pos, count]: readyForR) {                 auto pp1{pos+1};                                  nextReadyForR.emplace(pp1, count);                 readyForL[pp1] += count;                  if (pp1 == b) res += count;             }              nextReadyForR.erase(n);             std::swap(readyForR, nextReadyForR);         } else {             for (auto [pos, count]: readyForL) {                 auto pm1{pos-1};                                  nextReadyForL.emplace(pm1, count);                 readyForR[pm1] += count;                  if (pm1 == b) res += count;             }              nextReadyForL.erase(0);             std::swap(readyForL, nextReadyForL);         }     }      return res; } 

What’s its runtime complexity?