## LootEdit

### Gold/ElixirEdit

Gold and Elixir can be stolen from three types of Resource Buildings: storages, mines/collectors and the Town Hall.

**Storages:**The percentage of Gold/Elixir that can be stolen from storages is 20% and is capped at 198,000. This means that if more than 990,000 is being held in storages, it is subject to the cap.**Mines/Collectors:**The percentage of Gold/Elixir that can be stolen from mines/collectors is 50% and is capped only by the storage capacity of the mine/collector.**Town Hall**: There is an additional 1,000 of each resource that can be stolen inside the Town Hall.

Therefore, calculated loot = (20% x stored resources, up to 198,000) + (50% x amount in mines/collectors) + 1,000. This means that the maximum calculated loot, for each resource, that can be stolen from 1 opponent (with maxed mines/collectors and full storages, and same Town Hall level) is: 198,000 + (7 x 75,000) + 1,000 = 724,000.

These figures are __before__ the loot multiplier is applied. The loot multiplier is what is behind the loot "penalty" and the loot "bonus". The amount of __available__ loot = calculated loot x loot multiplier. The loot multiplier is determined as follows:

- 5% for attacking someone with a Town Hall (TH) 4+ levels lower than the attacker's.
- 25% for attacking someone with a TH 3 levels lower than the attacker's.
- 50% for attacking someone with a TH 2 levels lower than the attacker's.
- 90% for attacking someone with a TH 1 level lower than the attacker's.
- 100% for attacking someone with a TH level equivalent to the attacker's.
- 110% for attacking someone with a TH 1 level higher than the attacker's.
- 150% for attacking someone with a TH 2 levels higher than the attacker's.
- 200% for attacking someone with a TH 3+ levels higher than the attacker's.

The comprehensive formula for finding available loot is as follows:

Where:

- total amount of loot in all storages
- total amount of loot in all mines or collectors
- total amount of loot in the Town Hall

NOTE: The 1,000 that the Town Hall stores is subject to the PENALTY but not the BONUS, as 1,000 of each resource is the most it can ever store.

**Calculator:**

The maximum theoretical Gold or Elixir loot is as follows:

In practice this is almost impossible for someone to actually raid, though.

### Dark ElixirEdit

Dark Elixir Storages have 5% of their contents available for raiding and Dark Elixir Drills have 75% available for raiding. The cap for raiding from the storage is 2,000, while the drills are raidable according to (75% of uncollected DE) x (loot multiplier) or the maximum capacity of the drill, whichever is lower.

The comprehensive formula for finding Dark Elixir loot is as follows:

Where:

- total amount of loot in the Dark Elixir Storage
- amount of loot in each Dark Elixir Drill
- maximum capacity of each Dark Elixir Drill

The maximum theoretical Dark Elixir loot is as follows: