When the wedding-weekend concept was first announced, I wondered how HIMYM would handle holiday episodes. Some of the Christmas/Thanksgiving/New Year’s installments of the past have been among the best in the series, but given that season nine unfolds in May, holiday spirit is hard to come by.

The writers found a crafty way around this last night, secluding Lily in the spooky room thirteen, which Marshall requested for its haunting by the ghost of a nineteenth-century serial killer (or a popular syphilitic prostitute) by the name of Captain Dearduff the Hooker. Overall, this was a mediocre episode, but I am continually impressed by what the show is doing within the limitations of the setting, especially when it doesn’t strain credibility. I mean, of course the Sasquatch-loving Marshall would want the haunted room, which he would have learned about from one of those programs on Discovery or Syfy (in this case, True and Real Ghost Stories of the Supernatural). The setup fit snugly with not only Halloween but also last week’s semi-cliff-hanger in which Daphne texted Lily the news of Marshall’s judgeship, because now the gang has to sneak into her room and delete the message.

Jokes mocking the low-production value of reenactments on these specious true-crime shows —in particular, the dropped boom mike — got things off on the right foot, as did Lily’s outrage: The latest oddball clerk at the Farhampton Inn (Flight of the Conchords’ Rhys Darby) is using Dearduff as a scapegoat for the hotel’s substandard guest accommodations. The AC won’t turn off because the captain brought with him “the icy chill of death” and the door won’t lock because Dearduff doesn’t want to have to pass through rat-infested walls. That last one led to a nice running gag in which Ted, Barney, and Robin ignore the easy way in and instead come up with their own ideas of how best to enter. (Robin’s plan to wheel in on the room-service cart was the best; Barney’s was amusing because he once again misunderstood the enemy in an eighties movie, taking to the air ducts like Bruce Willis, the bad guy in Die Hard.) I’m not quite sure why there’s so much opportunity to remedy the situation when Lily could see the text at any time, but people sometimes miss texts, so I won’t quibble here.

Let’s quibble elsewhere. Didn’t you think the no-questions-asked scenarios squandered an opportunity for more interesting flashbacks? I like HIMYM best when the humor reflects reality, but all of the chips that Marshall was cashing in with his friends were so far-fetched. Ted’s was the worst, and I say that as someone who enjoys when his pretentiousness is played for laughs. He wouldn’t write a letter mentioning “emerald reefs” and “primordial stirrings” to a woman he met at the drugstore an hour prior, and then get locked in a mailbox trying to retrieve it. Barney probably wouldn’t swallow real-life versions of the Lucky Charms items, either, but the randomness was kinda funny, and if $50 were at stake … Finally, I had no idea what was going on with Robin, a.k.a. Night Falcon, as she escaped from dart-throwing ninjas in that condom-like unitard. I assume this was a nod to her more action-packed role as a S.H.I.E.L.D. agent, but maybe I missed something. What really distracted me here was the specificity of the addresses — Ted is at 53rd and Eighth, Robin is in an alley at 22nd and Second, Barney (when he crapped his pants) was at the Macy’s in Herald Square. I couldn’t make any sense of it, but the locations felt deliberate, although maybe they were merely functional.

Anyway, in any of these situations, with the exception of Barney’s Macy’s accident, questions most definitely would be asked, and the stories would be too wild to resist telling, so the wackiness turned me off. But I’m going with a diplomatic middling rating here, rather than a lower one that the episode might deserve, because I’ve been down on the show for the past few weeks and my reaction this time wasn’t as strongly negative. I wish the specifics hadn’t been so goofy, but the premise of a code of silence among friends was genuine, and zooming out, I appreciated the chumminess on display as the gang filed into Lily’s room one after the other to do Marshall a solid. As I’ve said before, I don’t believe he would be in this situation, having lied to Lily about something so major, but at least it was dealt with, and the confession is out of the way, which counts toward plot development, even if it doesn’t involve the titular character that we’re all waiting for.

What I liked:

The cross purposes of Barney and Robin’s ideas for departing the church. In keeping with continuity, Barney will release 100 doves, which are presumably still in the basement with Ted, meanwhile Robin’s gun-enthusiast family members were planning a 21-gun salute. That the two hadn’t been consulting each other leads to some more handwringing over their suitability as partners, which I was okay with here because it didn’t consume the plot, but rather rippled through it. Also: Courtney Dove and Kurt Coobain.

Robin assuming that Marshall needs her help in deleting a naked selfie that he shouldn’t have taken while in the coldest part of the country, and HIMYM keeping Jason Segel’s endowment a running joke when he informs her that the extreme temperature has “a plumping effect.”

Neil Patrick Harris’s tongue-twisting delivery of the story that starts with the kinkajou.

Lily renting Prison Sluts 9.

What I didn’t like: