{{ item.key | showAttrName }}
- {{ item.val }}
+ {{ item.val }}
@@ -29,9 +31,9 @@
diff --git a/src/service/attr.js b/src/service/attr.js
index 55e56e1..f4cf47c 100644
--- a/src/service/attr.js
+++ b/src/service/attr.js
@@ -537,7 +537,7 @@ class RoleAttribute {
// 主属性闪躲加成
const primaryDodge = this.primaryAttrVal * (XF_FACTOR[kungfu.KungfuID]['dodge_addtional'] || 0);
- console.log('dodge', primaryDodge, equipDodge, (XF_FACTOR[kungfu.KungfuID]['dodge'] || 0))
+ // console.log('dodge', primaryDodge, equipDodge, (XF_FACTOR[kungfu.KungfuID]['dodge'] || 0))
return Math.round(equipDodge + primaryDodge + (XF_FACTOR[kungfu.KungfuID]['dodge'] || 0))
}
@@ -556,7 +556,7 @@ class RoleAttribute {
// 主属性
const primaryParryBase = this.primaryAttrVal * (XF_FACTOR[kungfu.KungfuID]['parryBase_addtional'] || 0);
- console.log('parryBase', equipParryBase, primaryParryBase, (XF_FACTOR[kungfu.KungfuID]['parryBase'] || 0));
+ // console.log('parryBase', equipParryBase, primaryParryBase, (XF_FACTOR[kungfu.KungfuID]['parryBase'] || 0));
return Math.round(equipParryBase + primaryParryBase + (XF_FACTOR[kungfu.KungfuID]['parryBase'] || 0));
}
diff --git a/src/service/gs.js b/src/service/gs.js
index 3f3fa63..b0af43c 100644
--- a/src/service/gs.js
+++ b/src/service/gs.js
@@ -1,16 +1,14 @@
-import {
- equipment_quality_coefficients,
- equipment_position_coefficients,
- stoneScore,
-} from "@/assets/data/gs.json";
+import { equipment_quality_coefficients, equipment_position_coefficients, stoneScore } from "@/assets/data/gs.json";
// 装备分数 = 品质 * 品质系数 * 部位系数
-function getEquipOriginScore(quality, color, position) {
- return ~~(
- Number(quality) *
- Number(equipment_quality_coefficients[color]) *
- Number(equipment_position_coefficients[position])
- );
+function getEquipOriginScore(quality, color, position, mount_id) {
+ const isCJ = [10144, 10145].includes(mount_id);
+ let isWeapon = position == "0" || position == "1";
+ // 藏剑武器折半
+ if (isCJ && isWeapon) {
+ return ~~((Number(quality) * Number(equipment_quality_coefficients[color]) * Number(equipment_position_coefficients[position])) / 2);
+ }
+ return ~~(Number(quality) * Number(equipment_quality_coefficients[color]) * Number(equipment_position_coefficients[position]));
}
// 五彩石分数
@@ -24,46 +22,38 @@ function getFiveStoneScore(stone_level) {
}
// 精炼分数|属性成长
-function getGrowScore(base,strength) {
- return Math.round((~~base * ~~strength * (0.007 + ~~strength * 0.003)) / 2)
+function getGrowScore(base, strength) {
+ return Math.round((~~base * ~~strength * (0.007 + ~~strength * 0.003)) / 2);
}
// 总分数 = 五行石插孔、五彩石、精炼分数 + 装备分数
-function getGS(equip_data) {
- let total_gs = 0
+function getGS(equip_data, mount_id) {
+ let total_gs = 0;
equip_data.forEach((item) => {
- if(item){
-
+ if (item) {
// 装备分数
- let equip_gs = getEquipOriginScore(item.Quality,item.Color,item.UcPos)
- total_gs += equip_gs
+ let equip_gs = getEquipOriginScore(item.Quality, item.Color, item.UcPos, mount_id);
+ total_gs += equip_gs;
// 精炼分数
- total_gs += getGrowScore(equip_gs,~~item.StrengthLevel)
+ total_gs += getGrowScore(equip_gs, ~~item.StrengthLevel);
// 五行石插孔
- if(item.FiveStone){
+ if (item.FiveStone) {
item.FiveStone.forEach((stone) => {
- total_gs += getFiveStoneScore(~~stone.Level)
- })
+ total_gs += getFiveStoneScore(~~stone.Level);
+ });
}
// 五彩石
- if(item.ColorStone){
- total_gs += getColorStoneScore(~~item.ColorStone.Level)
+ if (item.ColorStone) {
+ total_gs += getColorStoneScore(~~item.ColorStone.Level);
}
-
}
- })
+ });
- return Math.floor(total_gs)
+ return Math.floor(total_gs);
}
-export {
- getEquipOriginScore,
- getFiveStoneScore,
- getColorStoneScore,
- getGrowScore,
- getGS,
-};
+export { getEquipOriginScore, getFiveStoneScore, getColorStoneScore, getGrowScore, getGS };