fix: 计算

This commit is contained in:
bietiaop 2024-07-29 00:05:17 +08:00
parent 4604f888af
commit 39b84180bf
4 changed files with 22 additions and 11 deletions

View file

@ -400,14 +400,14 @@ export class ZZZAvatarInfo {
return damagelist;
}
/** @type {string|boolean} */
/** @type {number|boolean} */
get equip_score() {
if (hasScoreData(this.id)) {
let score = 0;
for (const equip of this.equip) {
score += equip.score;
}
return score.toFixed(2);
return score;
}
return false;
}

View file

@ -103,6 +103,17 @@ export class EquipMainProperty {
}
return this.score;
}
/** @type {string} */
get short_name() {
if (this.property_name.includes('属性伤害加成')) {
return this.property_name.replace('属性伤害加成', '伤加成');
}
if (this.property_name === '能量自动回复') {
return '能量回复';
}
return this.property_name;
}
}
/**