My last personal fortress had a pretty elaborate defense. Enemies went up a
large ramp to enter a larger dome near the top. They then go down a long spiral road to dome floor, where both easy access to the rest of the fortress and a trade depot can be found.
If necessary, I can send a
wall of water down the ramp, but it is otherwise undefended. The road down, however, has three different ways to kill enemies. The primary method is through the fortifications on each level of the road down; enemies will turn the corner directly into the line of fire, then be forced to advance towards the fortifications. Before they can reach them, though, they will be at the downramp for the next level. Second, that wall of water can also be directed inward; this is more to prevent escape and make the loot accessible, but if I keep it on it can kill (I also have a whole squad of legendary swimmers that can use it to great advantage). Finally, once enemies have gone deep into the fortress I can
release my melee forces at the top of the interior road via a drawbridge (the drop will only stun them, it's not far enough to cause injury). They will then, immediately and on their own, start fighting their way down, killing everything in their path. Usually some squad members miss the drop, so they go up the road from the other way to rejoin their squad leaders--and anything in between them is trapped on all sides. Finally, if all else fails the bridges on the road down are all connected to a lever. I've never used this to kill enemies, though, only to drop the loot down to the
dome floor where it can be more easily and safely collected.
This map uses the CivForge mod so there's about 8 sieging enemies. I've only built three traps, and only once did one catch an invader. I've accidentally drowned a couple on the ramp, too; otherwise they've all been killed in combat. Just checked the units list; not counting thieves or merchant guards there are 115
pages of enemy dead.