装备精炼,洗炼,缺少消耗

This commit is contained in:
luying
2020-12-18 13:56:12 +08:00
parent 329d59b6cc
commit b39c9bdc8b
14 changed files with 490 additions and 51 deletions
+2 -2
View File
@@ -40,11 +40,11 @@ export async function addEquips(roleId: string, roleName: string, weapon: EquipI
let randSe = new Array<RandSe>();
for(let i = 0; i < randomNum; i++) {
pool = pool.filter(cur => !chosen.includes(cur.id));
console.log(JSON.stringify(pool))
let random = getRandomByLen(pool);
if(!random) break;
chosen.push(random.id);
let rand = 0;
if(random.id > 0) rand = Math.floor(Math.random() * (random.max - random.min) + random.min);
if(random.id > 0) rand = Math.floor(Math.random() * (random.Max - random.Min) + random.Min);
randSe.push({
id: i + 1,
seid: random.id,