I was using a series of cage traps at the front of my fortress to catch those pesky thieves (ground level had one entrance with the rest walled off). After dealing with a few goblin ambushes, I set up a big corpse pit outside my walls to more easily flag body parts and corpses for dumping more easily without having to look around the battlefield. Easy peasy. I naturally get lazy and the bodies pile up...no big problem, I'll get around to it right after I finish decorating the new statue garden.
That is, no big problem until a necromancer shows up at my gates and immediately walks into a cage trap. Right next to the huge pile of corpses. And it just so happens that necromancers can resurrect nearby dead from within a cage. Since most of the nearby corpses were skeletons, it turned real hellish real quickly, as limbs went flying only to be immediately raised...the fight must have lasted a solid 10-15 minutes. My marksdwarves squad that had delt with a forgotten beast and many goblin raids with nary a scratch were utterly overwhelmed by Kobold Skulls and Goblin Left Toes, torn down from their full 10 to only 3, all wounded heavily. My melee squad that was still undergeared and undertrained went in to relieve them and suffered similar casualties. In the middle of all this, another necromancer attacked, but due to the utter chaos happening around my garbage pile, he didn't make it to the cage traps and was actually killed extremely easily; I think one of my marksdwarves killed him in two shots.
Luckily, the line held despite the dwarves having to beat all the corpses into dust. This gave enough time for someone to run up and grab the necro cage to be placed in a safer location.