Skip to main content

CharacterStats

class CharacterStats

constructor

new CharacterStats(data, enka, element)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
dataJsonObject
enkaEnkaClient
elementElement

Properties

enka

Type: EnkaClient


healthBase

Type: StatProperty


healthFlat

Type: StatProperty


healthPercent

Type: StatProperty


attackBase

Type: StatProperty


attackFlat

Type: StatProperty


attackPercent

Type: StatProperty


defenseBase

Type: StatProperty


defenseFlat

Type: StatProperty


defensePercent

Type: StatProperty


speedBase

Type: StatProperty


speedPercent

Type: StatProperty


critRate

Type: StatProperty


critDamage

Type: StatProperty


chargeEfficiency

Type: StatProperty


healAdd

Type: StatProperty


healedAdd

Type: StatProperty


elementMastery

Type: StatProperty


physicalRes

Type: StatProperty


physicalDamage

Type: StatProperty


pyroDamage

Type: StatProperty


electroDamage

Type: StatProperty


hydroDamage

Type: StatProperty


dendroDamage

Type: StatProperty


anemoDamage

Type: StatProperty


geoDamage

Type: StatProperty


cryoDamage

Type: StatProperty


pyroRes

Type: StatProperty


electroRes

Type: StatProperty


hydroRes

Type: StatProperty


dendroRes

Type: StatProperty


anemoRes

Type: StatProperty


geoRes

Type: StatProperty


cryoRes

Type: StatProperty


matchedElementDamage

Element damage bonus which matches the character's element (Physical DMG ignored)

Type: StatProperty | null


highestDamageBonus

Including physical damage bonus, and returns list of highest damage bonus.
The order of the list is such that elemental matches come first.

Type: StatProperty[]


pyroEnergyCost

Type: number


electroEnergyCost

Type: number


hydroEnergyCost

Type: number


dendroEnergyCost

Type: number


anemoEnergyCost

Type: number


cryoEnergyCost

Type: number


geoEnergyCost

Type: number


energyCost

Type: number


cooldownReduction

Type: StatProperty


shieldStrength

Type: StatProperty


currentPyroEnergy

Type: number


currentElectroEnergy

Type: number


currentHydroEnergy

Type: number


currentDendroEnergy

Type: number


currentAnemoEnergy

Type: number


currentCryoEnergy

Type: number


currentGeoEnergy

Type: number


currentEnergy

Type: number


currentHealth

Type: StatProperty


maxHealth

Type: StatProperty


attack

The current attack of the character

Type: StatProperty


defense

The current defense of the character

Type: StatProperty


speed

The current speed of the character

Type: StatProperty


statProperties

Type: StatProperty[]


Methods

getStatProperty

Returns: StatProperty

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
idnumber
defaultValue✔️0