What if levitate’s load is exceeded after it’s cast?

What happens if you are a spellcaster and you use the levitate spell to float up somewhere, but your load suddenly increases over the levitate spell’s weight limit? Such as by grabbing onto another person, prying a large object off a ceiling, or picking up a really heavy cookie jar?

Target: you or one willing creature or one object (total weight up to 100 lb/level)

The target in this case is “You” the caster, but your total effective weight/carrying capacity suddenly increases, while midair, within the duration of the spell.

“You fall” might be the simplest answer, but the spell does not actually detail that. It’s description goes into detail on horizontal movement, and attacking while floating, but merely says the target must be Willing or unattended to maneuver up or down.

Can a sorcerer use the Quickened Spell metamagic option to cast cantrips?

Considering that in higher levels, cantrips deal more damage than L2 spells (especially if you dip 2 levels of Warlock, with EB + Hex + Agonizing Blast), I’m wondering whether it’s more efficient for an (MC) Sorcerer to use L2 Slots to power Quickened (EB) cantrips.

The Quickened Spell metamagic option says:

When you cast a spell that has a casting time of 1 action, you can spend 2 sorcery points to change the casting time to 1 bonus action for this casting.

The idea would be to Quicken EB a few times (or in a big fight, until you run out of SP), and at the end of the fight (or during, if needed), convert L2 slots to more SP. Since you keep these until a long rest, you can basically stock up in SP in between fights.

Can a sorcerer use the Quickened Spell metamagic option to cast cantrips?

Como chama a função cast() do banco de dados no método ORDER de um banco de dados numa expressão LINQ em C# C#?

Eu tenho um campo que armazena DATETIME no meu banco de dados. Porém eu preciso ignorar a hora desse campo na quando eu for ordenar por ele. O seguinte código faz a minha busca:

public virtual async Task<(List<TModel>, int)> FindAsync(IQueryable<TModel> query, int pageNumber = 1, int pageSize = 20, string[] sortExpression = null, Expression<Func<TModel, object>> includes = null)     {         query = Includes(includes, query);         query = SetFilterAll(query);          var count = await query.CountAsync();         query = Sort(sortExpression, query);         query = Pagination(pageNumber, pageSize, query);         return (await query.ToListAsync(), count);     } 

Gostaria de mandar no parâmetro sortExpresion algo como, CAST(meu_campo_date AS DATE) Para que no final executasse o um SQL semelhante a esse:

SELECT * FROM MinhaTabela ORDER BY CAST(meu_campo_date AS DATE) DESC 

Is it possible to cast multiple spells per turn?

Never had an issue with spellcaster scaling until today. A player in the group claims he can cast Eldrich Blast twice on his turn. Once as an action, and a second time as a bonus action since it is a cantrip. Allowing him to shoot 4 beams for a d10 each (he’s 5th level so 2 beams per cast). This seems vastly stronger than anyone else’s max 2 attacks. After the session which ended early with many players angry this player ruined all encounters, there was much talk of re-rolling into all caster party. One wanting to do the same with a wizards Firebolt spell as a bonus every turn, others still browsing.

So, is it possible for a caster to cast multiple spells in 1 turn? From what I was quoted from the PHB, it’s possible to cast any spell as an action, then cast a second spell; as long as the bonus action spell was a cantrip with a cast time of 1 action? So 99% of all cantrips? Please tell me this is wrong, because I feel that if anyone else does this our melee characters will never see a fight again before the casters nuke them down.

Can you use two wands to cast one spell?

Basically, in the May 2019 Artificer UA (Unearthed Arcana: the Artificer Returns), the Artificer got two mutually-exclusive ways to enhance a non-magical wand to improve the spells it casts: the Wand Prototype level 6 class feature of the Artillerist subclass (which lets you add your Int bonus to damage for one cantrip), and the Enhanced Wand Infusion, which grants you a +1 bonus to spell attack rolls.

Is it possible to “dual wield” wands so that you can benefit from both of these bonuses at the same time?

PHP to cast votes on an open-to-public election

I am creating an online voting platform where users could vote on publicly-held polls. It uses Kreait Firebase library (as Google didn’t create a PHP library for Firebase Admin).

I am very new to PHP and am not sure about how I should format my PHP code. It is messy. Please help me improve the code.

