The framerate on my current fortress is slow enough that I want to get this project done without any mistakes, but it would still be quicker to build this now than to start a new fortress. It's a collapsing-bridge goblin trap, but it uses water-sensitive pressure plates to reset itself. If it works, I won't have to do a thing during a siege unless there are traders around.
I've thought it through and decided that it
does work... several times. So I'm running it past you guys.
There are three 'rooms' above the bridges: the trigger chamber, which starts the trap; the water tank, which contains the water used for dumping and whose water resets the trap; and the main reservoir, which feeds the water tank and the drowning area (not described here).
The first goblin (or any hostile) on the bridge passes over the bridge plate, which briefly sends power to the trigger chamber inlet pump. This dumps a small amount of water into the trigger chamber, which contains two pressure plates and the trigger chamber outlet pump. The first pressure plate is active between 0 and 1, and controls the water tank inlet floodgate. The second pressure plate is active between 2 and 7, and controls the water tank outlet hatch and the bridges. The trigger chamber outlet pump is currently unpowered. The water in the trigger chamber deactivates the water tank inlet floodgate, and opens the water tank outlet hatch and retracts the bridges.
Any goblins on the bridges fall into the pit below, and any goblins on the pressure plate get swept off into the pit by a torrent of water.
On the bottom level of the water tank is a final pressure plate, which deactivates once the water level drops to 1/7. This starts the trigger chamber outlet pump, emptying the trigger chamber into the water tank and resetting the trigger chamber's pressure plates. The water tank outlet hatch closes, the bridges extend, and the water tank inlet floodgate opens. The water level inside the tank rises, reactivating the reset plate, and deactivating the trigger chamber outlet pump.
Everything mechanical is now as it originally was, and the water tank finishes refilling as the goblins move across the first part of the bridge.
Below is a quick pic of the whole assembly that I've been using to check everything works. It might or might not be a help, but no harm throwing it in.
(side view)
The pic shows only the absolute nuts and bolts, especially with the screw pumps.