Complex sentence: Gemerl is Dr. Eggman's henchman for the most part of the game until he betrays him in the final battle and is later reprogrammed by Tails to be friends with Cream and her mom, in an allusion to Sonic Battle.
Split into simpler sentences: Gemerl is Dr. Eggman's henchman, until he betrays him in the final battle. He is later reprogrammed by Tails to be friends with Cream and her mom, in an allusion to Sonic Battle.