fix 历史战力未获得

This commit is contained in:
luying
2020-12-25 18:21:23 +08:00
parent a27cf802e8
commit 33ea692777
2 changed files with 4 additions and 3 deletions
@@ -5,7 +5,7 @@ import { PvpDefenseModel } from '../db/PvpDefense';
import { getWarJsons, getGamedata, getExpeditionById } from '../pubUtils/gamedata';
import { decodeStr, resResult, setLocalHours, shouldRefresh } from '../pubUtils/util';
import { EXPEDITION_CONST } from '../consts';
import { EXPEDITION_CONST, HERO_CE_RATIO } from '../consts';
import { getAtrrNameById} from '../consts';
import Actor from '../pubUtils/actor';
import { ExpeditionWarRecordModel } from '../db/ExpeditionWarRecord';
@@ -102,7 +102,7 @@ export async function matchRobots(scale: number, myCe: number, robotCe: number,
enemyObj.enemyId = fileName + '';
let allCe = 0;
let ratio = myCe / robotCe * scale; // 玩家战力/机器人初始战力*系数
let ratio = myCe / HERO_CE_RATIO / HERO_CE_RATIO / robotCe * scale; // 玩家战力/机器人初始战力*系数
for(let enemy of dicWarJson) {
if(enemy.relation == 2) {
let attribute = decodeWarJsonAttribute(enemy.attribute); // 格式:{'hp':1000, ...}