给战力增加默认值防止缺少字段
This commit is contained in:
@@ -25,7 +25,7 @@ export function getRandComBtlRobots(topFiveCe: number, lv: number, cnt: number)
|
||||
// 创建并添加机器人
|
||||
let robotStArr = [], robotIdArr = [];
|
||||
for (let robot of robotHeroes) {
|
||||
const robotCe = getRandValue(topFiveCe, COM_BATTLE_ROBOT_CE_RATIO, 0);
|
||||
const robotCe = getRandValue(topFiveCe || 0, COM_BATTLE_ROBOT_CE_RATIO, 0);
|
||||
const robotLv = getRandValue(lv, COM_BATTLE_ROBOT_CE_RATIO, 0);
|
||||
const imgHid = robot[Math.floor(Math.random() * robot.length)];
|
||||
const { robotRoleId, robotRoleName } = COM_BATTLE_ROBOT_ID_NAME[Math.floor(Math.random() * COM_BATTLE_ROBOT_ID_NAME.length)];
|
||||
|
||||
Reference in New Issue
Block a user