This is how Twilight vs. the Overlord goes in My Little Pony Transformers Prime: Twilight's Kingdom.
[We see Twilight practicing her magic]
Twilight Sparkle: I can do this.
Twilight Sparkle: See! Ha! Perfectly controlled teleportation–
[Twilight teleports to outside]
Twilight Sparkle: [growls]
The Overlord: Princess Twilight!
Twilight Sparkle: [gasps] The Overlord!
The Overlord: You have something that belongs to me!
[Twilight flies past the Overlord very fast, impressing him. Twilight glares at him]
The Overlord: You're going to give me what I want.
[The Overlord prepares to suck out the Alicorn Magic from Twilight when Twilight flies away]
[Twilight arrives at the Golden Oak Library and uses the telescope to see the Overlord. The Overlord spots her and fires a beam at her location. Twilight grabs Owlicious and gets out of the library as the beam hits it, destroying it. Twilight looks on in horror at the sight before letting Owlicious fly away and getting into a rage and flies at the Overlord and fires a big beam of Magic at him. The Overlord creates a shield around him and gets pushed back by the blast. The Overlord gets up and glares at Twilight, who lands near him]
The Overlord: Now I understand what your fellow princesses have done.
[They get into a fight showing equally matched strength, speed, and agility]
The Overlord: It appears we are at an impasse. How about a trade, Princess Twilight?
[The Overlord brings out Twilight's friends, the Princesses, and Autobots]
The Overlord: Their release for all the Alicorn magic in Equestria.
Twilight Sparkle: [gasps]
Princess Celestia: Twilight!
Princess Luna: You can't!
Princess Cadance: You mustn't!
The Overlord: What's it going to be, Princess?
[Twilight looks at her friends]
Rainbow Dash: Don't do it, Twilight!
Fluttershy: We aren't worth it!
Ratchet: Listen to them.
Discord: Oh, but you are, Fluttershy. You're the pony that taught me that friendship is magic. I had magic and friendship and now I don't.
The Overlord: Enough! I want an answer, and I want it now!
[Twilight finally makes a decision]
Twilight Sparkle: I will give you my magic, in exchange for my friends.
[Twilight's friends, the Princesses, and the Autobots gasp]
The Overlord: As you wish.
[The Overlord releases them]
The Overlord: Your turn.
[The Overlord sucks out Twilight's magic with winged hands]
The Overlord: Yes. Yes!
[The Overlord finishes sucking out her magic and becomes stronger]
Spike: Twilight, why did you do that?
Twilight Sparkle: It was for your own safety.
Discord: The Overlord tricked into believing that he could offer me something more valuable than friendship. But there is nothing worth more. I see that now. He lied when he said that this medallion was given as a sign of gratitude and loyalty. But when I say that it is a sign of our true friendship, I am telling the truth.
[Discord hangs his head down and puts the medallion around Twilight's neck]