Life Tap

3rd-level Necromancy
Casting Time: 1 bonus action
Range: Self
Components: VSM (a ritual weapon)
Duration: Instantaneous

You convert your own life essence into mana. As a part of casting the spell, you may inflict an amount of necrotic damage on yourself up to your Constitution score. Your hit point maximum is reduced by an amount equal to the necrotic damage taken. You immediately gain mana equal to the necrotic damage you took. This damage ignores resistance and immunity, and The reduction lasts until you finish a long rest.
You may cast a second spell on any turn you use life tap, but only if that spell is a cantrip, or if the spell deals fire, necrotic, psychic, or shadow damage, or inflicts the Charmed or Frightened condition. The DM may allow other spells of suitably dark purposes to be cast after it, but they are the final arbiter on qualifying spells.

Source: Homebrew