I’m currently in the grace period where I have a “shield” that prevents attacks from other players. When this expires, I assume that I’ll start getting attacked. What happens when another player attacks me? I am particularly interested in the following:
Do I lose resources? Is it possible to lose them all?
Are my buildings destroyed?
Do my troops in the Army Camp fight for me, or just stand around?
Are their any limits on who can attack me, and how often?
How do they decide whether your defense wins or loses?
You lose resources, depending on how much the attacker "destroys". If the attacker destroys everything, you can lose up to a maximum of 50% of Elixir/Gold in your collectors, 100% of Elixir/Gold in your Town Hall, and 10-20% of Elixir/Gold in your storage containers depending on your Town Hall level. You also lose 75% of Dark Elixir in your collectors, 5-10% of loot in your Clan Castle and 4-6% of Dark Elixir in your storages This is a worst case, and can be significantly less if the opponent is higher level than you, or does not fully succeed in destroying your buildings.
You lose trophies, depending on how much the attacker "destroys" and also the relative amounts of trophies you and the attacker have. Attackers get 1/3 of potential trophies for each star they receive. Potential trophies are more if the attacker started with less trophies than you, and are fewer if the attacker started with more trophies than you.
Your buildings are not actually destroyed, even when the opponent "destroys" them. Buildings regenerate after attacks.
Troops in your Army Camp do not participate. Troops in your Clan's Castle will fight if any enemy troop is deployed in its radius.
There is a range of who can attack you. However, this is based on the number of trophies you have. This makes it possible for high level players to attack you. These players have just simply purposefully lost a bunch of trophies so they can "pick on" low level players. Bear in mind though that pairing is random, so in order for a higher level attacker to attack, they have to be randomly paired with you. Note this does not apply if you've previously attacked them, since they have a "revenge" option.