mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix: 计算
This commit is contained in:
parent
4604f888af
commit
39b84180bf
4 changed files with 22 additions and 11 deletions
12
lib/score.js
12
lib/score.js
|
|
@ -48,7 +48,7 @@ export const getEquipPropertyScore = (charID, propertyID, value) => {
|
|||
break;
|
||||
// 大生命
|
||||
case '11102':
|
||||
finalScore = value * 1.6 * baseScore * 100;
|
||||
finalScore = value * 1.6 * baseScore * 1;
|
||||
break;
|
||||
// 小攻击
|
||||
case '12103':
|
||||
|
|
@ -56,7 +56,7 @@ export const getEquipPropertyScore = (charID, propertyID, value) => {
|
|||
break;
|
||||
// 大攻击
|
||||
case '12102':
|
||||
finalScore = value * 1.6 * baseScore * 100;
|
||||
finalScore = value * 1.6 * baseScore * 1;
|
||||
break;
|
||||
// 小防御
|
||||
case '13103':
|
||||
|
|
@ -64,15 +64,15 @@ export const getEquipPropertyScore = (charID, propertyID, value) => {
|
|||
break;
|
||||
// 大防御
|
||||
case '13102':
|
||||
finalScore = value * 1 * baseScore * 100;
|
||||
finalScore = value * 1 * baseScore * 1;
|
||||
break;
|
||||
// 暴击
|
||||
case '20103':
|
||||
finalScore = value * 2 * baseScore * 100;
|
||||
finalScore = value * 2 * baseScore * 1;
|
||||
break;
|
||||
// 暴击伤害
|
||||
case '21103':
|
||||
finalScore = value * 1 * baseScore * 100;
|
||||
finalScore = value * 1 * baseScore * 1;
|
||||
break;
|
||||
// 穿透值
|
||||
case '23203':
|
||||
|
|
@ -80,7 +80,7 @@ export const getEquipPropertyScore = (charID, propertyID, value) => {
|
|||
break;
|
||||
// 异常精通
|
||||
case '31403':
|
||||
finalScore = value * 0.5 * baseScore * 100;
|
||||
finalScore = value * 0.5 * baseScore * 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@
|
|||
<div class="comment">{{charData.equip_comment}}</div>
|
||||
</div>
|
||||
<div class="value">
|
||||
<span>{{charData.equip_score}}</span>
|
||||
<span>{{charData.equip_score.toFixed(2)}}</span>
|
||||
<span class="subt">分</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
{{if equip.score !== false}}
|
||||
<div class="score {{equip.comment}}">
|
||||
<div class="comment">{{equip.comment}}</div>
|
||||
<div class="value">{{equip.score}}</div>
|
||||
<div class="value">{{equip.score.toFixed(2)}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="property-list">
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
{{each equip.main_properties prop}}
|
||||
<div class="properties main">
|
||||
<div class="prop-icon {{prop.classname}}"></div>
|
||||
<div class="label yellow">{{prop.property_name}}</div>
|
||||
<div class="label yellow">{{prop.short_name}}</div>
|
||||
<div class="value">{{prop.base}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue