Magic Resistance. The Mad Mage has advantage on saving throws against spells and other magical effects.
Spellcasting. The mad mage is an 18th-level spellcaster. His spellcasting ability is Intelligence (spell save DC 17, +9 to hit with spell attacks). He can cast disguise self and invisibility at will and has the following wizard spells prepared:
Cantrips (at will): fire bolt, light, mage hand, prestidigitation, shocking grasp
1st level (4 slots): detect magic, mage armor, magic missile, shield
2nd level (3 slots): mirror image, misty step, web
3rd level (3 slots): counterspell, fly, lightning bolt
4th level (3 slots): Mordenkainen's faithful hound, polymorph, stoneskin
5th level (3 slots): Bigby's hand, cone of cold, scrying
6th level (1 slot): true seeing
7th level (1 slot): Mordenkainen's magnificent mansion
8th level (1 slot): mind blank
9th level (1 slot): time stop
Dagger. Melee or Ranged Weapon Attack: +6 to hit, reach 5 ft. or range 20/60 ft., one target. Hit:4 (1d4 + 2) piercing damage.