🐞 fix(稷下学宫): 修复圣物效果对特性卡权重增加
This commit is contained in:
@@ -601,7 +601,22 @@ export async function getPassiveCardPlan(passiveCardPlan: number, passiveCardRan
|
||||
let newCards = [];
|
||||
let cardsMap = await getCardCount(gameCode, ROUGE_LIKE_CARD_TYPE.PASSIVE);
|
||||
const { chooseCardsMap, noChooseCardsMap } = await getIsChooseCard(gameCode);
|
||||
const holyAddWeight = await getAddPassiveWeight(roleId, gameCode, type);
|
||||
|
||||
let isHolyAddWeight = false;
|
||||
for (let obj of cards) {
|
||||
let { cardId, weight } = obj || {};
|
||||
let passiveCardData = gameData.rougePassiveCard.get(cardId);
|
||||
if (!passiveCardData || !passiveCardData.authorType) continue;
|
||||
if (passiveCardData.authorType == type) {
|
||||
isHolyAddWeight = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
let holyAddWeight = 0;
|
||||
if (isHolyAddWeight) {
|
||||
holyAddWeight = await getAddPassiveWeight(roleId, gameCode, type);
|
||||
}
|
||||
|
||||
for (let obj of cards) {
|
||||
let weightRecord: { originalWight?: number, passiveRedWight?: number, holyAddWeight?: number, passiveLableNum?: number, authorAddWeight?: number, passiveLableNumAddWeight?: number, finalWeight?: number } = {};
|
||||
if (!obj) continue;
|
||||
@@ -624,12 +639,11 @@ export async function getPassiveCardPlan(passiveCardPlan: number, passiveCardRan
|
||||
weightRecord.passiveRedWight = Math.floor(weight * ROUGELIKE.RANDOM_PASSIVECARD_WEIGHT / 100);
|
||||
}
|
||||
|
||||
|
||||
weight += holyAddWeight;
|
||||
weightRecord.holyAddWeight = holyAddWeight;
|
||||
|
||||
const { authorType = 0, quality = 0, lv = 0 } = passiveCardData;
|
||||
if (authorType == type) {
|
||||
weight += holyAddWeight;
|
||||
weightRecord.holyAddWeight = holyAddWeight;
|
||||
|
||||
const passiveWeightData = gameData.rougePassiveWeight.get(authorType + '_' + quality + '_' + lv);
|
||||
if (passiveWeightData && passiveWeightData.authorTypeWeightAdd) {
|
||||
weight += passiveWeightData.authorTypeWeightAdd;
|
||||
|
||||
Reference in New Issue
Block a user