<?php  $  request = json_decode(file_get_contents("php://input"));  if (!isset($  request->pollPath) || !isset($  request->votes)) {   print_r($  request);   echo "pollPath and/or votes have not been sent!";   exit; }  require __DIR__.'/../vendor/autoload.php';  use Kreait\Firebase\Factory; use Kreait\Firebase\ServiceAccount;  $  pollPath = $  request->pollPath; $  votes = $  request->votes;  $  serviceAccount = ServiceAccount::fromJsonFile(__DIR__.'/../service.credentials.json'); $  firebase = (new Factory)   ->withServiceAccount($  serviceAccount)   ->asUser('brokerServer')   ->create();  $  pollsDatabase = $  firebase->getDatabase(); $  electionRef = $  pollsDatabase->getReference('publicPolls/' . $  request->pollPath);  $  postsRef = $  electionRef->getChild('posts'); $  postsCount = $  postsRef->getSnapshot()->numChildren();  if ($  postsCount != count($  request->votes)) {   echo "Array of votes doesn't match the election's position count";   exit; }  $  votesRef = $  electionRef->getChild('votes'); $  electionVotes = $  votesRef->getValue();  if (!isset($  electionVotes))   $  electionVotes = [];  $  postsValue = $  postsRef->getValue(); for ($  i = 0; $  i  < $  postsCount; $  i++) {   $  postValue = &$  postsValue[$  i];   $  postVotes = &$  electionVotes[$  i];    if (!isset($  postVotes)) {     $  postVotes = [];     $  postCands = count($  postValue['candidates']);      for ($  j = 0; $  j < $  postCands; $  j++)       $  postVotes[$  postValue['candidates'][$  j]] = 0;   }    if (isset($  request->votes[$  i]))     $  postVotes[$  request->votes[$  i]] += 1; }  $  votesRef->set($  electionVotes); print_r($  electionVotes); echo "done"; 

The code basically gets a JSON fetch request from the client with the path of the election (in Firebase) and an array of votes (mapping index of positions in election to the candidates chosen).

Can you cast 2 spells at the same time?

This question is prompted by both Sage Advice and this similar Pathfinder question. Let’s use the scenario from Sage Advice:

Can you cast a reaction spell on your turn?

You sure can!

Here’s a common way for it to happen: Cornelius the wizard is casting fireball on his turn, and his foe casts counterspell on him. Cornelius also has counterspell prepared, so he uses his reaction to cast it and break his foe’s counterspell before it can stop fireball.

In this case, it seems as though Cornelius would be casting 2 spells at the same time – Fireball; and (before Fireball is complete) Counterspell.

The order of events alluded to by Sage Advice would be:

  • Cornelius begins casting Fireball
  • Cornelius’ opponent begins casting Counterspell
  • Cornelius casts Counterspell, preventing his opponent’s spell
  • Cornelius finishes casting Fireball
  • There is much fire

So far as I’ve been able to tell, it seems that the example given in Sage Advice would result in Cornelius essentially casting Fireball and Counterspell simultaneously.

By extension of the same mechanic, a caster could cast Shield in response to an Opportunity Attack by an opponent with the Mage Slayer feat. A Warlock could use Hellish Rebuke in the same circumstance.

This doesn’t seem correct, at first glance, as it means that a caster would be able to do multiple complex somatic components, or to incant arbitrarily many verbal components simultaneously.

This seems strange enough that it may be that the Sage Advice column has overlooked a rule preventing this. Alternatively, they may have just skipped an implicit “but you give up the fireball by doing this, of course”.

In short, can a character effectively and successfully cast two spells at the same time?

Is it possible for a swallowed caster to cast Fireball outside of a Giant Toad?

I had a situation last week where my DM and I completely disagreed how the following situation should have been ruled:

I’m a Circle of the Moon druid wild-shaped into a Giant toad and I had swallowed a mage. The Swallow attack description says

“(…) The swallowed target is blinded and restrained, it has total cover against attacks and other effects outside the toad, (…)” (Giant toad, MM.)

But on the mage’s turn he was able to cast Fireball at a point of his choice outside the Giant Toad, because Fireball’s bright streak came from the Giant Toad’s belly, exited the mouth, and struck a point outside the toad.

In broad terms, can a blinded caster choose a point outside of the Toad? And can a caster with total cover (in this case) target a point outside of the Giant Toad?

I’ve read the rules, especially regarding total cover and in fact it doesn’t say anything about a person with total cover attacking someone who couldn’t attack him because the cover. I would like to know if really it is possible for it to happen by RAW or RAI, because for me in this case total cover for those inside the Toad implies anyone outside it also has total cover, and vice versa.

Can Contingency be used with a spell cast from an Ioun Stone?

Contingency says:

Choose a spell of 5th level or lower that you can cast, that has a casting time of 1 action, and that can target you. You cast that spell–called the contingent spell–as part of casting contingency, expending spell slots for both, but the contingent spell does not come into effect.

Would one be able to use a spell that is cast from a Reserve Ioun Stone as the contingent spell?

For example: A bard casts revivify into the Reserve Ioun Stone and gives it to the wizard who then uses contingency along with the stored revivify to create an effect that would revive him upon falling unconscious. The wizard cannot cast revivify normally.

Would this work?

My specific concerns are:

  1. Does having the spell stored in such a way count as a spell “you can cast”?
  2. Does the fact that the spell is stored in an item mean that it can’t be cast as part of another spell as contingency requires?
  3. Is there any other reason why this would not work?