You don't. Attacks in Kingdoms of Camelot (KoC) can accomplish two things: the attacker may take gold or resources, and his troops may defeat yours.
No building can actually be destroyed
No fields can be disrupted.
If you "Hide your troops in sanctuary" then they are never committed to battle and will not be killed when you are attacked.
Additionally, there are strategies for protecting your resources:
Defending gold is another matter entirely. There is no easy means of accomplishing this. Your best strategy is to keep it moving. Use it to fund research in the Alchemy Lab. Spend it in the Market. Hire mercenaries to defend your wilds. You may try one of the hiding strategies above, but gold is subject to the same weaknesses as other resources.
It occurs to me that you also may be asking about building wall defenses such as Wall-mounted crossbows, trebuchets, traps, caltrops, and spiked barriers. When you click on the wall in the game, a window will pop up. At the bottom of this window is your wall defense queue. The five options will show there. By clicking on any of them, the build requirements will show, and your ability to build them will be designated by a number.
Chat with our AI personalities
Camelot
You have to purchase them from Kabam or win them in a tournament.
First, It's ''Camelot'' not Chamelot...Second, You can level up by building your cities, attacking wildernesses and training troops.
Friends are requested through Facebook. You can message to potential friends your Facebook name or your Facebook associated email. Doing this via chat however is a violation of KoC TOU.
Queen of the DamnedQuicksilverQuest for Camelot