The Kingdom of Harmony (Sonic: Adventures in Equestria)

The Kingdom of Harmony is the 26th episode of Season 4 of Sonic: Adventures in Equestria, and a reimagining of the Season 4 MLP: FiM Two Parter, Twilight's Kingdom.

Summary
Lord Tirek escapes from Tartarus and plans on draining all of Equestria of its' magic, Celestia enlists Discord to go stop him, but when Eggman teams up with Tirek in order to finally take down Sonic, Celestia, Luna and Cadance may have to give their power to the Mane Six in order to save everyone.

Differences

 * Discord doesn't betray his friends to join Tirek, though he ends up getting his magic drained much eariler due to this.
 * Since Applejack, Rarity, Pinkie Pie, Fluttershy and Rainbow Dash are also alicorns in this timeline, they join Twilight in keeping Celestia, Luna and Cadance's magic safe.
 * Applebloom, Scootaloo, Sweetie Bell, Nyx, Snowdrop, Shining Armor, Flash Sentry, Big Mac, Sunset Shimmer and Trixie Lulamoon end up joining Spike and Discord when Tirek suggests a trade following his battle with the Mane Six, in addition, Celestia, Luna and Cadance are never sent to Tartarus.

Transcript
To be added...

Recap
"Last time on Sonic Adventures in Equestria, the Mane Six began to wonder if they even have a purpose as princesses since their role in Equestria is still unclear, though these thoughts would have to be put on hold when Celestia and Luna discover that the villain Lord Tirek has escaped from Tartarus and is now draining magic from the citizens to make himself more powerful, Cadance suggested they send the Mane Six after him, but Celestia sended Discord instead due due to his ability to sense magical imbalances caused by Tirek's activity, while Discord brags to Team Sonic and the Mane Six about his mission, Tirek arrived at Eggman's lair, though in a effort to save his life, Eggman offered to join Tirek as his chief henchman, after Tails reminds them about the chest that appeared after they returned the Elements to the Tree of Harmony, the Mane Six and the others tried desperately to open the chest but their attempts, some funnier than others, failed miserably, meanwhile, Discord confronted Tirek who teased him with having freedom over friendship, though tempted to go back to his old ways, Discord ultimately decided not to betray his friends' trust, unfortunatly, Tirek revealed that he aqquired the Alicorn Amulet from Eggman and drained Discord of his magic, though the Chaotix were able to get him out of his predicament before anything else happened, meanwhile, Twilight's friends remember how they were challenged in regards to their core Element of Harmony, and were able to help another, receiving an item in return. They gather these items, which transform into five of the six keys needed to open the box, though since Twilight hasn't faced a challenge similar to theirs yet, she can't provide the last key, the question on how they're gonna get the last key is interrupted when they're called back to Canterlot, where they finally realize that not only has Tirek taken Discord's magic, but Eggman is helping him as well, knowing that he'll go after alicorn magic once he's powerful enough, the princesses plan to rid themselves of their magic before Tirek gets the chance to steal it, will the princesses' plan work, and or will Tirek prevail, find out next on Sonic Adventures in Equestria."

Trivia

 * Dr. Eggman replaces Discord as the ally Tirek betrays later on, though Eggman purposely joined Tirek in order to finally destroy Sonic, even going as far as to give him the Alicorn Amulet.
 * The Alicorn Amulet, which was seen on Magic Duel and Three's a Crowd, returns here, this time used by Tirek until he drains Discord's magic, where it's destroyed for good.