战力:修复bug

This commit is contained in:
luying
2022-03-30 21:19:08 +08:00
parent 22b42fd5d6
commit b4ac87d8f5
5 changed files with 31 additions and 16 deletions
+9 -6
View File
@@ -246,7 +246,7 @@ export class CalCe {
for(let { lv, seid } of dicHeroTalent.level) {
if(level >= lv) {
if(!seids.has(id)) seids.set(id, []);
seids.get(id).push(seid);
seids.get(id).push(seid, 0);
}
}
}
@@ -382,13 +382,15 @@ export class CalCe {
// 神像相关
public setTeraph(teraphs: Teraph[]) {
this.data.clearRoleAttr('teraph');
let teraphOfAttrId = new Map<number, number>();
for(let teraph of teraphs) {
for(let [attrId, value] of teraph.attr) { // 主属性
addToMap(teraphOfAttrId, attrId, value);
}
let dicTeraph = getTeraph(teraph.id, teraph.grade);
for(let [attrId, value] of teraph.attr) { // 主属性
let basic = dicTeraph.basicAttrValue.get(attrId)||0;
addToMap(teraphOfAttrId, attrId, value + basic);
}
for(let [attrId, value] of dicTeraph.assiAttrValue) { // 次属性
addToMap(teraphOfAttrId, attrId, value);
}
@@ -445,7 +447,8 @@ export class CalCe {
}
// console.log('effectList', JSON.stringify(effectList));
for (let { type, gainValueArr: [ability, value] } of effectList) {
for (let { type, id, gainValueArr: [ability, value] } of effectList) {
// console.log('##### addToMap type', type, 'id', id, 'ability', ability, 'value', value)
if (type == SEID_TYPE.FIX) { // 加值
addToMap(fixUp, ability, value);
} else if (type == SEID_TYPE.MAIN_RATIO||type == SEID_TYPE.MAIN_RATIO_2) { // 主属性加百分比
@@ -454,7 +457,7 @@ export class CalCe {
}
} else if (type == SEID_TYPE.SUB_RATIO||type == SEID_TYPE.SUB_RATIO_2) { // 次级属性加百分比
if(!ABI_TYPE_MAIN.includes(ability)) {
addToMap(ratioUp, ability, value * 100);
addToMap(ratioUp, ability, value);
}
}