🐞 fix(巅峰演武): 修改等级计算、2倍碾压
This commit is contained in:
@@ -65,10 +65,14 @@ export class Defense {
|
||||
@prop({ required: true, type: () => Combo, _id: false })
|
||||
combo: Combo[]; // 防守阵容的等级
|
||||
|
||||
constructor(heroes: DefenseHero[], scores: number[], warId: number, buff: number, combo: Combo[]) {
|
||||
constructor(heroes: DefenseHero[], scores: number[], warId: number, buff: number, combo: Combo[], heroScores:HeroScore[]) {
|
||||
this.heroes = heroes;
|
||||
this.score = scores.reduce((pre, cur) => pre + cur, 0);
|
||||
let {pLv, score} = getPlvAndScore(scores);
|
||||
let newScores: number[] = [];
|
||||
for(let {score} of heroScores){
|
||||
newScores.push(score);
|
||||
}
|
||||
let {pLv, score} = getPlvAndScore(newScores);
|
||||
this.pLv = pLv,
|
||||
this.score = score;
|
||||
this.warId = warId;
|
||||
@@ -96,10 +100,14 @@ export class Attack {
|
||||
@prop({ required: true })
|
||||
pLv: number; // 防守阵容的等级
|
||||
|
||||
constructor(heroes: AttackHero[], scores: number[]) {
|
||||
constructor(heroes: AttackHero[], scores: number[], heroScores:HeroScore[]) {
|
||||
this.heroes = heroes;
|
||||
this.score = scores.reduce((pre, cur) => pre + cur, 0);
|
||||
let {pLv, score} = getPlvAndScore(scores);
|
||||
let newScores: number[] = [];
|
||||
for(let {score} of heroScores){
|
||||
newScores.push(score);
|
||||
}
|
||||
let {pLv, score} = getPlvAndScore(newScores);
|
||||
this.pLv = pLv;
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user