diff --git a/model/Enka/formater.js b/model/Enka/formater.js index 1895039..6b9b7b1 100644 --- a/model/Enka/formater.js +++ b/model/Enka/formater.js @@ -410,6 +410,26 @@ export class Property { property.final = property.base + property.add; } } + if (this.info.avatar_profession === 6) { + delete properties[231], delete properties[232]; + delete properties[305]; + const sheerForce = Math.trunc(properties[111].final * 1 / 10) + + Math.trunc(properties[121].final * 3 / 10); + properties[19] = { + property_name: '贯穿力', + property_id: 19, + base: 0, + add: sheerForce, + final: sheerForce + }; + properties[20] = { + property_name: '闪能自动累积', + property_id: 20, + base: 2, + add: 0, + final: 2 + }; + } if (sp && sp.initial_after_format) { sp.initial_after_format(properties, this); } @@ -496,35 +516,10 @@ const special = { properties[121].add += Math.trunc(value); } }, - 1371: { - id: 1371, - name: '仪玄', - initial_after_format: (properties) => { - delete properties[231], delete properties[232]; - delete properties[305]; - const sheerForce = Math.trunc(properties[111].final * 1 / 10) + - Math.trunc(properties[121].final * 3 / 10); - properties[19] = { - property_name: '贯穿力', - property_id: 19, - base: 0, - add: sheerForce, - final: sheerForce - }; - properties[20] = { - property_name: '闪能自动累积', - property_id: 20, - base: 2, - add: 0, - final: 2 - }; - } - }, 1441: { id: 1441, name: '狛野真斗', initial_after_format: (properties) => { - special[1371].initial_after_format(properties, {}); properties[20] = { property_name: '闪能自动累积', property_id: 20, @@ -533,5 +528,5 @@ const special = { final: 0 }; } - } + }, }; diff --git a/model/Enka/formater.ts b/model/Enka/formater.ts index d746750..989c16c 100644 --- a/model/Enka/formater.ts +++ b/model/Enka/formater.ts @@ -474,6 +474,28 @@ export class Property { property.final = property.base + property.add } } + // 命破特殊处理 + if (this.info.avatar_profession === 6) { + delete properties[231], delete properties[232] + delete properties[305] + const sheerForce = + Math.trunc(properties[111].final * 1 / 10) + + Math.trunc(properties[121].final * 3 / 10) + properties[19] = { + property_name: '贯穿力', + property_id: 19, + base: 0, + add: sheerForce, + final: sheerForce + } + properties[20] = { + property_name: '闪能自动累积', + property_id: 20, + base: 2, + add: 0, + final: 2 + } + } // 格式化后特殊处理 if (sp && sp.initial_after_format) { sp.initial_after_format(properties, this) @@ -579,37 +601,10 @@ const special: Record { - delete properties[231], delete properties[232] - delete properties[305] - const sheerForce = - Math.trunc(properties[111].final * 1 / 10) + - Math.trunc(properties[121].final * 3 / 10) - properties[19] = { - property_name: '贯穿力', - property_id: 19, - base: 0, - add: sheerForce, - final: sheerForce - } - properties[20] = { - property_name: '闪能自动累积', - property_id: 20, - base: 2, - add: 0, - final: 2 - } - } - }, 1441: { id: 1441, name: '狛野真斗', initial_after_format: (properties) => { - // 贯穿力处理与仪玄相同 - special[1371].initial_after_format!(properties, {} as any) properties[20] = { property_name: '闪能自动累积', property_id: 20, @@ -618,5 +613,5 @@ const special: Record