Class: Troop
Represents a Player's Troop.
Hierarchy
↳
Troop
Constructors
constructor
• new Troop(data
, unit
)
Parameters
Name | Type |
---|---|
data | APIPlayer |
unit | APIPlayerItem |
Overrides
Defined in
Properties
name
• name: string
The name of this unit.
Overrides
Defined in
isActive
• isActive: boolean
Whether this troop is currently active of boosted.
Defined in
minOriginalLevel
• minOriginalLevel: null
| number
Origin troop's minimum level of this super troop.
Overrides
Unit.minOriginalLevel
Defined in
originalName
• originalName: null
| string
Origin troop's name of this super troop.
Overrides
Unit.originalName
Defined in
boostable
• boostable: null
| boolean
Whether the player can boost this super troop.
Overrides
Unit.boostable
Defined in
level
• level: number
The level of this unit.
Inherited from
Defined in
maxLevel
• maxLevel: number
The max level of this unit.
Inherited from
Defined in
village
• village: "home"
| "builderBase"
The village type of this unit.
Inherited from
Defined in
isLoaded
• isLoaded: boolean
Whether the Game data has been loaded for this unit.
Inherited from
Defined in
id
• id: number
Id of this unit.
Inherited from
Defined in
housingSpace
• housingSpace: number
Housing space of this unit.
Inherited from
Defined in
hallMaxLevel
• hallMaxLevel: number
Town/Builder hall's max level of this unit.
Inherited from
Defined in
unlockHallLevel
• unlockHallLevel: number
Unlock Town/Builder Hall level of this unit.
Inherited from
Defined in
unlockCost
• unlockCost: number
Unlock cost of this unit.
Inherited from
Defined in
unlockTime
• unlockTime: number
Unlock time of this unit.
Inherited from
Defined in
unlockResource
• unlockResource: string
Unlock resource of this unit.
Inherited from
Defined in
unlockBuilding
• unlockBuilding: string
Unlock building of this unit.
Inherited from
Defined in
unlockBuildingLevel
• unlockBuildingLevel: number
Unlock building level of this unit.
Inherited from
Defined in
upgradeCost
• upgradeCost: number
Upgrade cost of this unit.
Inherited from
Defined in
upgradeResource
• upgradeResource: string
Upgrade resource of this unit.
Inherited from
Defined in
upgradeTime
• upgradeTime: number
Upgrade time of this unit.
Inherited from
Defined in
seasonal
• seasonal: boolean
Whether the unit is seasonal.
Inherited from
Defined in
dps
• dps: number
Damage per second of this unit.
Inherited from
Defined in
trainingTime
• trainingTime: number
Training time of this unit.
Inherited from
Defined in
Accessors
isSuperTroop
• get
isSuperTroop(): boolean
Whether this troop is a Super Troop.
Returns
boolean
Defined in
isHomeBase
• get
isHomeBase(): boolean
Whether the unit belongs to the home base.
Returns
boolean
Inherited from
Unit.isHomeBase
Defined in
isBuilderBase
• get
isBuilderBase(): boolean
Whether the unit belongs to the builder base.
Returns
boolean
Inherited from
Unit.isBuilderBase
Defined in
isMax
• get
isMax(): boolean
Whether the unit is at max level.
Returns
boolean
Inherited from
Unit.isMax