With the recent interest in a Dwarf Nation for Nations At War, I suppose it's sensible to hash out some defensive ideas here:
As I understand it, war in N@W involves each Nation purchasing a set number of lives, which their side exhausts whenever their players die and respawn. Thus, a very sensible tactic when under Siege would be to route the enemy through the most dangerous series of traps we can muster, while minimizing our own losses by avoiding direct combat with them most of the time. As such, I'm thinking of planning defenses Dwarf Fortress style.
Siege Defenses:
Stage 1: A Medium squad of Guards would man the walls and towers of the Surface Gate, attacking with arrows and tnt cannons (if applicable), or by releasing mobs from mob traps around the fortress. The goal here is to exhaust enemy supplies, weaken them, and make them overconfident. As defenders die they will be respawning in the fortress below, so as numbers thin and forces begin to overwhelm the Surface Gate, those who survive begin a fighting retreat into the entry tunnels below, carrying what fallen armor and weapons they can.
Stage 2: Prior to siege, the main entrance is subtly concealed (possibly with a process automated by pistons), routing invaders into a near-identical-looking gate that instead leads to a pitch-black labyrinth. Alternatively, the entry tunnel could normally run through the center of the Labyrinth, but pistons alter the tunnel to open the labyrinth around it, and push walls up into it, subtly sealing off the normal entrance. While the first squad begins their fighting retreat, invaders chase them into the dark tunnels. Secret signs, perhaps redstone torches they could destroy on their way in, would help the defenders find their way through the maze quickly to Stage 3, while the invaders fumble with torches lighting their way, and ideally get lost in the dark maze.
The cavern would be filled with a series of automatic and defender-triggered traps, and many dead-ends. A small squad are stationed in an observation passage hidden adjacent and above the Labyrinth (entered from Stage 3), watching through arrow slits hidden in the roof, while hiding the obvious floating player names of defenders. The squad will manually trigger tunnel traps, and even open fire on the invaders from above. The goal here is secrecy, while slowing and whittling down the invading force.
Stage 3: Attacking forces, hopefully whittled down by traps and combat, will meet the remaining defenders in the Low Gate. Linked with the adjacent tunnels from Stage 2, arrow slits in the tunnel walls allow defenders to fire on the attackers. A high bridge over a Magma Pit might make a suitably scenic fighting location, while also allowing defenders aim Repeating Arrow Traps down the length of it, to push invaders from the bridge.
Mechanical Trap Ideas:
*As a failsafe, Siege-Mode defenses would be wired using inverters, so that they will auto-activate upon sabotage. If you cut the wires, the trap will still go off.
Water Box: In a long rectangular passage, use pistons to thrust solid rock walls down to seal a section off at both ends, and quickly flood it with water by removing the ceiling that separates it from a rectangular pool above. These douse any torches in the area, prevent quickly digging through the walls, and drown the invaders, allowing their gear to be recovered. Allowing the mechanism to be reset by pistons would make it even better.
False Floor: A square room sits on top of a deep chasm, whose bottom is covered in checkered cactus squares. A switch powers pistons to shunt the false floor away, dropping invaders into the chasm, before resetting and sealing it in darkness. A chute beyond the chamber allows defenders to enter the pit and safely salvage gear.
Magma Curtain: Better used as a deterrent rather than for outright killing, since it destroys useful gear. A pool of magma, running atop a hallway or chamber. Using piston-vents and 1-tile-deep trenches, dump a curtain of magma into a trench below. Invaders will spend time plugging the hole, while pistons can be triggered over and over again to shunt plugs out of the way and enable the defense again. Best used in a hallway of Obsidian, preventing invaders from digging around the curtains with any speed.