战力:pvp远征战场显示

This commit is contained in:
luying
2021-03-10 16:07:47 +08:00
parent 901995b8ba
commit 1fe2d0f307
6 changed files with 27 additions and 21 deletions
@@ -103,7 +103,7 @@ export async function matchPlayers(roleId: string, scale: number, range: number,
let hero = heroes[heroIndex];
if(hero) {
let h = <HeroType>hero.hero;
let { star, lv, attr: heroAttrs } = h;
let { star, lv, attr: heroAttrs, ce } = h;
let dicHero = gameData.hero.get(hero.actorId);
let newAttribute = getPlayerAttribute(heroAttrs, roleAttrs);
let heroInfo = {
@@ -114,7 +114,8 @@ export async function matchPlayers(roleId: string, scale: number, range: number,
star,
spine: 0,
attribute: newAttribute,
lv
lv,
ce
};
enemyObj.enemies.push({...json, ...heroInfo});
@@ -150,8 +151,8 @@ export async function matchRobots(scale: number, myCe: number, robotCe: number,
const { attribute } = json;
let newAttribute = getRobotAttribute(attribute, myCe, robotCe, scale);
let ce = newAttribute.calCe();
enemyObj.enemies.push({...json, attribute: newAttribute, lv});
let ce = newAttribute.ce;
enemyObj.enemies.push({...json, attribute: newAttribute, lv, ce});
allCe += ce;
}
}