Here's a demented, over-complicated plan for repelling sieges. I have not tested this! Let me know if you think it will actually work.
The idea is to bait the invaders with open doors, making them run back and forth over the same dangerous ground.
|+|
O^OOOOOOOOO
O^12^^^^3^O
O-OOOOOOO-O
To the north is the drawbridge, to the south is the fortress entrance. Assume there is an inner layer of protection. The middle section should be a long, winding section of trap-filled corridors, I just drew it shorter for clarity.
The numbers are pressure plates:
1 opens the right-side door
2 raises the drawbridge
3 opens the left-side door
Here's how it's supposed to work:
1 The goblins cross in, triggering the right door to open.
2 They beat feet to the open door, and hit the second plate, causing the bridge to retract, so no more goblins can get in. (and trigger the first plate)
3 They pass though the assload of traps. Meanwhile, the clock is ticking on the the first pressure plate.
4 Hopefully, the timer runs out, and the right door slams shut before the goblins get there. But not before stepping on the third plate, opening the other door
5 The goblins rush back to the left door, back through the traps. On the way, they trigger plate two, re-sealing the bridge.
6 Again, the door closes before they get there.
7 A goblin blunders into the first plate, and starts the process all over again.
If both doors close at the same time, the goblins will stop running back and forth until the bridge re-opens. If they try to leave, they trigger the pressure plates all over again.
Ways this can to wrong:
A door doesn't close fast enough, and goblins get through. Make sure there's soldiers or more traps beyond, to mop up the survivors.
The traps jam, or run out of ammo. Then the gobbos just run back and forth unharmed. It's still fun to watch. Crossbows can fire down from the walls.