Quarterstaff, legendary (requires attunement by a Wizard)
You gain a +2 bonus to attack and damage rolls with this magic weapon. While you hold it, your spell attack bonus and save DC increase by 1. In addition, you can use it as a spellcasting focus for your wizard spells.
You can cast the following spells using your spell save DC and Spellcasting ability: Silence, Counterspell, Bestow Curse, Mislead, and Power Word Stun. Each spell can be cast once a day, and cannot be used until the next dawn.
Arcane Battery. When you successfully counterspell a spell with the use of the staff, and store that spell in this staff. You can cast that spell once, using your spellcasting ability and spell save DC as a 9th level spell. This effect expires after 24 hours, at which point the spell is lost. Instead of casting the spell, you can instead copy it to your spellbook, expending the normal GP cost and time requirement.