Legendary Resistance (3/Day). If the dragon fails a saving throw, it can choose to succeed instead.
Spellcasting. The bookwyrm is a 15th-level spellcaster. Its spellcasting ability is Intelligence (spell save DC 20, +12 to hit with spell attacks). The bookwyrm has the following wizard spells prepared:
Cantrips (at will): dancing lights, prestidigitation
1st level (4 slots): comprehend languages, detect magic, expeditious retreat, identify, magic missile
2nd level (3 slots): darkness, hold person, misty step, locate object
3rd level (3 slots): dispel magic, haste, tongues, counterspell
4th level (3 slots): arcane eye, greater invisibility, private sanctum, hallucinatory terrain
5th level (2 slots): legend lore, scrying
6th level (1 slot): true seeing
7th level (1 slot): reverse gravity
8th level (1slot): maze
Multiattack. The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws.
Bite. Melee Weapon Attack: +10 to hit, reach 10 ft., one target. Hit: 18 (2d10 + 5) piercing damage.
Claw. Melee Weapon Attack: +10 to hit, reach 5 ft., one target. Hit: 14 (2d6 + 5) slashing damage.
Tail. Melee Weapon Attack: +10 to hit, reach 15 ft., one target. Hit: 16 (2d8 + 5) bludgeoning damage.
Frightful Presence. Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a DC 17 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours.
Psychic Breath. The dragon exhales lightning in a 90- foot line that is 5 feet wide. Each creature in that line must make a DC 19 Intelligence saving throw, taking 66 (12d10) psychic damage on a failed save, or half as much damage on a successful one. A creature that fails the saving throw is then stunned until the end of their next turn.
The dragon can take 3 legendary actions, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature's turn. The dragon regains spent legendary actions at the start of its turn.
Detect. The dragon makes a Wisdom (Perception) check.
Tail Attack. The dragon makes a tail attack.
love the pun on bookworm, but could you add a picture or description of what it looks like so that i can add it to my campaign?