武将攻略:武将对比

This commit is contained in:
luying
2022-07-09 10:13:49 +08:00
parent c1eceaeba5
commit 11692c9a56
8 changed files with 84 additions and 8 deletions
+12
View File
@@ -73,6 +73,18 @@ export class CalCe {
return result;
}
public calSingleGlobalPartCe(hid: number, field: 'teraph'|'scroll') {
let arr: { id: number, val: number }[] = [];
for(let [attrId, globalAttr] of this.data.globalAttrs) {
arr.push({ id: attrId, val: globalAttr[field]||0 });
}
let lv = this.data.heroLv.get(hid)||1;
let obj = new AttributeCal();
obj.setLv(lv);
obj.setByWarJson(arr);
return obj.calCe();
}
public getCeInc() {
let ceResult = this.calHeroCe();
// console.log('##### ceResult', ceResult, 'originCes', this.originCes)