Warning: SPOILERS for Lucifer season 5, part 1.

Lucifer season 5 seems to have recodified the Laws of Hell to account for the Arrowverse and its version on Hell. Amusingly, in doing so, it seems to have opened up a plot hole regarding one episode in Lucifer season 2, where the Devil himself wound up falling prey to the torments of his own realm.

While based on a character created for the DC Comics series The Sandman, Lucifer was rarely considered in terms of being a comic book adaptation. This is largely because the show's take on the Devil, as portrayed by the dashing Tom Ellis, bore little resemblance to the disaffected David Bowie look-alike created by Neil Gaiman. Apart from the base concept of the Devil quitting his job to open a nightclub in Los Angeles, there was almost no connection between the the original comics and the show, which centered around the Devil becoming a consulting detective to the LAPD when he wasn't debauching.

Related: What To Expect From Lucifer Season 5, Part 2

When Lucifer was revealed to be part of the Arrowverse during Crisis on Infinite Earths, it made the relatively simple cosmology of Lucifer infinitely more complicated. The Hell of Constantine and Hell of Lucifer were drastically different places with wildly different physical laws, and there was no obvious way to explain both without the idea that every Earth had its own Hell and its own version of the Devil. This created the kind of complication Crisis on Infinite Earths was meant to eliminate and conflicted with the general rule of thumb in the DC Comics' cosmology, where there was one Heaven and one Hell encompassing every world on the material plane. Thankfully, Lucifer season 5 has come up with a series of solutions that explain away nearly everything.

Lucifer's Hell Rules In Seasons 1 - 3

In the early seasons of Lucifer, the nature of Hell was slowly unveiled, revealing it to be based around an idea introduced in Neil Gaiman's The Sandman: mortals only go to Hell if they truly feel they deserve to be punished for the bad things they did while alive. Lucifer confirmed this in a conversation with manipulative reporter Reese Getty in the season 3 episode "Off The Record," where he noted that none of the rooms in Hell are locked and humans are free to leave whenever they want, but that no one ever does. Instead, every soul in Hell is placed in a room where they are forced to relive the worst moments of their life repeatedly; what Lucifer calls a Hell-Loop.

Multiple references were also made to demons torturing Hell's inhabitants, with Mazikeen confirming in the season 3 episode "City of Angels?" that the people she punished chose the means utilized against them, based on their own guilt. While Maze preferred punishments that involved inflicting beatings, they did often contain more creative punishments based on the person's fears and phobias. Other episodes alluded to this, with Lucifer making reference to mortals being grouped according to their sins and there being "a special place in Hell" for specific kinds of sinners, like bullies and child molesters. Only angels were allowed to travel from Hell to Earth and back freely, and the only way demons could emerge on Earth was by possessing the dead body of a recently-deceased mortal.

While some of Lucifer's statements regarding Hell could be written off as jokes (like with his claim that he tortured people with Justin Beiber music), they also raised a rather important issue; why does Hell require demons as staff or an angel as a warden if the realm itself acts as a prison for those who think they deserve it? The only obvious answer is that they were there for those few beings who were sent to Hell and singled out for divine punishment (like the Goddess of All Creation) or to deal with psychopaths who felt no guilt whom, obviously, a just and loving God would not allow into Heaven. This seems to have been indirectly confirmed by Amenadiel, who complained to Lucifer during season 1 of having to do his job and fighting various damned souls that were trying to escape from Hell.

Related: Lucifer Season 5: How Did Michael's Right Arm Get Injured?

How Lucifer Season 4 & The Arrowverse Changed Hell's Laws

Crisis on Infintie Earths Lucifer Meets With John Constantine, John Diggle and Mia Queen Arowverse

These questions regarding how Lucifer's Hell operated were further complicated by the revelation that the world of Lucifer was part of the shared reality of the Arrowverse. Tom Ellis had a cameo in Crisis on Infinite Earths' third episode, where he assisted the warlock John Constantine with opening a portal to Purgatory in order to pay off an undefined debt he had incurred after Constantine did something to help Maze. While the scene amused fans of both Constantine and Lucifer, it did raise some questions given that the Hell of Legends of Tomorrow was radically different than the Hell of Lucifer.

Legends of Tomorrow seasons 4 and 5 took an in-depth look at the Hell of the Arrowverse, as the time-traveling team fought to save their world from the machinations of the Demon Neron and, later, the Three Fates of Ancient Greek myth. The series presented Hell as a fiery urban dystopia, where demons and damned souls were free to roam until it came time for the souls to be tortured and the demons to go to work. Another notable difference is that it was possible for fallen mortals to gain power and become demons themselves by acquiring ownership of fallen souls. Finally, it was possible for wizards to travel from Earth to Hell and back fairly easily.

Reconciling these conflicting visions of Hell became even more difficult in the face of Lucifer season 4. The season ended with a number of demons attempting to escape Hell and come to Earth, which required their possessing the bodies of recently dead humans in defiance of Lucifer's previous edicts against such things. In the middle of this chaos, it was revealed that the laws of Hell dictated that only an angel could sit on the throne of Hell. This forced Lucifer to resume his former position as the Sovereign of Hell in order to stop the demons from running loose and overwhelming the Earth.

Again, this was wildly different from the hierarchy of Hell depicted in Legends of Tomorrow. Their version of Hell was ruled by a Triumvirate, made up of the demons Satan, Beelzebub and Belial. Ironically, this in itself was a nod to Neil Gaiman's The Sandman, where a Triumvirate of Lucifer and the demons Beelzebub and Azazel ruled Hell. While this could possibly be justified as the demons forming their own internal bureaucracy under Lucifer's rule or in his absence, it did little to explain the two series' different versions of Hell.

How Lucifer Season 5 Reconciles It All

Lucifer and Demon Actor in Hell Loop in Season 5 Premiere

Miraculously, Lucifer season 5 found ways to address all of these issues and managed to answer the questions with a minimum of exposition. The question of what purpose demons serve in a self-functioning Hell that responds to the thoughts of the damned was answered in the season 5 premiere, "Really Sad Devil Guy." It was here that Lucifer revealed, as he checked in on career criminal Lee Garner, that the Hell-Loops are populated by demons playing the roles of the people around the guilty soul, like actors in a play or movie. It is in this capacity that they make sure people are tortured as they wish to be. The episode also revealed that, as Sovereign of Hell, Lucifer has the power to stop any Hell-Loop whenever he likes, basically freezing time and stopping the action like a director.

The question of how the demons came to take up this role was answered in Lucifer season 5, episode 4, "It Never Ends Well For The Chicken." This flashback Film Noir episode was largely focused on Lucifer telling Trixie the story of where he got his trademark ring and how it was a gift from Lilith; the first wife of Adam, and mother of all demons, including Maze. The episode revealed that Lilith gave Lucifer her children to Lucifer as an army; one he says he never asked for but came to appreciate as without them he would have had to rule Hell alone. It was for this reason that Lucifer regarded Lilith as a friend and owed her a debt of gratitude.

Another major change brought about by Lucifer season 5 is God's decree that Hell no longer required a warden. This came in the fifth episode of Lucifer season 5, episode 5, "Detective Amenadiel," when Amenadiel returned from Hell (which he had been watching for Lucifer as he confronted his twin brother Michael) and explained to Lucifer that their father had relived him of his duty. This could explain how the demons of Hell came to form their own hierarchy by the time of Legends of Tomorrow season 4.

Combined, all of these new additions to the mythology of Lucifer can be used to justify its inclusion in the Arrowverse. The new origin for the demons and explanation of their purpose in Hell unites them in common purpose with the demons seen on Legends of Tomorrow. The only conflict remaining is the differing rules for how demons manifest on Earth, but these could also be explained away by the fact that the action of Lucifer is largely set before Crisis on Infinite Earths took place and Constantine's calling upon Lucifer took place before Lucifer began. With all of Legends of Tomorrow season 5 set in a post-Crisis reality, it's entirely fair to guess that the old rules no longer apply in the post-Crisis Hell.

What About Lucifer in "A Good Day To Die?"

Lucifer In Hell Killing Uriel In A Good Day To Die in Lucifer Season 2

Amusingly, the clarifications to Hell's Laws made by Lucifer season 5 seem to open up a plot hole regarding Lucifer becoming trapped in a Hell-Loop of his own during Lucifer season 2. During the episode "A Good Day To Die," Lucifer was briefly trapped in a Hell-Loop where he kept murdering his brother Uriel. While this had been necessary to protect both the Goddess of All Creation and Chloe Decker, Lucifer still felt tremendous guilt over killing his younger brother, making him vulnerable to Hell's influence. Yet according to Lucifer's Season 5 premiere, he should have had the power to stop the Hell-Loop anytime he wanted and not required his mother's assistance to escape.

There are two logical explanations for how Lucifer could become trapped in a Hell-Loop. One hinges upon the distinction that Lucifer could only stop the Hell-Loop when he wanted to. If he truly felt that he deserved to be punished, which he clearly did, then he wouldn't have had the desire to free himself. There may also have been a legal reasoning for why Lucifer couldn't stop the Hell-Loop. While the Sovereign of Hell can stop a Hell-Loop at any time, Lucifer had abandoned his responsibilities years earlier and did not reclaim the Throne of Hell when he returned. This, coupled with his guilt over Uriel's death, made him fair game when he walked into a cell and into his own Hell-Loop.

Next: Lucifer Season 5, Part 1's Ending Explained: God Is Finally Revealed