Clan Capital
Clan Capital
The clanCapital() factory function is the entry point for every piece of Clan Capital data: defenses, Raid Weekend troops, districts, and the Forge.
Namespaces
clanCapital() returns a ClanCapital object with one method per category:
import { clanCapital } from 'clash-of-clans-data'
clanCapital().defenses() // ClanCapitalDefenses
clanCapital().traps() // ClanCapitalTraps
clanCapital().walls() // ClanCapitalWalls
clanCapital().troops() // ClanCapitalTroops
clanCapital().spells() // ClanCapitalSpells
clanCapital().armyBuildings() // ClanCapitalArmyBuildings
clanCapital().other() // ClanCapitalOther
clanCapital().capitalHall() // ClanCapitalCapitalHall
clanCapital().districtHall() // ClanCapitalDistrictHall
clanCapital().leagues() // ClanCapitalLeagues
clanCapital().forge() // ClanCapitalForge
| Namespace | Category page | Content |
|---|---|---|
defenses() | Defenses & traps | 21 district defenses |
traps() | Defenses & traps | 5 traps (Mine, Mega Mine, Log Trap, Zap Trap, Spear Trap) |
walls() | Defenses & traps | Wall tiers per Capital/District Hall level |
troops() | Troops & spells | 17 Raid Weekend troops |
spells() | Troops & spells | 7 Raid Weekend spells |
armyBuildings() | Buildings & leagues | Army Camp, Spell Storage, Barracks, and Spell Factories per district |
other() | Buildings & leagues | District houses/decorations |
capitalHall() | Buildings & leagues | Capital Hall level data |
districtHall() | Buildings & leagues | District Hall level data |
leagues() | Buildings & leagues | Clan Capital league tiers with trophy ranges |
forge() | Buildings & leagues | Daily Forge, Auto-Forge, and forge crafting rates |
Quick start
import { clanCapital } from 'clash-of-clans-data'
const superBarbarian = clanCapital().troops().superBarbarian().first()!
const dh5Defenses = clanCapital().defenses().byCapitalHall(5).get()
const airDefenses = clanCapital().defenses().byTargetType('air').get()
Level-count totals
clanCapital() exposes a helper that totals structure, wall, troop, and spell levels across the Capital Peak and every unlocked district, for a given Capital Hall level:
import { clanCapital } from 'clash-of-clans-data'
const counts = clanCapital().levelCountAtClanCapital(6)
console.log(counts.capitalPeak.total)
console.log(counts.barbarianCamp.total)
console.log(counts.wizardValley.total)
console.log(counts.troops)
console.log(counts.spells)
console.log(counts.total)
Next steps
- Defenses & traps: the full Clan Capital defense, trap, and wall list
- Troops & spells: every Raid Weekend unit
- Buildings & leagues: district buildings, halls, leagues, and the Forge