Skip to content

Commit 536f8df

Browse files
committed
fix: fix incorrect morale consumption calculation when crafting chip materials
1 parent 67deff4 commit 536f8df

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/data/changelog.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
[
2+
{
3+
"time": "2025-11-01",
4+
"changes": ["【精英材料计算】修复芯片类材料合成时心情消耗计算错误的问题"]
5+
},
26
{
37
"time": "2025-09-20",
48
"changes": [

src/views/Material/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,11 +958,15 @@ export default defineComponent({
958958
};
959959
return _.mapValues(this.materialTypeGroup, materials => {
960960
return _.sumBy(materials, ({ name, type, rare, formulaType }) => {
961+
if (formulaType !== 'WORKSHOP') return 0;
961962
const calcRare =
962963
type === MaterialTypeEnum.SKILL_SUMMARY || type === MaterialTypeEnum.CHIP
963964
? rare - 1
964965
: rare;
965-
return formulaType === 'WORKSHOP' ? this.gaps[name][1] * moraleMap[calcRare] : 0;
966+
const madeCount = this.gaps[name][1];
967+
const prodNum = this.syntProdNum(name);
968+
const syntTimes = prodNum > 0 ? madeCount / prodNum : 0;
969+
return syntTimes * moraleMap[calcRare];
966970
});
967971
});
968972
},

0 commit comments

Comments
 (0)