寻宝:roleStatus.heroes格式修改

This commit is contained in:
luying
2021-08-13 20:16:12 +08:00
parent 96042737d3
commit 899fc4aef6
4 changed files with 55 additions and 13 deletions
+4 -2
View File
@@ -230,7 +230,9 @@ function updateRobotKilled(bossHp: number, roleSt: RoleStatus) {
const dmgProgress = Math.floor(roleSt.totalDmg / (robotTotalHurt / roleSt.heroes.length));
if (dmgProgress > roleSt.killed.length && dmgProgress <= roleSt.heroes.length) {
const newKilledCnt = dmgProgress - roleSt.killed.length;
const aliveHeroes = difference(roleSt.heroes, roleSt.killed);
const aliveHeroes = roleSt.heroes.filter(hero => {
return roleSt.killed.indexOf(hero.id) == -1;
}).map(cur => cur.id);
const newKilledHeroes = getRandEelm(aliveHeroes, newKilledCnt);
roleSt.killed = roleSt.killed.concat(newKilledHeroes);
}
@@ -358,7 +360,7 @@ export function comBtlLvInvalid(lv: number, lvRange: number) {
const range = gameData.comBtlLvRange.get(lvRange);
if (!range) return true;
let { min, max } = range;
return lv >= min && lv <= max;
return lv < min || lv > max;
}
export async function dismissTeam(teamStatus: MemComBtlTeam, teamMap: Map<string, MemComBtlTeam>, roleId: string, teamDisTimer: Map<string, NodeJS.Timer>, channel) {