To reach Lysandre Café, fly to the central Pokémon Center and cross Magenta Plaza. It's a well-known Team Flare hangout, so it's a good place to start looking for their secret base. Be sure to stock up on supplies before heading inside; there's sure to be some tough opposition ahead!
Take on the two Team Flare Grunts to learn of a secret door somewhere in the building. After defeating the two, you learn the door's password: "open sesame". Examine the china cabinet at the far wall to recite the password. The cabinet slides away, revealing the entrance to Lysandre Labs.
After he storms off, take a look around his lab. There are two types of floor panels; spin panels send you spinning until you hit a wall, and warp panels teleport you around the building. Head west to reach the first warp panel, which leads to the northwest corner. The first of the team's four scientists, Aliana, has been waiting here for you.
Afterwards, she moves away, giving you access to the next two warp panels. Take the green panel to warp to the southwest corner, then head north over spin panels and past a second Grunt to enter the northwest office.
The Defenders of Kalos are here, searching for a very tall person that Team Flare is also hunting for, but they can't reveal any more than that. However, they hand over five Revives to help you out.
Take the spin panels southward to reach the western room.
In the break room, a Grunt mistakes you for a comrade and gives you TM12 (Taunt). Grab the Revive and take a rest in one of the beds, if needed.
Head northeast, battling three more Grunts on the way, and step inside the northeast room.
Enter the northeast room to battle two more scientists, Celosia then Bryony.
Afterwards, they reveal more of Team Flare's plan. The group is using the electricity stolen from the Power Plant to fuel the ultimate weapon, but that's not all. They also plan to use the large stones on Route 10 to siphon additional power from Pokémon near Geosenge Town. Those stones mark the graves of Pokémon that perished when the ultimate weapon was unleashed 3,000 years ago, and the group is planning for the same thing to happen again!
There are three spinner panels to the south. Take the westernmost one to a warp panel in the southwest, near the elevator. This leads you to the northeast corner; grab the Black Glasses and fight off the Grunt to reach the next warp panel. This one leads to the north-central room, which holds a Rare Candy and research materials that detail Kalos' dark past and Lysandre's own history. The reports on the table read:
"When I was young, I went on a journey around Kalos with my Pokémon. I reached out to help those suffering because they had nothing. At first, they were grateful, but eventually, they began to take my help for granted and demand more and more... Will fools like those people consume the Kalos region? This world is stable and secure. So the population of people and Pokémon continues to increase unabated. But there is a limit to the amount of money and energy the world is capable of producing. Either everything is lost, or only a handful are saved. This is something best not left to man... I must use a tool of higher power..."
Return to the three south-facing spinner panels and take the easternmost one. Take the nearest warp to detour for a Hyper Potion, then continue southward. Battle the Grunt in the southeast corner, and take the warp panel here. Go northeast to reach the eastern room.
Inside, you meet the fourth scientist, Mable. Win this battle to finally obtain the Elevator Key!
Make your way back to the elevator, and ride down to B2F.
Go west down the long hallway to find Lysandre and his prisoner, the mysterious traveler from Route 13. Lysandre reveals the man's name, AZ, and the prisoner recounts a tale of sorrow and loss that sheds more light on the events that rocked Kalos three thousand years ago. He pleads with you to reclaim the key to the ultimate weapon from Lysandre, who leaves for the elevator, asking that you follow him to B3F.
Go north to find Lysandre talking with a fifth scientist, a man named Xerosic. Lysandre asks that you battle Xerosic to prove yourself as the "chosen one"; if you are victorious, he claims that the group will abandon their scheme.
Xerosic is impressed by your talent, and asks you to press one of the two colored buttons behind him. He tells you that one button will activate the ultimate weapon while the other will disable it. Lysandre promised that Team Flare would abandon their objective if you choose correctly, but Xerosic has other plans. The red button reawakens the weapon outright; the blue button does nothing, but Xerosic uses a remote control to reawaken it anyway. A short cut-scene shows the weapon emerging from deep underground, and Xerosic excitedly says that the poisonous flower has bloomed in Geosenge Town. Fly back there in a hurry!
The once-quiet Geosenge Town has been completely transformed by the ultimate weapon's reappearance. Many buildings have been ruined, with only the Pokémon Center, Hotel Marine Snow, and a couple of homes still intact.
Team Flare's secret headquarters are located on the northwest edge of the town. To get there, you must first defeat the single Grunt outside. Serena/Calem catches up to you near the hideout's entrance, and insists on going with you.
At last, you have reached Team Flare's secret headquarters. Now you can stop Lysandre and his band of zealots from activating the ultimate weapon. Time is short though, as the weapon will soon have all the power it needs to be unleashed!
Afterwards, Serena/Calem suggests searching for the legendary Pokémon. Take the northwest door to explore the rest of the area. If you approach the window behind Lysandre, you can catch a glimpse of the legendary Pokémon far below, being drained of its life force to power the ultimate weapon.
The headquarters is filled with Grunts and high-ranking Admins. As you race to the basement, you must defeat several pairs of Team Flare fanatics. You're not alone though, as Serena/Calem battles by your side. Her/His team consists of Meowstic at level 45, Absol at level 46, Eevee's evolved form at level 46, and third-stage starter Pokémon at level 49. About halfway through the hallway, a friendly voice calls out to you; Shauna followed the two of you inside and wants to help out. When you reach the basement door, you find it sealed with a high-tech electronic lock. But this is no problem for Shauna, as Clemont happened to give her a device for figuring out puzzles. The device quickly unlocks the door, so hurry inside!
Team Flare makes its last stand in the dark basement chamber where the legendary Pokémon is being held. Shauna and Serena/Calem lure a few of the Admins away, leaving you to take out the rest one by one. Doing so rescues the legendary Pokémon from the brink of oblivion, but it must still be caught before it will join you.
XerneasX is the first legendary Fairy-type Pokémon to be discovered. Its Ability, Fairy Aura, gives a power boost to all Fairy attacks. This includes its Moonblast move, an already-powerful attack that may lower the target's Special Attack. Its signature move, Geomancy, sharply increases its Special Attack, Special Defense, and Speed on the second turn. Use Poison and Steel moves to wear it down quickly, then follow up with Bug, Dark, and Fighting moves to weaken it further.
Once it's caught, you may choose to swap out a party member for it. Soon after, Shauna and Serena/Calem reappear, followed by Lysandre. He intends to reclaim the legendary Pokémon's power for the ultimate weapon, and challenges you to one final battle. This time, he is also able to use Mega Evolution!
Lysandre tells you that when the legendary Pokémon awakened, it reclaimed much of its energy that had been sent to the ultimate weapon. The weapon has little power left, but there's still enough to use it once! The weapon activates, firing into the sky a massive ball of energy, which then comes crashing back down. It destroys the weapon, causing it to fall back underground, leaving a giant crater in its wake. The Secret HQ and its entrance are also destroyed.
After fleeing the Secret HQ, Shauna and Serena/Calem meet you back at the crater. Trevor, Tierno, and the MaskedHeroes are also present. Following a short briefing, the group leaves for Anistar City. Before you can follow, AZ appears. He speaks a bit more about the king and his eternal Pokémon, and finally reveals that he is the former king that built the ultimate weapon.
As you leave the city, you receive another Holo Clip, this time from Sycamore. He wants to talk face-to-face, and asks you to meet him in Couriway Town.