How much does someone absorb from the Sleep spell if they can't be put to sleep? [duplicate]

How much would someone absorb from the sleep spell if they can't be put to sleep? The spell states

This spell sends creatures into a magical slumber. Roll 5d8; the total is how many hit points of creatures this spell can affect. Creatures within 20 feet of a point you choose within range are affected in ascending order of their current hit points (ignoring unconscious creatures).

Starting with the creature that has the lowest current hit points, each creature affected by this spell falls unconscious until the spell ends. [...] Subtract each creature's hit points from the total before moving on to the creature with the next lowest hit points. A creature's hit points must be equal to or less than the remaining total for that creature to be affected.

So what happens if an elf or a warlock with Aspect of the Moon (both are immune to magical sleep but not directly to the spell itself) is in the targeted area?

Would it:

A. Treat them like they don't exist

B. Subtract their HP and then move on, leaving them awake or

C. Let them absorb the full effect of the spell as regardless of their HP they can't be put to sleep

B seems the most likely but I feel like I've seen C ruled before in a game. A would also make some sense as well.

marked as duplicate by NautArch dnd-5e StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Oct 8 at 18:41

• Please let me know if you don't agree this is a dupe and what is different so that we can clarify and reopen if necessary. – NautArch Oct 8 at 18:41
• @NautArch I think the dupe is rpg.stackexchange.com/questions/110747/… not rpg.stackexchange.com/questions/110752/…? He asks about targets immune to sleep but NOT the spell itself (so it's not the undead question). This matters because the accepted answers conflict on whether A or B is the correct option (of the OPs list) – Steven Jackson Oct 8 at 18:43
• I can understand this being called a dupe but the other two are distinctly different I'd say. My issue is more to do with being immune to the sleep effect, not to the spell like someone who is undead or can't be charmed. – Himitsu_no_Yami Oct 8 at 18:53

The mechanics of "sleep immunity" means that you are unaffected by the sleep spell. This means A is correct. You do not factor them into the equation as all and ignore them entirely.

That said, there may be a difference between "immune to sleep" and "cannot be put to sleep", and the rules as written doesn't define the latter to be different than the former.

The answer below mine (which was tragically downvoted instead of discussed) brings up another question where they were treated as different effects. They answered that the spell would still affect the [half-]elf and drain HP from the payload but the sleep effect would not work, whereas immunity would bypass the payload subtraction altogether.

To me, it sounds like the DM would need to make an executive decision as to which is they way they wish to play, and be consistent from that point forward.

B is correct

Here is how the spell should read:

1. Caster casts sleep and rolls (5d8, or more if upspelled).
2. All creatures within 20 feet of the spells target "reveal" their current hit points.
3. Starting with the creature with the lowest current hit points, they are subject to the effect of the sleep spell.

So as an example say the caster rolled a total of 20. There are 2 nearby kobolds with 7 and 10 hp, and your elf-buddy with 8. The lowest hp is kobold 1 with 7 hp. 7 hp are removed from the total leaving 13 points. That kobold is now subject to sleep. Having no resistances, they fall over.

Next up is the elf with 8. 8 points are removed from the total (so 5 left) but the elf can't be affected so remains standing.

Finally, kobold 2. There are only 5 points left, but kobold 2 has 10--More than the remaining points so they too are not effected.

The key is, Subtract each creature's hit points from the total before moving on to the creature with the next lowest hit points." There is no mention of whether or not the spell worked. Just that the points are deducted and then the spell moves on to the next victim.