YES - the second attack happens, if the TPK occurs it becomes a cool war story for the players, if it doesnt they also get cool stories and loot
Yes, it prizes the crystals they have and cannot risk their escape.
Right. And after getting within one hit from being killed, why exactly is the dragon motivated to go back into a fight without its full power (legendary saves, in particular)? He’s potentially got a LOT to lose - hundreds of years and massive ambitions.
From a metagame perspective, healing all his hit points looks like enough to give him the edge on a group of PCs missing a member and running low on spells. But how does this appear to the dragon? He heals after a breather, he can expect the PCs to be similarly healed. Their spell output may have observably decreased, but does that definitely mean they’re out of their best spells? They might be severely weakened… but what if he’s wrong? They nearly killed him once in his rash arrogance. A terrible insult… but also a terrible threat!
If it were me running this, I would let the players escape without the dragon attempting to attack. The dragon just got its ass kicked and would've lost badly if it hadn't fled. It wasn't even close - the dragon was at 10hp with two PCs still at full health.
Why would the dragon assume it has a chance attacking immediately afterwards unless you are metagaming as a DM to know that the dragon recovers all its resources while the players don't?
This. Is there someone reason the dragon is so bent on going right back after a party it barely escaped from? It has no way to know they are low on spells, or even that a party member is dead and wasn't just knocked out of the fight, even revivified. Unless they stole its egg or something, that dragon should be giving them a wide berth, IMO.
In case you missed it in my other responses the dragon has been trailing the PCs for few weeks, knows of their exploits, and has an idea of what they are capable of.
If the one PC wasn't killed (which if nothing else the dragon will observe his absence if he discovers the PCs again...), the dragon would wait for more advantage and continue trailing the PCs through the wilderness.
Also, the dragon will change tactics. Believing it was powerful enough to tackle them head-on, and seeing that failed, the dragon will grapple each and fly away with them in turn to repeat how it killed the first PC. Straffing breath weapons will limit the PCs to ranged attacks, which the dragon knows first-hand from the first battle are much weaker and lack range to be a threat.
If the battle by chance somehow is going against it
again, it will flee at half HP this time, and continue to harrass the PCs again and again until it has the crystals. However, each encounter it is likely another PC will fall...
A LOT depends on how the "extra session" we're sneaking in tomorrow night goes. How the players roll stealth (they might just happen to avoid it entirely!), any chance of parley or deal, etc. before it comes to battle.
On top of that, you have unlimited narrative options as the DM. So if you must have a chase, the players could have a chance of finding a terrain feature that helps them. Or maybe they blunder into someplace that an injured dragon wants no part of. Or they run into a character, played by the dead PC's player. Literally anything could happen.
This is the sort of stuff in the OP I am loathe to do. As a DM I don't feel I should bend the game to "rescue" the PCs. I will allow the PCs to make Wisdom (Survival) checks to look for the "best place to hide" and other such things, but where they are in the wild the random chance of another NPC or something happening by is rare at best.
It was said that it wants the magic crystals the party has, and if the party leaves the area, it will probably never find them.
But yeah, I agree that the dragon should be afraid of the PCs at this point, so that's why to me it would make sense for it to at least try to threaten/bargain with the PC before risking a battle. Then it would be up to the PCs to decide whether they want to keep those crystals that much and whether they want to risk fighting the dragon again.
If discovered, this is likely the most hopeful resolution. One PC is dead--payment for their affront to the dragon-- and the dragon gains the crystals, it might consider the encounter a draw.
However, I have been informed by the rogue player he intends to keep one crystal to use as a spellcasting focus.... I hope they don't agree to give the crystals and the dragon discovers this PC kept one back---not good for that PC then!