Book of Shadows (5e Equipment)
From D&D Wiki
Wondrous item, very rare (requires attunement)
A worn and yellowed codex. Its pages are filled with complicated glyphs and sigils. This book has 3 charges, and regains 1d2 expended charges daily at dawn. As a bonus action, you may expend 1 charge, surrounding yourself with a translucent bubble of energy; until the start of your next turn, you are immune to magical damage. If you expend the final charge, roll 1d20; on a 1, this book crumbles to dust.