9th-level transmutation (sangromancy)

Casting Time: 1 reaction, which you take when a celestial, elemental, fey, fiend, or undead within range that you can see is reduced to 0 hit points
Range: 300 feet
Components: V, S, M (the skull of a humanoid encrusted in gems worth at least 1,000 gp, which the spell consumes) 
Duration: Instantaneous

As part of casting this spell, you must expend nine hit dice or the spell automatically fails. If you do, roll the expended hit dice and note the total as your “mortal hit points,” then the creature who triggered this spell by being reduced to 0 hp immediately dies. If it would normally return to its native plane at 0 hp, it is destroyed instead. Change your creature type to that of the dead creature.

Whilst changed, you are immune to poison and disease; no longer need to eat, drink, or breathe; resistant to nonmagical damage; and gain a benefit dependent on your new creature type:

Celestial. You have resistance to radiant and necrotic damage and gain a fly speed of 60 feet.

Elemental. You have resistance to acid, cold, fire, lightning, and thunder damage.

Fey. You can use a bonus action on each of your turns to turn invisible until the start of your next turn or teleport up to 60 feet in any direction.

Fiend. You have resistance to cold and fire damage and gain a fly speed of 60 feet.

Undead. You are immune to necrotic damage and being charmed or frightened.

Your creature type is retained until you cast the spell again, immediately ending its effects, or you take damage that reduces you to 0 hp, wherein your creature type returns to normal and your hp to the number noted as your mortal hit points.

Spell Lists. Warlock