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;
|
break;
|
||||||
// 大生命
|
// 大生命
|
||||||
case '11102':
|
case '11102':
|
||||||
finalScore = value * 1.6 * baseScore * 100;
|
finalScore = value * 1.6 * baseScore * 1;
|
||||||
break;
|
break;
|
||||||
// 小攻击
|
// 小攻击
|
||||||
case '12103':
|
case '12103':
|
||||||
|
|
@ -56,7 +56,7 @@ export const getEquipPropertyScore = (charID, propertyID, value) => {
|
||||||
break;
|
break;
|
||||||
// 大攻击
|
// 大攻击
|
||||||
case '12102':
|
case '12102':
|
||||||
finalScore = value * 1.6 * baseScore * 100;
|
finalScore = value * 1.6 * baseScore * 1;
|
||||||
break;
|
break;
|
||||||
// 小防御
|
// 小防御
|
||||||
case '13103':
|
case '13103':
|
||||||
|
|
@ -64,15 +64,15 @@ export const getEquipPropertyScore = (charID, propertyID, value) => {
|
||||||
break;
|
break;
|
||||||
// 大防御
|
// 大防御
|
||||||
case '13102':
|
case '13102':
|
||||||
finalScore = value * 1 * baseScore * 100;
|
finalScore = value * 1 * baseScore * 1;
|
||||||
break;
|
break;
|
||||||
// 暴击
|
// 暴击
|
||||||
case '20103':
|
case '20103':
|
||||||
finalScore = value * 2 * baseScore * 100;
|
finalScore = value * 2 * baseScore * 1;
|
||||||
break;
|
break;
|
||||||
// 暴击伤害
|
// 暴击伤害
|
||||||
case '21103':
|
case '21103':
|
||||||
finalScore = value * 1 * baseScore * 100;
|
finalScore = value * 1 * baseScore * 1;
|
||||||
break;
|
break;
|
||||||
// 穿透值
|
// 穿透值
|
||||||
case '23203':
|
case '23203':
|
||||||
|
|
@ -80,7 +80,7 @@ export const getEquipPropertyScore = (charID, propertyID, value) => {
|
||||||
break;
|
break;
|
||||||
// 异常精通
|
// 异常精通
|
||||||
case '31403':
|
case '31403':
|
||||||
finalScore = value * 0.5 * baseScore * 100;
|
finalScore = value * 0.5 * baseScore * 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -400,14 +400,14 @@ export class ZZZAvatarInfo {
|
||||||
return damagelist;
|
return damagelist;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @type {string|boolean} */
|
/** @type {number|boolean} */
|
||||||
get equip_score() {
|
get equip_score() {
|
||||||
if (hasScoreData(this.id)) {
|
if (hasScoreData(this.id)) {
|
||||||
let score = 0;
|
let score = 0;
|
||||||
for (const equip of this.equip) {
|
for (const equip of this.equip) {
|
||||||
score += equip.score;
|
score += equip.score;
|
||||||
}
|
}
|
||||||
return score.toFixed(2);
|
return score;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,17 @@ export class EquipMainProperty {
|
||||||
}
|
}
|
||||||
return this.score;
|
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 class="comment">{{charData.equip_comment}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<span>{{charData.equip_score}}</span>
|
<span>{{charData.equip_score.toFixed(2)}}</span>
|
||||||
<span class="subt">分</span>
|
<span class="subt">分</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -163,7 +163,7 @@
|
||||||
{{if equip.score !== false}}
|
{{if equip.score !== false}}
|
||||||
<div class="score {{equip.comment}}">
|
<div class="score {{equip.comment}}">
|
||||||
<div class="comment">{{equip.comment}}</div>
|
<div class="comment">{{equip.comment}}</div>
|
||||||
<div class="value">{{equip.score}}</div>
|
<div class="value">{{equip.score.toFixed(2)}}</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="property-list">
|
<div class="property-list">
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
{{each equip.main_properties prop}}
|
{{each equip.main_properties prop}}
|
||||||
<div class="properties main">
|
<div class="properties main">
|
||||||
<div class="prop-icon {{prop.classname}}"></div>
|
<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 class="value">{{prop.base}}</div>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue