寻宝:roleStatus.heroes格式修改
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user