战力:pvp远征战场显示
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ async function generPlayerOppHis(pvpdefense: PvpDefenseType, mapWarJson: DicWarJ
|
||||
heroInfo.setOutIndex(h.order);
|
||||
let attribute = getPlayerAttribute(dbHero.attr, role.attr);
|
||||
heroInfo.setAttribute(attribute);
|
||||
let enemy = new PvpEnemies(warJson, heroInfo, hs?hs.score: 0);
|
||||
let enemy = new PvpEnemies(warJson, heroInfo, hs?hs.score: 0, attribute.ce);
|
||||
heroes.push(enemy);
|
||||
}
|
||||
} else {
|
||||
@@ -260,9 +260,9 @@ async function matchRobot(oppPlayers: OppPlayers[], mapWarJson: DicWarJson[], ro
|
||||
let heroInfo = new PvpHeroInfo();
|
||||
heroInfo.setRobotInfo(h, myLv, dicHero.initialStars, dicHero.quality);
|
||||
let attribute = getRobotAttribute(h.attribute, myCe, PVP_CONST.ENEMY_CE, ratio);
|
||||
defCe += attribute.ce;
|
||||
defCe += attribute.ce
|
||||
heroInfo.setAttribute(attribute);
|
||||
let enemy = new PvpEnemies(warJson, heroInfo, 0);
|
||||
let enemy = new PvpEnemies(warJson, heroInfo, 0, attribute.ce);
|
||||
heroes.push(enemy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user