CharacterStats
class CharacterStats
healthBase
healthFlat
healthPercent
attackBase
attackFlat
attackPercent
defenseBase
defenseFlat
defensePercent
speedBase
speedPercent
critRate
critDamage
chargeEfficiency
healAdd
healedAdd
elementMastery
physicalRes
physicalDamage
pyroDamage
electroDamage
hydroDamage
dendroDamage
anemoDamage
geoDamage
cryoDamage
pyroRes
electroRes
hydroRes
dendroRes
anemoRes
geoRes
cryoRes
matchedElementDamage
highestDamageBonus
pyroEnergyCost
electroEnergyCost
hydroEnergyCost
dendroEnergyCost
anemoEnergyCost
cryoEnergyCost
geoEnergyCost
energyCost
cooldownReduction
shieldStrength
currentPyroEnergy
currentElectroEnergy
currentHydroEnergy
currentDendroEnergy
currentAnemoEnergy
currentCryoEnergy
currentGeoEnergy
currentEnergy
currentHealth
maxHealth
attack
defense
speed
statProperties
constructor
new CharacterStats(data, enka, element)
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
data | JsonObject | |||
enka | EnkaClient | |||
element | Element |
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
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
id | number | |||
defaultValue | ✔️ | 0 |