If the Phantom Steed spell ends because the steed takes damage, do you still have 1 minute to dismount?

The spell states:

When the spell ends, the steed gradually fades, giving the rider 1 minute to dismount. The spell ends if you use an action to dismiss it or if the steed takes any damage.

So, if the steed takes damage, does it still last for 1 minute, or does the spell end automatically if it takes damage?

How do I create a query which takes certain time to execute?

I have configured `statement_timeout=1000` in Postgres DB

I am accessing a DB table using a JDBC driver from a java application. JDBC driver will throw an exception if the statement times out. I have a logic that will get executed if the exception is thrown.

Now I want to test this functionality, is there a way to make a query not return the result within `1000` millsecs?

Does a PF2e spellcaster who takes multiclass dedications into other spellcasting classes, and related spellcasting feats, gain more spell slots?

Ezren is a level 10 evocation wizard, and hence would have spell slots of the following levels:

``+-------------+-----------------+ | Spell level | Number of slots | +-------------+-----------------+ |           1 |               4 | |           2 |               4 | |           3 |               4 | |           4 |               4 | |           5 |               4 | +-------------+-----------------+ ``

However, at level 2 Ezren took the Sorcerer multiclass dedication. At level 4 he took Basic Sorcerer Spellcasting, and Bloodline Breadth at level 8.

How many spell slots does Ezren have in a given day? Is it:

``+-------------+-----------------+ | Spell level | Number of slots | +-------------+-----------------+ |           1 |               6 | |           2 |               6 | |           3 |               6 | |           4 |               4 | |           5 |               4 | +-------------+-----------------+ ``

Because at level 8, spellcasting archetype feats grant an additional spell slot of first, second and third level, AND the bloodline breadth feat increases each of these by one?

Or do these sources of spell slots not stack for some reason? Coming from fifth edition, a wizard who multiclasses sorcerer still has the same number of spell slots as a pure wizard, so I’d like to clarify my understanding here.

What is damage you do vs. damage a creature takes? (and Dark One’s Blessing)

The Warlock ability Dark One’s Blessing says (emphasis mine)

Starting at 1st level, when you reduce a hostile creature to 0 hit points, you gain temporary hit points equal to your Charisma modifier + your warlock level (minimum of 1).

Is there a general ruling on who or what is the author of damage? Most spells and attacks are written to describe how the target takes damage, rather than how the attacker does damage. I think it is safe to assume that an attack you make or a spell you cast is you doing damage, but I am unsure on how to rule in a more abstract example, such as forcing an interaction with a damaging environment.

Consider the following hypotheticals. None of them are my specific question, but serve to illustrate what I am trying to come to terms with. My question is whether there is a general underlying principle in the game that assigns authorship to damage.

For example, suppose oil has been spread on the floor and a hostile creature chooses to cross it. My warlock throws a lit torch into the oil and the DM requires an attack roll. The subsequent fire reduces the creature to 0hp. Does the warlock get to use Dark One’s Blessing?

Suppose the same warlock lights a nearby patch of oil on the floor and the DM does not require an attack roll. A hostile creature later chooses to enter the burning oil and is reduced to 0hp. Does the warlock get to use the ability? Did he reduce the creature to 0hp, or did the fire? Does it matter that the creature chose to enter the fire through its own movement – if the warlock had been able to use a spell or action to force the movement, would the answer be different?

Finally, consider three warlocks who all have initiative before a target. One throws a flask of oil on the floor, one throws a torch that ignites the oil, and one uses a shove attack to move a hostile creature into the space where the flaming oil is / will be. Which warlock(s) get to use Dark One’s Blessing? Does their order matter? That is, is it a different answer if the shove moves the creature to the space where the oil will be, vs. to a space where the flame already is?

Possibly related: If my familiar is forced through my action to drop a rock while over a target, is it considered an attack?

Can an Arcane Trickster or Eldritch Knight who takes the Magic Initiate? [duplicate]

Can an Arcane Trickster or Eldritch Knight who takes the Magic Initiate (Wizard) feat cast the first level spell they pick with their spell slots, like a Bard who took Magic Initiate (Bard) can? Or the Wizard for that matter?

Both AT and EK uses the wizard spell list, so one could assume so, but can they?

This question have not been directly answered when it comes to Arcane Trickster or Eldritch Knight, so please do not close my question, the problem is if it counts for AT and EK.

I repeat, this specifik question needs to be clearly answered 🙂

Can an Arcane Trickster or Eldritch Knight who takes the Magic Initiate (Wizard) feat cast the first level spell they pick with their spell slots? [duplicate]

Can an Arcane Trickster or Eldritch Knight who takes the Magic Initiate (Wizard) feat cast the first level spell they pick with their spell slots, like a Bard who took Magic Initiate (Bard) can? Or the Wizard for that matter?

Both AT and EK uses the wizard spell list, so one could assume so, but can they?

I can verify solutions to my problem in polynomial time, how would a non-deterministic algorithm arrive to a solution if it always takes \$2^n\$ bits?

