enkanetwork
Version:
API wrapper for enka.network written on TypeScript which provides localization, caching and convenience
198 lines (197 loc) • 6.64 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CharacterStats = void 0;
class CharacterStats {
baseHP;
hp;
hpPercent;
baseAttack;
attack;
attackPercent;
baseDefense;
defense;
defensePercent;
baseSpeed;
speedPercent;
hpMpPercent;
attackMpPercent;
critical;
antiCritical;
criticalHurt;
chargeEfficiency;
addHurt;
subHurt;
healAdd;
healedAdd;
elementMastery;
physicalSubHurt;
physicalAddHurt;
defenceIgnoreRatio;
defenceIgnoreDelta;
fireAddHurt;
elecAddHurt;
waterAddHurt;
grassAddHurt;
windAddHurt;
rockAddHurt;
iceAddHurt;
hitHeadAddHurt;
fireSubHurt;
elecSubHurt;
waterSubHurt;
grassSubHurt;
windSubHurt;
rockSubHurt;
iceSubHurt;
effectHit;
effectResist;
freezeResist;
torporResist;
dizzyResist;
freezeShorten;
torporShorten;
dizzyShorten;
maxFireEnergy;
maxElecEnergy;
maxWaterEnergy;
maxGrassEnergy;
maxWindEnergy;
maxIceEnergy;
maxRockEnergy;
skillCdMinusRatio;
shieldCostMinusRatio;
curFireEnergy;
curElecEnergy;
curWaterEnergy;
curGrassEnergy;
curWindEnergy;
curIceEnergy;
curRockEnergy;
curHp;
maxHp;
curAttack;
curDefense;
curSpeed;
nonextraAttack;
nonextraDefense;
nonextraCritical;
nonextraCriticalHurt;
nonextraChargeEfficiency;
nonextraElementMastery;
nonextraPhysicalSubHurt;
nonextraFireAddHurt;
nonextraElecAddHurt;
nonextraWaterAddHurt;
nonextraGrassAddHurt;
nonextraWindAddHurt;
nonextraRockAddHurt;
nonextraIceAddHurt;
nonextraFireSubHurt;
nonextraElecSubHurt;
nonextraWaterSubHurt;
nonextraGrassSubHurt;
nonextraWindSubHurt;
nonextraRockSubHurt;
nonextraIceSubHurt;
nonextraSkillCdMinusRatio;
nonextraShieldCostMinusRatio;
nonextraPhysicalAddHurt;
constructor(stats) {
this.baseHP = stats["1"] || 0;
this.hp = stats["2"] || 0;
this.hpPercent = stats["3"] || 0;
this.baseAttack = stats["4"] || 0;
this.attack = stats["5"] || 0;
this.attackPercent = stats["6"] || 0;
this.baseDefense = stats["7"] || 0;
this.defense = stats["8"] || 0;
this.defensePercent = stats["9"] || 0;
this.baseSpeed = stats["10"] || 0;
this.speedPercent = stats["11"] || 0;
this.hpMpPercent = stats["12"] || 0;
this.attackMpPercent = stats["13"] || 0;
this.critical = stats["20"] || 0;
this.antiCritical = stats["21"] || 0;
this.criticalHurt = stats["22"] || 0;
this.chargeEfficiency = stats["23"] || 0;
this.addHurt = stats["24"] || 0;
this.subHurt = stats["25"] || 0;
this.healAdd = stats["26"] || 0;
this.healedAdd = stats["27"] || 0;
this.elementMastery = stats["28"] || 0;
this.physicalSubHurt = stats["29"] || 0;
this.physicalAddHurt = stats["30"] || 0;
this.defenceIgnoreRatio = stats["31"] || 0;
this.defenceIgnoreDelta = stats["32"] || 0;
this.fireAddHurt = stats["40"] || 0;
this.elecAddHurt = stats["41"] || 0;
this.waterAddHurt = stats["42"] || 0;
this.grassAddHurt = stats["43"] || 0;
this.windAddHurt = stats["44"] || 0;
this.rockAddHurt = stats["45"] || 0;
this.iceAddHurt = stats["46"] || 0;
this.hitHeadAddHurt = stats["47"] || 0;
this.fireSubHurt = stats["50"] || 0;
this.elecSubHurt = stats["51"] || 0;
this.waterSubHurt = stats["52"] || 0;
this.grassSubHurt = stats["53"] || 0;
this.windSubHurt = stats["54"] || 0;
this.rockSubHurt = stats["55"] || 0;
this.iceSubHurt = stats["56"] || 0;
this.effectHit = stats["60"] || 0;
this.effectResist = stats["61"] || 0;
this.freezeResist = stats["32"] || 0;
this.torporResist = stats["63"] || 0;
this.dizzyResist = stats["64"] || 0;
this.freezeShorten = stats["65"] || 0;
this.torporShorten = stats["66"] || 0;
this.dizzyShorten = stats["67"] || 0;
this.maxFireEnergy = stats["70"] || 0;
this.maxElecEnergy = stats["71"] || 0;
this.maxWaterEnergy = stats["72"] || 0;
this.maxGrassEnergy = stats["73"] || 0;
this.maxWindEnergy = stats["74"] || 0;
this.maxIceEnergy = stats["75"] || 0;
this.maxRockEnergy = stats["76"] || 0;
this.skillCdMinusRatio = stats["80"] || 0;
this.shieldCostMinusRatio = stats["81"] || 0;
this.curFireEnergy = stats["1000"] || 0;
this.curElecEnergy = stats["1001"] || 0;
this.curWaterEnergy = stats["1002"] || 0;
this.curGrassEnergy = stats["1003"] || 0;
this.curWindEnergy = stats["1004"] || 0;
this.curIceEnergy = stats["1005"] || 0;
this.curRockEnergy = stats["1006"] || 0;
this.curHp = stats["1010"] || 0;
this.maxHp = stats["2000"] || 0;
this.curAttack = stats["2001"] || 0;
this.curDefense = stats["2002"] || 0;
this.curSpeed = stats["2003"] || 0;
this.nonextraAttack = stats["3000"] || 0;
this.nonextraDefense = stats["3001"] || 0;
this.nonextraCritical = stats["3002"] || 0;
this.curSpeed = stats["3003"] || 0;
this.nonextraCriticalHurt = stats["3004"] || 0;
this.nonextraChargeEfficiency = stats["3005"] || 0;
this.nonextraElementMastery = stats["3006"] || 0;
this.nonextraPhysicalSubHurt = stats["3007"] || 0;
this.nonextraFireAddHurt = stats["3008"] || 0;
this.nonextraElecAddHurt = stats["3009"] || 0;
this.nonextraWaterAddHurt = stats["3010"] || 0;
this.nonextraGrassAddHurt = stats["3011"] || 0;
this.nonextraWindAddHurt = stats["3012"] || 0;
this.nonextraRockAddHurt = stats["3013"] || 0;
this.nonextraIceAddHurt = stats["3014"] || 0;
this.nonextraFireSubHurt = stats["3015"] || 0;
this.nonextraElecSubHurt = stats["3016"] || 0;
this.nonextraWaterSubHurt = stats["3017"] || 0;
this.nonextraGrassSubHurt = stats["3018"] || 0;
this.nonextraWindSubHurt = stats["3019"] || 0;
this.nonextraRockSubHurt = stats["3020"] || 0;
this.nonextraIceSubHurt = stats["3021"] || 0;
this.nonextraSkillCdMinusRatio = stats["3022"] || 0;
this.nonextraShieldCostMinusRatio = stats["3023"] || 0;
this.nonextraPhysicalAddHurt = stats["3024"] || 0;
}
}
exports.CharacterStats = CharacterStats;