Skip to main content

Class: Equipment

Represents a Player's Hero Equipment.

Hierarchy

Constructors

constructor

new Equipment(data, unit)

Parameters

NameType
dataAPIPlayer
unitAPIPlayerItem

Inherited from

Unit.constructor

Defined in

struct/Unit.ts:81

Properties

name

name: string

The name of this unit.

Inherited from

Unit.name

Defined in

struct/Unit.ts:7


level

level: number

The level of this unit.

Inherited from

Unit.level

Defined in

struct/Unit.ts:10


maxLevel

maxLevel: number

The max level of this unit.

Inherited from

Unit.maxLevel

Defined in

struct/Unit.ts:13


village

village: "home" | "builderBase"

The village type of this unit.

Inherited from

Unit.village

Defined in

struct/Unit.ts:16


isLoaded

isLoaded: boolean

Whether the Game data has been loaded for this unit.

Inherited from

Unit.isLoaded

Defined in

struct/Unit.ts:21


id

id: number

Id of this unit.

Inherited from

Unit.id

Defined in

struct/Unit.ts:24


housingSpace

housingSpace: number

Housing space of this unit.

Inherited from

Unit.housingSpace

Defined in

struct/Unit.ts:27


hallMaxLevel

hallMaxLevel: number

Town/Builder hall's max level of this unit.

Inherited from

Unit.hallMaxLevel

Defined in

struct/Unit.ts:30


unlockHallLevel

unlockHallLevel: number

Unlock Town/Builder Hall level of this unit.

Inherited from

Unit.unlockHallLevel

Defined in

struct/Unit.ts:33


unlockCost

unlockCost: number

Unlock cost of this unit.

Inherited from

Unit.unlockCost

Defined in

struct/Unit.ts:36


unlockTime

unlockTime: number

Unlock time of this unit.

Inherited from

Unit.unlockTime

Defined in

struct/Unit.ts:39


unlockResource

unlockResource: string

Unlock resource of this unit.

Inherited from

Unit.unlockResource

Defined in

struct/Unit.ts:42


unlockBuilding

unlockBuilding: string

Unlock building of this unit.

Inherited from

Unit.unlockBuilding

Defined in

struct/Unit.ts:45


unlockBuildingLevel

unlockBuildingLevel: number

Unlock building level of this unit.

Inherited from

Unit.unlockBuildingLevel

Defined in

struct/Unit.ts:48


upgradeCost

upgradeCost: number

Upgrade cost of this unit.

Inherited from

Unit.upgradeCost

Defined in

struct/Unit.ts:51


upgradeResource

upgradeResource: string

Upgrade resource of this unit.

Inherited from

Unit.upgradeResource

Defined in

struct/Unit.ts:54


upgradeTime

upgradeTime: number

Upgrade time of this unit.

Inherited from

Unit.upgradeTime

Defined in

struct/Unit.ts:57


seasonal

seasonal: boolean

Whether the unit is seasonal.

Inherited from

Unit.seasonal

Defined in

struct/Unit.ts:60


dps

dps: number

Damage per second of this unit.

Inherited from

Unit.dps

Defined in

struct/Unit.ts:63


trainingTime

trainingTime: number

Training time of this unit.

Inherited from

Unit.trainingTime

Defined in

struct/Unit.ts:66

Accessors

isHomeBase

get isHomeBase(): boolean

Whether the unit belongs to the home base.

Returns

boolean

Inherited from

Unit.isHomeBase

Defined in

struct/Unit.ts:147


isBuilderBase

get isBuilderBase(): boolean

Whether the unit belongs to the builder base.

Returns

boolean

Inherited from

Unit.isBuilderBase

Defined in

struct/Unit.ts:152


isMax

get isMax(): boolean

Whether the unit is at max level.

Returns

boolean

Inherited from

Unit.isMax

Defined in

struct/Unit.ts:157