One thing that is lacking in this thread is underground traps. Here's one.
This design takes a lot of space and only works underground, but is very good for keeping cave-based building destroyers (like FBs) out of your fortress.
X = wall
_ = floor
# = floor grate
H = floor hatch
F = floodgate
1-7 = water depth
M = magma
U = up stair
D = down stair
<%% = pump (arrow points in direction of pump).
Z-1
XXXXX
XMMMX (lines up with floor hatch / grate)
XXXXX
Z+0
XXX
XUX (this begining part is designed appropriately for the location and may be different)
X2XXX
X2FMXXXXXXXMXXX
XHF#MM<%%MMMXXX - pump is powered from above.
X2FMXXXXXXXXXXX
X2XXX
XUXX (this end part is also designed to be appropriate for the location and can vary greatly)
XXXX
Important Notes:
1. The pump should be inaccessible from the end that the building destroyer comes from.
2. I actually have not had this trap be triggered yet, mainly out of sheer chance. With that said, this concept is not proven. Use at your own risk.
3. Build several of these in parallel so that if one is "used" the area you were protecting is still accessable. The beauty is they can all use the same magma pump.
And of course, I do use the standard surface cave in trap.
I have another design, too complex for a small diagram, that uses a very long 2z high corridor* with floodgates to be destroyed that have a small 2z cistern of water behind them. In the cistern is a ledge, with a pressure plate activated by greater than 3/7 water. The ammount of water should be able to bring the corridor to 4 - 6 water depth, but not overfill it to the point where the water reaches the second level.
*This corridor needs to be long enough or have enough flood gates** that the plate will reset and set off the other components before the FB leaves.
**Make sure they ALL release the water because you do not know which one will trip first.
When the plate resets a bridge over the hallway is lowered, allowing a large quantity of magma to pour into the hallway on top of the water, obsidianizing it.
Naturally, this trap can only really be used once.