Using slot and application to variable length vector

I have a list of 2D coordinates with a maximum length of 3, e.g.

peakdatAB {{1007.81, 8.64842}, {1008.38, 8.19264}} 

I need to generate something like this

({PointSize[0.01], Blue, Point[#1], Red, Point[#2], Black, Point[#3]}) & @@ peakdatAB 

but here the problem is the variable length of peakdatAB as when there is say no third point, it returns an error. How can I fix this?

What is a spell slot in-lore, and how does it justify the limits on casting spells?

Spell slots are something that we, as players, expend when we want our spellcasting PCs to cast a spell. It is a resource to limit how many powerful spells we can cast in a day. But for our characters in-game, they don’t exist. So what are they?

The best way I can think of to illustrate my question is via an example involving a Kenku.

Background

I was going to ask the question “Can a (non-spellcaster) Kenku cast a Verbal-component-only spell that they have heard a spellcaster cast via Mimicry?” I knew the answer would be that they can’t, but I was wondering what the in-game justification is for this.

Out-of-game, the answer is that they do not have the Spellcasting (or Pact Magic) class feature, and therefore do not have spell slots to expend to cast the spell, but that just replaced one question with another; what is a spell slot in-game? Knowing the answer to this would justify why the Kenku perfectly mimicking the Verbal component of a spell doesn’t work in-game.

Comparison

There are other terms we use: HP, AC, XP; these terms do not exist in-game. My PC won’t know what “HP” is. HP has an in-game description, as explained further in this question: What does HP represent?

In short, from the PHB, pg. 196:

Hit points represent a combination of physical and mental durability, the will to live, and luck.

So those are things that my PC might know about and understand; luck, the will to live, etc. They make sense in-game and are something my character could talk about.

What I’ve Looked Up

A Wizard’s Spellcasting class feature (PHB, pg. 114) only describes the mechanics of what a spell slot is to the player (I didn’t check the Spellcasting class feature for all the other classes), and the Spell Slots section (PHB, pg. 201) simply says (regarding flavour):

Manipulating the fabric of magic and channeling its energy into even a simple spell is physically and mentally taxing, and higher-level spells are even more so.

But that doesn’t explain why, say, a Kenku who has learned to mimic a Wizard’s spell’s Verbal components couldn’t cast a spell (without being a spellcaster class themselves; i.e. they have no spell slots).

Sure, it might “tax” them, but surely they’d be able to pull it off at least once that day? Or is it so taxing to even say that specific word or phrase that they wouldn’t actually be able to even finish saying it “without the proper training” (e.g. being a Wizard), and thus cannot “complete” the spell? (NB: This isn’t my question, it’s just included to show my train of thought.)

Question

So what are spell slots in-game? What in-game “thing” do they represent? Is there an in-game justification for why a character who has spell slots can cast a spell in-game, whereas a different character without spell slots could not (even if they can satisfy the spell’s components; i.e. a Kenku perfectly mimicking the Verbal component)?


If the flavour of certain spellcasting classes would influence the answer such that all classes cannot be explained by one explanation (i.e. because Warlocks have Patrons, Sorcerers have “a spark of magic within them”, divine casters have gods or ideals, etc) then this question can just focus on Wizards specifically and what their spell slots mean, since a Wizard’s relationship with magic (i.e. “learning”) is closer to how a Kenku “learns” the Verbal component via mimicry.

Also, I’m not particularly interested in a settings-specific answer, but if a specific setting would influence an answer, let’s assume the Forgotten Realms (as it is the default setting of 5e).

Just to clarify: I don’t think the Kenku should be able to do this (e.g. a level 1 Kenku overhears a high level Wizard cast wish, uh… no), my question is why not from an in-game/lore perspective.

What is the break even point for using a level 1 spell slot for Divine Favor rather than for Divine Smite?

Divine Favor (from a level 1 spell slot) lasts for up to 10 rounds, and on a hit does 1d4 radiant damage.
On a critical hit it adds 2d4 radiant damage.
Divine Smite (from a level 1 spell slot) is good for 1 hit, but does 2d8 radiant damage.
If the hit was critical it does 4d8 radiant damage.

Assumption 1: Combat lasts from 3-6 rounds

Why? a. That’s how long it tends to last with this particular group
b. For a two round fight divine smite is without question the better choice.

Case 1: hit Armor Class 14
Case 2: hit armor class 16

While I can see Divine Favor being a good use of a level 1 slot once the Paladin has two attacks per Attack Action at level 5, I am trying to nail down (in tier 1 play) how many rounds the combat needs to last for Divine Favor to be the better choice for a level one spell slot.

Assumption: the paladin does not fail the concentration save if hit during this combat.

That’s to keep the question with a tight scope, but as I discuss this with my paladin player a separate risk assessment needs to be made vis a vis loss of concentration.

Assumption 3: single class paladin, level 2, 3 or 4.

My back-of-the-napkin-math says “4 rounds” but I may not be setting the problem up correctly.

How many rounds does combat have to last to make divine favor the best choice?

My instinct is that agaisnt one big monster, use divine smite to nova the monster down; against a mob of small creatures use divine favor to whittle down a lot of targets – but that is a separate question/problem.

Do you lose a turn/spell slot when casting a spell on invalid creatures?

Say my Mystic attempts to cast Fear as a 1st level spell on a creature.

1st: When you cast fear as a 1st-level spell, it affects one living creature of CR 4 or lower at close range…

If the DM reveals that the creature is above CR 4 and would be unaffected, does my turn then end with one of my 1st level spell slots being consumed?

As far as I could tell, I couldn’t find any specific rules about this in the spellcasting section of the CRB or elsewhere. I also haven’t played Pathfinder, but this question might apply for that system as well.

Does the “higher level spell slot” clause in Globe of Invulnerability do anything?

The spell “Globe of Invulnerability” says, in part:

Any spell of 5th level or lower cast from outside the barrier can’t affect creatures or objects within it, even if the spell is cast using a higher level spell slot (PHB p.245)

Interpretation 1: For example, Fireball is a level 3 spell, so it doesn’t affect anyone inside a Globe of Invulnerability, even if it’s cast as a level 6 spell.

Then I read the actual rules of the game:

When a spellcaster casts a spell using a slot that is of a higher level than the spell, the spell assumes the higher level for that casting. For instance, if Umara casts magic missile using one of her 2nd-level slots, that magic missile is 2nd level (PHB p.201).

Interpretation 2: Back to the example, Fireball is whatever level slot it’s cast with. Fireball in a level 6 slot is a level 6 spell. Level 6 spells affect someone in a Globe of Invulnerability. Therefore, Fireball cast as a level 6 spell affects someone in a Globe of Invulnerability.

Okay, but then why the heck does the spell say, “even if the spell is cast using a higher level spell slot”? There’s no such thing as a level-5-or-lower spell that’s cast with a level-6-or-higher slot!

I suspect the PHB editors just screwed up with their wording. I suspect that, if I asked a PHB editor what level Fireball was, they’d say “level 3”, not “whatever level slot is used to cast it.” Heck, that’s what I would say. It’s only because of spells like Counterspell, Dispel Magic, and Globe of Invulnerability that I’d pause and say, “Actually, no, 3 is the MINIMUM level slot that can be used to cast Fireball. Per the rule on p. 201, a spell is the level of the slot used to cast it.”

Any other insights on this?

Related questions:

Is a 1st-level spell cast using a 4th-level slot a 1st-level spell, or a 4th-level spell?

Can you use Wish to duplicate a spell at a higher level?

If I multiclass as a warlock and another class, and I get spell slots from that other class, do they count as my highest-level slot or not? [duplicate]

Since warlocks have so few spell slots, they always cast with the highest level spell slot possible. So, if I got spell slots by multiclassing as a sorcerer (or wizard) and I cast a warlock spell using one of those sorcerer (or wizard) slots, would I cast it as the highest level I have (level 3), or would I only be able to cast a spell that slot level, but it would act as if I had used a level 3 spell slot or would I only be able to cast the level the slot is and that’s all? I know this is probably a stupid question but it might just work.

Can you cast racial spells with a spell slot? [duplicate]

Take for instance, a level 5 (standard) tiefling warlock. Would you be able to cast your Darkness and Hellish Rebuke spells with a spell slot? Both spells appear on the warlock spell list and could be taken as known spells by a warlock. But let’s say you didn’t take them as known spells with warlock. You can cast each of them once per day with your Infernal Legacy trait without expending a slot. The trait says (emphasis mine):

Infernal Legacy

You know the thaumaturgy cantrip. When you reach 3rd level, you can cast the hellish rebuke spell as a 2nd-level spell once with this trait and regain the ability to do so when you finish a long rest. When you reach 5th level, you can cast the darkness spell once with this trait and regain the ability to do so when you finish a long rest. Charisma is your spellcasting ability for these spells.

Since it specifically says you can cast it once with this trait are you able to cast it with spell slots without having to take it as one of your spells known as a warlock?

If you have the ability to cast a spell without a spell slot, can you cast that spell using a spell slot?

A 10th level Drow warlock (for instance) has the following Drow Magic racial trait (PHB p. 24), in addition to its warlock spellcasting abilities:

You know the dancing lights cantrip. When you reach 3rd level, you can cast the faerie fire spell once per day. When you reach 5th level, you can also cast the darkness spell once per day. Charisma is your spellcasting ability for these spells.

Can the Drow warlock cast faerie fire (which is not on the warlock spell list) using a warlock spell slot?

Can it cast darkness (which is on the warlock spell list) using a warlock spell slot?


The Sage Advice Compendium says this about the Magic Initiate feat:

If you’re a spellcaster, can you pick your own class when you gain the Magic Initiate feat? Yes, the feat doesn’t say you can’t. For example, if you’re a wizard and gain the Magic Initiate feat, you can choose wizard and thereby learn two more wizard cantrips and another 1st-level wizard spell.

If you have spell slots, can you use them to cast the 1st-level spell you learn with the Magic Initiate feat? Yes, but only if the class you pick for the feat is one of your classes. For example, if you pick sorcerer and you are a sorcerer, the Spellcasting feature for that class tells you that you can use your spell slots to cast the sorcerer spells you know, so you can use your spell slots to cast the 1st-level sorcerer spell you learn from Magic Initiate. Similarly, if you are a wizard and pick that class for the feat, you learn a 1st-level wizard spell, which you could add to your spellbook and subsequently prepare.

But this specifically requires you to pick the feat for one of your classes to be able to cast the spell learnt using your class spell slots, and does not seem directly applicable.

A Warlock can use warlock Pact Magic spell slots to cast spells learnt from levels of another spellcasting class, per the multiclass spellcasting rules (PHB p. 164):

If you have both the Spellcasting class feature and the Pact Magic class feature from the warlock class, you can use the spell slots you gain from the Pact Magic feature to cast spells you know or have prepared from classes with the Spellcasting class feature, and you can use the spell slots you gain from the Spellcasting class feature to cast warlock spells you know.

Similarly, if the warlock has learnt the invocation Mask of Many Faces (PHB p. 112)…

You can cast disguise self at will, without expending a spell slot.

Can the warlock cast disguise self using a spell slot, e.g. to decrease the chance it can be dispelled?