Legendary Resistance (3/Day). If the dragon fails a saving throw, it can choose to succeed instead. Sand Walk. The dragon can move across sand without needing to make an ability check. Additionally, difficult terrain composed of sand doesn't cost it extra movement.
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: +12 to hit, reach 10ft., one target. Hit: 18 (2d10 + 7) piercing damage. Claw. Melee Weapon Attack: +12 to hit, reach 5ft., one target. Hit: 14 (2d6 + 7) slashing damage. Tail. Melee Weapon Attack: +12 to hit, reach 15ft., one target. Hit: 16 (2d8 + 7) 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 19 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 it, the creature is immune to the dragon's Frightful Presence for the next 24 hours. Sand Breath (Recharge 5-6). The dragon exhales blinding hot sand in a 60-foot line that is 5 feet wide. Each creature in that line must make a DC 18 Dexterity saving throw. On a failed save the creature is blinded and takes 55 (11d10) piercing damage. On a successful save the creature takes half as much damage and is not blinded. A blind creature can repeat the save at the end of each of its turns, ending the blindness on a success.
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. Wing Attack (Costs 2 Actions). The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a DC 20 Dexterity saving throw or take 14 (2d6 + 7) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed.