🐞 fix(巅峰演武): 修改等级计算、2倍碾压

This commit is contained in:
zhangxk
2023-10-13 17:03:06 +08:00
parent 73a44e9828
commit b82d525f7f
5 changed files with 38 additions and 20 deletions

View File

@@ -511,13 +511,16 @@ export async function generMyRecInfo(pvpDefense: PvpDefenseType, role: RoleType,
}
export function calLineupScore(lineup: Attack|Defense, heroScores: HeroScore[]) {
if(!lineup) return lineup;
// if(!lineup) return lineup;
let scores: number[] = [];
for(let { actorId } of lineup.heroes) {
let hs = heroScores.find(cur => cur.hid == actorId);
if(hs) {
scores.push(hs.score);
}
// for(let { actorId } of lineup.heroes) {
// let hs = heroScores.find(cur => cur.hid == actorId);
// if(hs) {
// scores.push(hs.score);
// }
// }
for(let {score} of heroScores){
scores.push(score);
}
let { pLv, score } = getPlvAndScore(scores);
return {...lineup, score, pLv}