How long do the temporary HP gained from the Aberrant Dragonmark feat last?

The Aberrant Dragonmark feat states:

You learn that spell and can cast it through your mark. Once you cast it, you must finish a short or long rest before you can cast it again through the mark. Constitution is your spellcasting ability for these spells. When you cast the 1st-level spell through your mark, you can expend one of your Hit Dice and roll it. If you roll an even number, you gain a number of temporary hit points equal to the number rolled.

How long do those HP last?

Is it possible to uniformly shuffle N items into a deque of size N where you can only modify the first or last elements?

I had a question about random shuffling. Given a sorted list, is it possible to design an algorithm to return a uniformly random arrangement of the items in a deque with the following operations:

  • read from list and add to front of deque
  • read from list and add to back of deque
  • remove from front of deque and add to back
  • remove from back of deque and add to front

I am trying to figure out an algorithm to do this without the aid of any other arrays or memory (i.e. outside of the original list of size N and the deque, there is no additional memory). After experimenting with it, I’m doubting it’s possible to obtain a truly uniformly random arrangement of the items, but I’d love to be proven wrong. Any guidance would be appreciated.

How to find the size of gaps between entries in an array so that the first and last element of the array is filled and the gaps are all of equal size?

I have an array a of n entries. I need to place a token on the first and last position of that array, so a[0] = 1 and a[n-1] = 1.

I now want to place additional tokens into that array with a distance inbetween each index i where a[i] = 1 that is greater than 2 (so placing a token on every index is invalid as well as alternating using and not using an entry is invalid). Phrazed differently: I want that sum(a) < n/2 . The gap inbetween each token should be the same, so say with an array of size 16,

a[0] = 1, a[3] = 1, a[6] = 1, a[9] = 1, a[12] = 1, a[15] = 1

would be a solution with a gap size of 2 (distance of 3).

How do I find all gap sizes that are possible to fill said array with the given constraints?

Imagine a street inbetween two crossroads where a lamppost should be placed on each crossroad and then additional lampposts should be placed equidistant to each other and for some reason only natural number distances are allowed.

(The actual problem I want to solve is where to place Sea Lanterns in my Minecraft Project so do not disregard this problem as an assignment question I want a solution for.)

Returning random integer from interval based on last result and a seed

Suppose we have an interval of integers [a, b]. I would like to have a function that returns random members from within the interval, without repetitions. Once that all members within the interval are explored, the function would start to return the same first random sequence again, in the same order.

Example: a=1, b=5

3, 1, 4, 5, 2, 3, 1, 4, 5, 2, 3, 1, 4, 5, 2, ... 

This would be easy to achieve by shuffling an array of all elements between a and b, and repeating it once the array is finished. However, this would take too much memory space, and this is not suitable for my case (I might have millions of elements).

Instead, the function I’d like to have would be more or less like this:

f(a, b, n, seed) -> n+1 


a - start of interval b - end of interval n - last element returned from list seed - self-explanatory n+1 - next random element from list, calculated by using the seed and the last element returned (n) 

The trick is knowing some way to get a non-repeated number from the interval based only on the element returned before and the seed. In the end, it would behave like a circular list randomized at its initialization, but without using memory space.

Why does a round last 6 seconds? [closed]

There are many posts and discussions about what can be achieved during one round, however, to the best of my knowledge there is no explanation as to how/why the number 6 was decided.

The question becomes more interesting considering that all of the RPGs I have played so far also consider each round to last 6 seconds.

I think it’s worth breaking this question into smaller ones:

  1. Who invented the 6-seconds round rule? Is it Gary Gygax?
  2. Why 6 seconds? For example, why not 5 or 7 seconds. In particular, 5 looks nicer and "rounder" to me.
  3. Are there any RPGs in which rounds last shorter or longer? Do they offer any explanation as to why?
  4. Does the game break if you change round duration? Let’s say that I make a house rule that rounds last 5 seconds. What’s going to happen?

p.s.1. I’m not sure which tags are most appropriate here. Please, feel free to suggest any for adding or removing.

p.s.2. I’m taking D&D as the baseline and assuming that all RPGs use the 6-seconds rule, this is why I’ve tagged the post with the dungeons-and-dragons tag.

How many rounds does a spell with a duration of 1 minute last?

If a concentration spell lasts for one minute (60 seconds, 10 rounds), when does one start counting down how much time it has left? Does the round you cast it in count towards how long it stays active?

First example, what if I use Aura of Vitality, which uses an action to cast then a bonus action can be taken to heal a target? The spell lasts for 1 minute, or 10 rounds. So on the turn I cast it I can use a bonus action to immediately use it, then do I get 9 more rounds or 10 more?

What about spells like Moonbeam, which don’t take effect on your turn? Moonbeam activates when a creature enters it or starts its turn there. If you’re first to go in a round then you’ll get 10 uses out of it, but if you’re last does that mean you only now get 9 uses out of it since it acts during an opponents turn?

What does the last single quote of the sql injection query: ‘ or “1”=”1″ ‘ mean

I couldn’t fully grasp why the last single quote of the sql query: ' or "1"="1" ' is necessary. So I understand the part until the last single quote ‘. The first single quote enables to inject the sql and the or "1"="1" part enables the query to always return true. However, I don’t understand why the last single quote is necessary to inject the sql.

Why does the Eberron: Rising from the Last War bestiary include standard spell descriptions in action lists?

In Chapter 6: Friends and Foes, many of the creatures with spell lists include the note “(see ‘Actions’ below)” on a single spell. Often this is a cantrip, but the Undying Councilor has this note for a 5th level spell. When I first saw this I assumed that the creature would modify the spell in some way, but text given in Actions always appears to line up with the standard description of the spell and the normal spell attack bonus or spell save DC of the creature.

Why are these spells explicitly written out in the stat block? Especially in the case of monsters with multiple offensive spells (some of which are higher powered than the called-out cantrip), what should I as the GM take from this?