Decision Problem: Given integers as inputs for $$K$$ and $$M$$. Is the sum of $$2^k$$ + $$M$$ a $$prime$$?

Verifier

``m = int(input('Enter integer for M: ')) sum_of_2**K+M=int(input('enter the sum of 2^k+m: '))  if AKS.sum_of_2**K+M == True:    # Powers of 2 can be verified in O(N) time   # make sure there is all 0-bits after the 1st ONE-bit      # Use difference to verify problem    if sum_of_2**K+M - (M) is a power_of_2:     OUTPUT Solution Verified ``

The powers of 2 have approximately $$2^n$$ digits. Consider $$2^k$$ where $$K$$ = 100000. Compare the amount of digits in $$K$$ to the amount of digits in it’s solution! Also take note that the powers of 2 have $$2^n$$ bits as its 0-bit Unary essentially for the exponent $$n$$.

Question

How would a non-deterministic machine solve this problem in polynomial time?

A player rolls four 20-sided dice, takes the lowest value, ignores the rest. What is the probability of this value at least 7?

I’m designing a tabletop game, and I need to figure out how to calculate a few probabilities:

1. Roll 3 20-sided dice, take the highest value. What is the probability of it being 7 or higher? 15 or higher?
1. Roll 4 20-sided dice, take the highest value. What is the probability of it being 7 or higher? 15 or higher?
1. Roll 3 20-sided dice, take the lowest value. What is the probability of it being 7 or higher? 15 or higher?
1. Roll 4 20-sided dice, take the lowest value. What is the probability of it being 7 or higher? 15 or higher?

How can I do this? Could you explain to me how this works, or even better – give me a simple formula?

Solving symoblic system of non-linear equations takes too long

I am trying to solve a set of system of symbolic non-linear equations:

``g1 = ptz + pz + 2 pty q0 q1 - 2 ptz q1^2 + 2 px q0 q2 - 2 pz q2^2 -     2 px q1 q3 - 2 pty q2 q3 - 2 ptz q3^2 - 2 pz q3^2 ; g2 = 2 (ptx q0 q1 + px q0 q1 + ptz q1 q2 - pz q1 q2 + ptz q0 q3 +       pz q0 q3 - ptx q2 q3 + px q2 q3); g3 = ptx + px - 2 ptx q1^2 - 2 px q1^2 - 2 pz q0 q2 - 2 pty q1 q2 -     2 px q2^2 - 2 pty q0 q3 - 2 pz q1 q3 - 2 ptx q3^2 ; g4 = -2 pty q0 q2 - 2 py q0 q2 + 2 ptz q1 q2 - 2 pz q1 q2 -     2 ptz q0 q3 - 2 pz q0 q3 - 2 pty q1 q3 + 2 py q1 q3 ; g5 = ptz + pz - 2 py q0 q1 - 2 pz q1^2 - 2 ptx q0 q2 - 2 ptz q2^2 -     2 ptx q1 q3 - 2 py q2 q3 - 2 ptz q3^2 - 2 pz q3^2 ; g6 = -pty - py - 2 pz q0 q1 + 2 py q1^2 + 2 ptx q1 q2 + 2 pty q2^2 +     2 py q2^2 - 2 ptx q0 q3 + 2 pz q2 q3 + 2 pty q3^2 ; g7 = q0^2 + q1^2 + q2^2 + q3^2;  NSolve[{g1 == 0, g2 == 0, g3 == 0, g4 == 0, g5 == 0, g6 == 0,    g7 == 1}, {q0, q1, q2, q3}, Reals] ``

Here all variables except q0, q1, q2 and q3 are considered fixed. The variables represent a unit quaternion. Testing for corner cases (by setting single element of quaternion to 0) reveals that these set of equations don’t have a solution, which is what I intend to prove. But the code takes too long to run. Any suggestions would be appreciated.

I could treat the elements of quaternion and the permutations of the elements as separate variable and solve the system as Linear Equations, which I did for the corner cases. But here I don’t have enough constraints (10 unknowns with 7 constraints) and hence can’t employ that method.

RAW, when using the Abjuration Wizard’s Projected Ward, who takes “any remaining damage”?

The Abjuration Wizard’s 2nd level ability Arcane Ward reads:

Starting at 2nd level, you can weave magic around yourself for protection. When you cast an abjuration spell of 1st level or higher, you can simultaneously use a strand of the spell’s magic to create a magical ward on yourself that lasts until you finish a long rest.

In the context of this ability, the wizard is the "warded creature", obviously.

The 6th level ability, Projected Ward, reads:

Starting at 6th level, when a creature that you can see within 30 feet of you takes damage, you can use your reaction to cause your Arcane Ward to absorb that damage. If this damage reduces the ward to 0 hit points, the warded creature takes any remaining damage.

To use Projected Ward, you must already have your Arcane Ward active, thus before using your reaction, you are definitely "the warded creature". In the description for Projected Ward, it says you are using "your ward", as in the ward that is warding you, to absorb the damage.

In the context of this ability who is the "warded creature", the wizard or the creature who took the damage that triggered the reaction?

The RAI seems obvious here, but I would prefer a RAW focused ruling.