The sleep spell description (PHB, page 276) says to roll 5d8 to determine the total HP of creatures that can be affected, starting from the lowest hit points. Undead and creatures immune to charm are not affected by this spell.
Assuming I have a human wizard with 20 health, a zombie rat with 5 health, and a sleep spell roll of 20 hitting both. Does the undead rat's health pool interact with the total sleep pool, thus saving the wizard from sleep, or is the word "affected" meant to include both the spell is unaffected along with immune subjects?
I already understand the undead rat will not be put to sleep either way. I just wish to be clear if the undead would put a buffer of sleep hp of the wizard or not.
By comparison, the spell color spray with similar mechanics goes out of its way to say you ignore targets that already can't see. Whereas sleep only states ignore unconscious.