diff --git a/apps/Training.js b/apps/Training.js index 536047e..205ab1f 100644 --- a/apps/Training.js +++ b/apps/Training.js @@ -85,7 +85,22 @@ export class Training extends plugin { return calculatedRole; }); - roleList.sort((a, b) => b.starLevel - a.starLevel || b.phantomData.statistic.totalScore - a.phantomData.statistic.totalScore); + roleList.forEach(role => { + const { phantomData } = role; + phantomData.statistic = { + color: "#a0a0a0", + rank: "N", + totalScore: "N/A", + ...phantomData.statistic + }; + }); + + roleList.sort((a, b) => { + const aScore = parseFloat(a.phantomData.statistic.totalScore) || 0; + const bScore = parseFloat(b.phantomData.statistic.totalScore) || 0; + + return b.starLevel - a.starLevel || bScore - aScore; + }); const imageCard = await Render.render('Template/training/training', { baseData: baseData.data, diff --git a/package.json b/package.json index 3d9145c..78b4dd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waves-plugin", - "version": "1.5.15", + "version": "1.5.16", "description": "基于 Yunzai 的鸣潮游戏数据查询插件", "main": "index.js", "scripts": { diff --git a/resources/Alias/role.yaml b/resources/Alias/role.yaml index 360807a..62f909b 100644 --- a/resources/Alias/role.yaml +++ b/resources/Alias/role.yaml @@ -116,4 +116,7 @@ - yh 椿: - 春 - - c \ No newline at end of file + - c +灯灯: + - 登登 + - dd \ No newline at end of file diff --git "a/resources/Strategy/moealkyne/\347\201\257\347\201\257.jpg" "b/resources/Strategy/moealkyne/\347\201\257\347\201\257.jpg" new file mode 100644 index 0000000..c133a57 Binary files /dev/null and "b/resources/Strategy/moealkyne/\347\201\257\347\201\257.jpg" differ diff --git a/resources/Template/charProfile/charProfile.html b/resources/Template/charProfile/charProfile.html index c649878..7a4e1e1 100644 --- a/resources/Template/charProfile/charProfile.html +++ b/resources/Template/charProfile/charProfile.html @@ -66,10 +66,10 @@ {{if data.roleDetail.data.phantomData.statistic}}
声骸总分
-
+
{{data.roleDetail.data.phantomData.statistic.totalScore.toFixed(2)}}
声骸评级
-
+
{{data.roleDetail.data.phantomData.statistic.rank}}
@@ -93,7 +93,7 @@
谐振 {{data.roleDetail.data.weaponData.resonLevel}} 阶 + style="background: {{data.roleDetail.data.weaponData.color}};">谐振 {{data.roleDetail.data.weaponData.resonLevel}} 阶
{{data.roleDetail.data.weaponData.weapon.weaponEffectName}}
@@ -109,7 +109,7 @@
{{phantom.phantomProp.name.replace("(","(").replace(")",")")}}
{{if phantom.realScore}} -
+
{{phantom.realScore.toFixed(2)}}-{{phantom.rank}}
{{else}}
暂无评分
@@ -124,7 +124,7 @@
{{/each}} {{each phantom.subProps prop}} -
+
{{prop.attributeName}} {{prop.attributeValue}}
diff --git a/resources/Template/training/training.html b/resources/Template/training/training.html index b280804..898c8e6 100644 --- a/resources/Template/training/training.html +++ b/resources/Template/training/training.html @@ -70,11 +70,12 @@ {{/if}}
-
+
{{role.phantomData.statistic.rank}}
- {{role.phantomData.statistic.totalScore.toFixed(2)}} + {{typeof role.phantomData.statistic.totalScore === 'number' ? + role.phantomData.statistic.totalScore.toFixed(2) : role.phantomData.statistic.totalScore}}
diff --git a/resources/Weight/1504.yaml b/resources/Weight/1504.yaml new file mode 100644 index 0000000..8a79c27 --- /dev/null +++ b/resources/Weight/1504.yaml @@ -0,0 +1,56 @@ +baseAttack: 918 +baseDefense: 879 +baseHP: 8500 +subProps: + - name: 暴击伤害 + weight: 1 + - name: 暴击 + weight: 1 + - name: 攻击百分比 + weight: 0.5 + - name: 生命百分比 + weight: 0 + - name: 防御百分比 + weight: 0 + - name: 共鸣效率 + weight: 0.2 + - name: 普攻伤害加成 + weight: 0.4 + - name: 重击伤害加成 + weight: 0 + - name: 共鸣技能伤害加成 + weight: 0 + - name: 共鸣解放伤害加成 + weight: 0.1 +mainProps: + C4: + - name: 暴击伤害 + weight: 0.5 + - name: 暴击 + weight: 0.5 + - name: 治疗效果加成 + weight: 0 + - name: 生命百分比 + weight: 0 + - name: 攻击百分比 + weight: 0.25 + - name: 防御百分比 + weight: 0 + C3: + - name: 伤害加成 + weight: 0.75 + - name: 攻击百分比 + weight: 0.75 + - name: 生命百分比 + weight: 0 + - name: 防御百分比 + weight: 0 + - name: 共鸣效率 + weight: 0.6 + C1: + - name: 攻击百分比 + weight: 1 + - name: 防御百分比 + weight: 0 + - name: 生命百分比 + weight: 0 \ No newline at end of file diff --git a/resources/Weight/1603.yaml b/resources/Weight/1603.yaml index 743f1f7..5e9b6cc 100644 --- a/resources/Weight/1603.yaml +++ b/resources/Weight/1603.yaml @@ -46,7 +46,7 @@ mainProps: - name: 防御百分比 weight: 0 - name: 共鸣效率 - weight: 0.75 + weight: 0 C1: - name: 攻击百分比 weight: 1 diff --git a/resources/Weight/weight.yaml b/resources/Weight/weight.yaml index c6f39cf..1c19636 100644 --- a/resources/Weight/weight.yaml +++ b/resources/Weight/weight.yaml @@ -1,4 +1,4 @@ -version: 1.0.2 +version: 1.0.3 subProps: - name: 暴击伤害 max: 21 diff --git a/utils/Calculate.js b/utils/Calculate.js index fd581ca..d074fea 100644 --- a/utils/Calculate.js +++ b/utils/Calculate.js @@ -28,12 +28,12 @@ class WeightCalculator { }); const weaponColors = { - 5: "background:#9d2933;", - 4: "background:#9f00ed;", - 3: "background:#6640ff;", - 2: "background:#00D200;" + 5: "#9d2933", + 4: "#9f00ed", + 3: "#6640ff", + 2: "#00D200" }; - this.roleDetail.weaponData.color = weaponColors[this.roleDetail.weaponData.resonLevel] || "background:#a0a0a0;"; + this.roleDetail.weaponData.color = weaponColors[this.roleDetail.weaponData.resonLevel] || "#a0a0a0"; if (!fs.existsSync(this.roleWeightPath)) { return this.roleDetail; @@ -213,22 +213,22 @@ class WeightCalculator { } calStyle(weight) { - return weight > 0.5 ? "color:#9d2933;" - : weight > 0 ? "color:#057748;" - : "color:#a0a0a0;"; + return weight > 0.5 ? "#9d2933" + : weight > 0 ? "#057748" + : "#a0a0a0"; } calRank(score) { const ranks = [ - { minScore: 22, name: "MAX", color: "color:#9d2933;" }, - { minScore: 19, name: "ACE", color: "color:#f08a5d;" }, - { minScore: 17, name: "SSS", color: "color:#eec900;" }, - { minScore: 15, name: "SS", color: "color:#eec900;" }, - { minScore: 12, name: "S", color: "color:#eec900;" }, - { minScore: 9, name: "A", color: "color:#9f00ed;" }, - { minScore: 6, name: "B", color: "color:#6640ff;" }, - { minScore: 3, name: "C", color: "color:#00D200;" }, - { minScore: 0, name: "D", color: "color:#a0a0a0;" }, + { minScore: 22, name: "MAX", color: "#9d2933" }, + { minScore: 19, name: "ACE", color: "#f08a5d" }, + { minScore: 17, name: "SSS", color: "#eec900" }, + { minScore: 15, name: "SS", color: "#eec900" }, + { minScore: 12, name: "S", color: "#eec900" }, + { minScore: 9, name: "A", color: "#9f00ed" }, + { minScore: 6, name: "B", color: "#6640ff" }, + { minScore: 3, name: "C", color: "#00D200" }, + { minScore: 0, name: "D", color: "#a0a0a0" }, ]; for (const rank of ranks) {