寻宝:机器人信息直接随机
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { EquipPrintDropType, EquipPrintDropModel } from './../db/EquipPrintDrop';
|
||||
import { FriendPointModel } from './../db/FriendPoint';
|
||||
import { STATUS } from './../consts/statusCode';
|
||||
import { COM_BATTLE_ROBOT_ID_NAME, COM_TEAM_STATUS, CURRENCY_BY_TYPE, CURRENCY_TYPE, FRIEND_DROP_TYPE, COM_BTL_CONST, FRIEND_DROP_MAX } from './../consts';
|
||||
import { COM_TEAM_STATUS, CURRENCY_BY_TYPE, CURRENCY_TYPE, FRIEND_DROP_TYPE, COM_BTL_CONST, FRIEND_DROP_MAX } from './../consts';
|
||||
import { RoleStatus, ComBattleTeamModel } from './../db/ComBattleTeam';
|
||||
import { getBluePrtByQuality, getComBtlSetByQuality, getRewardByBlueprtId, getWarById, getWarIdByBlueprtId, comBtlRangeInfo } from "../pubUtils/gamedata";
|
||||
import { getRandEelm, getRandValue, resResult, ratioReward, getRandValueByMinMax, getRandomWithWeight, decodeStr } from "../pubUtils/util";
|
||||
import { getRandEelm, getRandValue, resResult, ratioReward, getRandValueByMinMax, getRandomWithWeight, decodeStr, getRobotInfo } from "../pubUtils/util";
|
||||
import { getRandRobot } from "./battleService";
|
||||
import { difference, omit } from 'underscore';
|
||||
import { Channel } from 'pinus';
|
||||
@@ -29,7 +29,10 @@ export function getRandBlueprtId(qualityArr: Array<number>, cnt = 1) {
|
||||
|
||||
export function getRandComBtlRobots(topFiveCe: number, ceLimit: number, lv: number, cnt: number) {
|
||||
let robotHeroes = getRandRobot(cnt); // 随机几个阵容
|
||||
let robotInfos = getRandEelm(COM_BATTLE_ROBOT_ID_NAME, cnt); // 随机几个阵容
|
||||
let robotInfos = []; // 随机几个机器人信息
|
||||
for (let i = 0; i < cnt; i++) {
|
||||
robotInfos.push(getRobotInfo());
|
||||
}
|
||||
// 创建并添加机器人
|
||||
let robotStArr = [], robotIdArr = [];
|
||||
if (robotHeroes && robotInfos && robotHeroes.length && robotInfos.length && robotInfos.length === robotHeroes.length) {
|
||||
|
||||
Reference in New Issue
Block a user