装备:天晶属性随机

This commit is contained in:
luying
2022-05-18 13:19:41 +08:00
parent dde22ee972
commit b39dea32bb

View File

@@ -421,11 +421,11 @@ export function getJewelRandSe(id: number, seid: number) {
let planPool = gameData.randomEffectPoolPlan.get(dicRandom.planId);
if(planPool && planPool.length > 0) {
let result = getRandEelmWithWeight(planPool);
if(result) rand = result.dic.num;
if(result) rand = Math.round(result.dic.num * 100)/100;
} else {
let randResult = getRandValueByMinMax(dicRandom.Min, dicRandom.Max, getDecimalCnt(dicRandom.gap));
let n = Math.floor((randResult - dicRandom.Min)/dicRandom.gap);
rand = dicRandom.Min + n * dicRandom.gap;
rand = Math.round(dicRandom.Min + n * dicRandom.gap * 100)/100;
}
return new RandSe(id, dicRandom.id, rand);
}