When house-party comedy Project X was released in 2012, the studio marketed it as a celebration of teen rebellion. “A parent’s worst nightmare,” boasted the trailer. Another said it was “like Superbad on crack.” The debauched gathering spirals out of control after a drug dealer’s garden gnome is smashed open, spilling hundreds of ecstasy tablets, which are eagerly snaffled by the young guests.

Some criticism of the film took on an unusually moral dimension. One broadsheet critic tweeted: “The army should wait outside Project X screenings, look for people who come out saying: ‘That was good,’ and simply shoot them in the head.”

This week sees the arrival of another house-party comedy, celebrating more riotous bad behaviour. This time, however, the hosts are in their 40s, and played by Tina Fey and Amy Poehler. In Sisters, the siblings discover that their family home has been all but sold. So they stage an epic party, giving reliably responsible Maura (Poehler) some belated compensation for her well-spent youth.

Sisters is aimed squarely at the comedy mainstream, targeting the same demographic that powered Bridesmaids to its $288m return at the box office. So it is striking that it shares the same positive approach to drugs as Project X. Maura and Kate (Fey), alarmed at the distinct lack of fun being had so far, call in a dealer whose range of pharmaceuticals turns out to be a bit more class-A than expected. The hit of the night is “Cloud 10”, which is basically “70% molly” aka MDMA. Nobody dies, although the house certainly takes a battering.

Sisters follows hot on the heels of The Night Before, another man-child comedy in which Seth Rogen, 33, behaves like an errant teen. But while previous genre highlights have relied on excessive consumption of cannabis, The Night Before pushes a broader mix of stimulants, given to Rogen’s character by his pregnant wife as reward for his responsible behaviour.

A couple of drugs-positive comedies in a fortnight could be dismissed as coincidence. But they come following a summer in which two films with the mainstream in their crosshairs – Magic Mike XXL and Entourage – both featured casual and consequence-free consumption of ecstasy. In the former, all the guys take some molly (“Breakfast of champions!”), and a sweaty emotional intensity ensues. In the latter, Kevin Connolly’s drink is spiked with Viagra and ecstasy, which causes him to sleep with a beautiful young woman and suffer mild regret.

The British Board of Film Classification’s benign attitude towards these films is notable. It describes the characters in Entourage as simply “behaving in a silly, disoriented manner”. For Project X and The Night Before, it notes, with a shrug, that the drug-taking can lead to tricky situations for the characters.

Unlike both Sisters and The Night Before – and 2015 US indie comedy Dope, in which our teen protagonists prove their entrepreneurial skills by selling a large bag of ecstasy pills – the drug use in MMXXL and Entourage is entirely gratuitous, and barely connected to the story. The scenes could easily have been cut at script stage, but studio executives and financiers have evidently decided that MDMA is now acceptable. The drug confers cool cachet; the moral backlash never materialised.

“Movies are holding a mirror to life in our times,” says Variety’s Steven Gaydos. “But the cynic in me also sees demographic pandering.” And that demographic is now being rather generously defined.

In US indie comedy Sleeping with Other People, thirtysomethings Jake (Jason Sudeikis, 40 in real life) and Lainey (Alison Brie, 32) attend a party honouring the eighth birthday of the child of Jake’s business partner. Primary school teacher Lainey teaches the assembled kids her funky moves to David Bowie’s Modern Love. That the friends enhance their enjoyment by taking MDMA beforehand invites little comment.

Even recently, the equivalent scene would have featured the characters toking on a joint – but perhaps the Harold & Kumar series and Rogen vehicles such as Pineapple Express have exhausted weed’s comic potential. And with cannabis now legal for purchase in four US states, its rebellious status is under threat. The appearance of MDMA in powder form also offers portion control that broadens its screen appeal. “Unlike cocaine and heroin,” says Tim Grierson, of Screen International, “molly is just looked at as being fun. It’s naughty in a benign way. And because it’s fashionable, it’s an easy way for movies to seem hip, even when that’s barely the case.”

Whatever the motive, it’s an improvement on Hollywood’s prior, default setting that drugs are bad, and those who sell them even worse. Countless cop movies have relied on the unlikely storyline that an evil dealer is pushing toxic product, and even teen-targeting comedy 21 Jump Street featured a drug-related death. This year’s crop of MDMA-positive comedies, then, does provide balance.

More molly in more mainstream films seems inevitable, then. But wider adoption (Bridget Jones’s Baby?) may well of course prove its undoing, and studios will need to search elsewhere for transgressive indictators.

Gaydos says: “In order to sell films to young audiences, Hollywood would present cannibalism as an alternative lifestyle if there were enough social media indicators that it was the next big thing.”

•Sisters is out now. Sleeping With Other People is released 1 January.