The Mandalorian season 2 opened with an action-packed story that borrowed quite a few ideas from the fan-favorite role-playing game Knights of the Old Republic. This is far from the first time that the current canon repurposed ideas from the now-alternate timeline now known as Legends (originally called the Expanded Universe). Though the two continuities differ in their portrayals of the Krayt Dragons of Tatooine, the story details and the methods used to kill the dragons are extremely similar.

Krayt Dragons have been hinted at since the very first Star Wars film, with C-3PO passing by the skeletal remains of one while wondering through the Dune Sea, as well as Obi-Wan Kenobi imitating the call of one to frighten a group of Sand People (Luke tried this tactic himself in Heir to the Empire, with partial success). Throughout the Expanded Universe and current canon, Krayt Dragons are shown to be among the deadliest creatures on Tatooine, with several memorable appearances in non-movie material. This, of course, includes 2003’s Knights of the Old Republic and The Mandalorian.

Related: The Mandalorian Season 2 Cast Guide: Every New Character

In Knights of the Old Republic, the player-character, an amnesiac Jedi who was once the Sith Lord Darth Revan, must kill a Krayt Dragon to access its cave, which contains a Star Map. If the player selects the canonical “light side” character and story options, they’ll ally themselves with the local Sand People to locate the cave. Upon finding the cave, the player works with a local hunter to lure the dragon out of its cave (using its prey, a bantha) and into an explosive trap, which kills the dragon. To those following The Mandalorian season 2, this should all sound familiar. The alliance with the Sand People, the bantha bait, and the explosive trap all seem to be taken straight from the Legends-era video game.

A Krayt dragon in the desert in Knights Of The Old Republic

There are, however, several notable differences between the two. The Krayt Dragon seen in The Mandalorian is significantly larger than the one seen in Knights of the Old Republic, and this is owed to the fact that each story uses a different sub-species of Krayt. The dragon in Knights of the Old Republic is a more commonly-seen Canyon Krayt Dragon, while the one in The Mandalorian is the rarer, gargantuan, sarlacc-eating, Greater Krayt Dragon. In addition to spraying corrosive acid from its mouth (an ability that neither dragon had in Legends), the Greater Krayt seen in The Mandalorian was too durable to be killed by the explosive trap as planned, leading Din Djarin to instead kill it by detonating explosive inside the dragon.

The trap set for the Krayt Dragon may be normally effective because it’s meant to be used on the more common but less dangerous Canyon Krayts, which would make the Sand People and townsfolk wholly prepared for the rarer and deadlier Greater Krayt. The Mandalorian season 2 premiere ends with one more Knights of the Old Republic reference: the pearl pulled from the Greater Krayt’s corpse is a much larger version of the one that Revan can scavenge from the Krayt that he defeats.

Next: The Mandalorian: Every Star Wars Easter Egg In Season 2, Episode 2