diff --git a/src/shared/fightControl/fightDPS.ts b/src/shared/fightControl/fightDPS.ts index 3509d39..6129e1a 100644 --- a/src/shared/fightControl/fightDPS.ts +++ b/src/shared/fightControl/fightDPS.ts @@ -37,7 +37,7 @@ export function getFightDPS(fromRole: FightObj, toRole: FightObj, extData: DPS_E 运算速度 自身速度*随机浮动值 随机浮动值 0.9-1.1(1位小数) (-10,10) */ - + if (fromRole.isDead || toRole.isDead) return { num: 0, dps: 0, miss: false, baoji: false, fromRole: fromRole, toRole: toRole }; let miss = false, baoji = false, dps = 0; let fromRoleLv = fromRole.getData('lv'), toRoleLv = toRole.getData('lv'); @@ -182,6 +182,18 @@ export function getBuffDPS(toRole: FightObj, fromRole: FightObj, extData: { xiao // todo 主角技能还没有限制百分比的最大伤害,以下判断修复技能buff没有伤害 if (fromRole.getData('pos') != 7){ dps = dps > maxDps ? maxDps : dps; + } else { + // 主角技能伤害最大值: avg(所有上场干部的maxDps) * 2 + let sumHeroMaxDps = 0, heroCount = 0; + const fromRoleSide = fromRole.getData('side'); + fromRole.fightControl.fightRolesArr.forEach(role => { + if (role.getData('pos') < 7 && role.getData('side') === fromRoleSide) { + sumHeroMaxDps += role.getData('maxdps'); + heroCount++; + } + }); + maxDps = sumHeroMaxDps / heroCount * 2; + dps = dps > maxDps ? maxDps : dps; } return { num: -dps, dps: -dps, miss: miss, baoji: baoji, fromRole: fromRole, toRole: toRole };