The war is over, but the cycle of school years remains, and so does Hogwarts Headmistress Minerva McGonagall. One of these years she's going to retire, but it just sounds so tiresome having nothing to do.
One of the duties of the Headmistress is to maintain the wards. The bones of the magic laid by the Founders are stronger than mountains, but the passage of time, the turning of the world and the footsteps of a thousand wizards drag the surface layers of the wards out of alignment with each other and they must be realigned in the half-hour after midnight on every seventeenth new moon to retain their full strength.
On this particular new moon, the spiritual successors of the Marauders and the Weasley twins pick that half hour to blow up their entire dorm room using two boxes of fireworks, a deck of Exploding Snap cards, several potions delivered in plain brown bags from Croatia by owls trained to dodge the customs spells, and a newt.
This is, in fact, an excellent choice of timing as far as they're concerned. Minerva is already in the wards. She can feel the surge of magical energy in the moment it's released, and with reflexes still soldier-keen redirect the wards to reinforce that room, absorb the energy and redirect it from Fire into Chaos and from their location to hers. None of the children in the sixth year Gryffindor girls' room are so much as singed.
What happens to the Headmistress is somewhat more complicated.