It’s a question that has perplexed Batman villains since at least 1989: “Where does he get those wonderful toys?” Finally, we have an answer. The LEGO Store. The one a few blocks from Warner Bros.’ New York offices currently sells at least eight different LEGO Batman sets, all of which appear in various forms in The LEGO Batman Movie. The film is, like The LEGO Movie before it, a feature-length toy commercial — and, like The LEGO Movie before it, The LEGO Batman Movie is far more entertaining than a giant piece of crass commercialism has any right to be.

Through its first two films, the LEGO Cinematic Universe has a developed a unique and likable house style: Charmingly clunky animation, irreverent humor, and chaotic stories that seem inspired by children’s playtime logic. In The LEGO Batman Movie, the endless war between Batman (Will Arnett) and the Joker (Zach Galifianakis) takes an unexpected turn after the Clown Prince of Crime, heartbroken after the Dark Knight insists he doesn’t need him to be a fulfilled crimefighter, turns himself into police, along with the rest of the Gotham City Rogues Gallery. For some reason, this convinces Batman that he needs to steal Superman’s Phantom Zone Projector and then use it to send Joker to the Phantom Zone. Why? I don’t know. Why did I have the Real Ghostbusters try to capture the Ninja Turtles instead of working with them to defeat Hulk Hogan and He-Man when I was eight years old? Kids do weird things with their toys, and so does The LEGO Batman Movie director Chris McKay with his.

The LEGO Batman Movie has a similarly anarchic attitude (not to mention a charming disregard for the traditional rules of intellectual property). That doesn’t always make for the most emotionally gripping story, but it does give LEGO Batman an unpredictable energy that carries the film through some of its less coherent portions. This particular Batman — grotesquely arrogant, absurdly dark and gritty — debuted as a supporting player in The LEGO Movie, where he was allowed to serve as a one-dimensional (but hysterically funny) comic foil to the main characters. As the protagonist of his own spinoff, LEGO Batman now has to carry an emotional arc and learn some valuable lessons about the importance of family, selflessness, and teamwork. This is both a lovely message for children and a very quick way to make LEGO Batman a lot less amusing.

Arnett’s performance as this mega-aggro Batman is still a hoot, but this time the scene stealer is Ralph Fiennes’ exceedingly dry version of Batman’s loyal butler Alfred. Michael Cera also makes a fun Robin, infused with the same gee-whiz attitude that Burt Ward brought to the role more than 50 years earlier. (The film takes more cues from the ’60s Batman than any movie since Batman & Robin.) The cast list is impressive from top to bottom, although some of the actors (most obviously Galifianakis as the Joker) struggle to step out of the very large shadow cast by the great vocal talents who’ve previously brought the Caped Crusader’s animated adventures to life.

One random Gymkata joke aside, the script, credited to five different writers, isn’t quite a sharp as it could be. There’s a heavy emphasis on inside jokes and Easter eggs; non-Batman aficionados — like, say, someone who doesn’t understand why Robin putting on a costume labeled “Nightwing” is not just an Easter egg, but a double Easter egg — are going to miss a significant portion of the fun. Kudos, though, to the film and its creators for being willing to poke fun at themselves and at Batman himself, particularly in his recent incarnations. There are several jabs at Batman v Superman: Dawn of Justice, and one particularly snarky nod to Suicide Squad and its questionable storyline.

There’s even a winking reference to the Joker’s “wonderful toys” line from 1989’s Batman. A list of all the Easter eggs in the movie would run dozens of entries. Just about the only famous Batman moment that doesn’t get a callback is The Dark Knight Joker’s signature quip, “Why so serious?” In this film, it wouldn’t make any sense.