'Legends of Tomorrow': How "Here I Go Again" Pays Homage to 'Star Trek: The Next Generation'

Tonight's Legends of Tomorrow brought a pretty eclectic array of things, balancing heartbreaking moments and new arrivals with jokes about hedgehogs and intergalactic erotica. And along the way, the episode provided a pretty unique homage to an installment of Star Trek: The Next Generation.

Spoilers for tonight's Legends of Tomorrow, "Here I Go Again", below!

Tonight's episode largely focused on Zari Tomaz (Tala Ashe), the only member of the team to not be stuck in an hour-long time loop, which would culminate each time in the Waverider getting blown to smithereens.

Does that sound familiar? For those familiar with the world of Trek, it just might, as "Here I Go Again" draws some inspiration from "Cause and Effect", the eighteenth episode of TNG's fifth season. In that episode, the Enterprise crew is caught in a "temporal causality loop" that's a few hours long, as the team scrambles to learn of the loop and prevent their own death each time. The Legends episode even calls back to its predecessor in a way, with Ray Palmer/The Atom (Brandon Routh) referencing "Cause and Effect" when approached about the time loop situation.

So, how exactly does tonight's Legends call back to "Cause and Effect"? For the most part, the proof is in the plot details, some of which carry over from both episodes.

Both episodes follow the teams needing to stop an explosion, the causes of which are somewhat of a mystery for both "Here I Go Again" and "Cause and Effect". Both episodes follow fan-favorite female characters (Legends' Zari and TNG's Beverly Crusher) beginning to pick up on the time loop, and resorting to creative means to try to investigate it.

The cycles of time in both episodes are also pinpointed by certain recurring acts - although Legends uses way less than TNG. While the cycles in "Cause and Effect" are marked with quite a few consistent things - a poker game, Beverly watering her plants, Beverly knocking a glass over - the most consistent element of "Here I Go Again" is Ray comically tripping over his platform shoes.

Both protagonists begin to get their other shipmates on board with the concept of a time loop after a trip to the med bay, albeit in completely different ways. In TNG, Beverly is paged to the med bay to perform a check up on Geordi La Forge, who begins to realize that he's also feeling deja vu (and, through the help of his visor, is able to provide some concrete evidence to support Beverly's theory). In Legends, Zari first relies on Nate Haywood/Steel (Nick Zano), who begins to believe her after a few more loops in time, and the pair begin to investigate the Waverider for answers.

Speaking of Nate, both episodes see the characters trying to send a message to the next cycle of the time loop, with pretty unique results. TNG's ensemble is ultimately saved by the message they send forward, with Data picking up on the subliminal message and ultimately pulling the Enterprise to safety. In the case of Legends, Nate tells Zari to tell him the phrase "Groundhog Day" in the next cycle, but she initially messes that up by adorably referring to it as "Hedgehog Day".

And beyond there, "Here I Go Again" arguably includes a few subtle parallels with "Cause and Effect", namely in the details of the episode. At one point, Sara Lance/White Canary (Caity Lotz) complains about hearing voices (which end up being the tiny versions of Zari and Ray) while in the jump ship, something that calls back to the voices that Beverly hears soon before going to bed each night. There also is a moment where Ray offers Sara his special hot tea recipe, which feels similar to the warm milk scene between Beverly and Jean-Luc Picard in "Cause and Effect".

Ultimately, both episodes give their unique take on the time loop trope, especially in how the episodes ultimately resolve. In "Cause and Effect", the loop is clearly a real thing that the Enterprise crew has experienced, with Warf discovering that it ate up seventeen and a half days of linear time. In "Here I Go Again", it's ultimately revealed that Gideon (Amy Pemberton) was behind it all, putting Zari through a virtual simulation -- kind of like Trek's holodeck, in a way -- as a way to have her realize her allegiances to the Legends.

But still, it's clear that "Here I Go Again" has plenty of little references for TNG fans, something Legends' cast and crew planned from the episode's inception.

“I was approached with Groundhog Day, and I’d seen Groundhog Day before, but I watched both the Star Trek episode and Groundhog Day as kind of a primer," Ashe told ComicBook.com. "I think it sides with ‘Cause and Effect’ more, because it’s a shift, but there’s times when you are watching that I’m definitely thinking of Groundhog Day more because it’s definitely a single person going through that experience.”

Legends of Tomorrow airs Mondays at 8/7c on The CW.