Source: Dungeon Master's Guide

Staff, Rarity Varies (Requires Attunement by a Spellcaster)

Bound into this staff is a spell of level 8 or lower. The spell is determined when the staff is created and can be of any school of magic. The staff has 6 charges and regains 1d6 expended charges daily at dawn. While holding the staff, you can expend 1 charge to cast its spell. If you expend the staff’s last charge, roll 1d20. On a 1, the staff loses its properties and becomes a nonmagical Quarterstaff.

The level of the spell bound into the staff determines the spell’s saving throw DC and attack bonus, as well as the staff’s rarity, as shown in the following table.

Spell Level Rarity Save DC Attack Bonus
Cantrip Uncommon 13 +5
1 Uncommon 13 +5
2 Rare 13 +5
3 Rare 15 +7
4 Very Rare 15 +7
5 Very Rare 17 +9
6 Legendary 17 +9
7 Legendary 18 +10
8 Legendary 18 +10