Staff of the magi

The staff of the magi was a powerful magical artifact.

Description
Generally, a staff of the magi was a long wooden staff encased in iron and inscribed with magical sigils and runes.

Powers
This staff can be wielded as a magic quarterstaff that grants a +2 bonus to attack and damage rolls made with it. While you hold it, you gain a +2 bonus to spell attack rolls.

The staff has 50 charges for the following properties. It regains 4d6 + 2 expended charges daily at dawn. If you expend the last charge, roll a d20. On a 20, the staff regains 1d12 + 1 charges.

Spell Absorption. While holding the staff, you have advantage on saving throws against spells. In addition, you can use your reaction when another creature casts a spell that targets only you. If you do, the staff absorbs the magic of the spell, canceling its effect and gaining a number of charges equal to the absorbed spell's level. However, if doing so brings the staff's total number of charges above 50, the staff explodes as if you activated its retributive strike (see below).

Spells. While holding the staff, you can use an action to expend some of its charges to cast one of the following spells from it, using your spell save DC and spellcasting ability:  conjure elemental  (7 charges),  dispel magic  (3 charges),  fireball  (7th-level version, 7 charges),  flaming sphere  (2 charges),  ice storm  (4 charges),  invisibility  (2 charges),  knock  (2 charges),  lightning bolt  (7th-level version, 7 charges),  passwall  (5 charges),  plane shift  (7 charges),  telekinesis  (5 charges),  wall of fire  (4 charges), or  web  (2 charges).

You can also use an action to cast one of the following spells from the staff without using any charges:  arcane lock ,  detect magic ,  enlarge/reduce ,  light ,  mage hand, or  protection from evil and good.

Retributive Strike. You can use an action to break the staff over your knee or against a solid surface, performing a retributive strike. The staff is destroyed and releases its remaining magic in an explosion that expands to fill a 30-foot-radius sphere centered on it.

You have a 50 percent chance to instantly travel to a random plane of existence, avoiding the explosion. If you fail to avoid the effect, you take force damage equal to 16 × the number of charges in the staff. Every other creature in the area must make a DC 17 Dexterity saving throw. On a failed save, a creature takes an amount of damage based on how far away it is from the point of origin, as shown in the following table. On a successful save, a creature takes half as much damage.

Notes: Bonus: Magic, Bonus: Spell Attacks, Advantage: Saving Throws, Sorcerer, Warlock, or Wizard, Damage, Control, Detection, Combat, Deception, Warding

Notable owners

 * Anastra Syluné Silverhand: One of the Seven Sisters; died after breaking her staff of the magi to protect the Twisted Tower.
 * Hoch Miraz: A wizard from Calimshan, believed to have sunk to his doom off the coast of Gundarlun with a staff of the magi in his possession.
 * Larloch: Former Sorcerer-King of Jiksidur.
 * Prismal the Outrageous: A wizard in Raven's Bluff.
 * Rhangaun: A lich and senior member of the Twisted Rune.
 * Sammaster: Former Chosen of Mystra and founder of the Cult of the Dragon
 * Ulraunt: Keeper of the Tomes at Candlekeep; reputedly owned a staff with the same powers as a staff of the magi and more.
 * Catti-brie