🐞 fix(学宫): 新增圣物效果2008,对使用次数计数
This commit is contained in:
@@ -25,7 +25,7 @@ import { DicRougeHolyCard } from '../../../pubUtils/dictionary/DicRougeHolyCard'
|
|||||||
import { DicRougeSkillCard } from '../../../pubUtils/dictionary/DicRougeSkillCard';
|
import { DicRougeSkillCard } from '../../../pubUtils/dictionary/DicRougeSkillCard';
|
||||||
import { DicRougeOptionGroup } from '../../../pubUtils/dictionary/DicRougeOptionGroup';
|
import { DicRougeOptionGroup } from '../../../pubUtils/dictionary/DicRougeOptionGroup';
|
||||||
import { addItems, getRougeTechScoreObject, handleCost } from '../../../services/role/rewardService';
|
import { addItems, getRougeTechScoreObject, handleCost } from '../../../services/role/rewardService';
|
||||||
import { getEffectWhenGameStart, getCharaHp, getAddCoin, getNoBossRecoveryHp, getBattleRecoveryNum, getRecoveryExtendHp, getTrainCardDiscount, checkCanChooseSkillCard, checkCanReRandomReward } from '../../../services/battle/rougeEffectService';
|
import { getEffectWhenGameStart, getCharaHp, getAddCoin, getNoBossRecoveryHp, getBattleRecoveryNum, getRecoveryExtendHp, getTrainCardDiscount, checkCanChooseSkillCard, checkCanReRandomReward, getEnterGame } from '../../../services/battle/rougeEffectService';
|
||||||
import { RougelikeExtendModel } from '../../../db/RougelikeExtend';
|
import { RougelikeExtendModel } from '../../../db/RougelikeExtend';
|
||||||
import * as util from 'util';
|
import * as util from 'util';
|
||||||
import { DicRougePassiveCard } from '../../../pubUtils/dictionary/DicRougePassiveCard';
|
import { DicRougePassiveCard } from '../../../pubUtils/dictionary/DicRougePassiveCard';
|
||||||
@@ -512,6 +512,8 @@ export class RougeHandler {
|
|||||||
await checkTask(serverId, roleId, sid, TASK_TYPE.ROUGE_BOSS_PASS, { authorType: arrAuthorType[0], count: 1 });
|
await checkTask(serverId, roleId, sid, TASK_TYPE.ROUGE_BOSS_PASS, { authorType: arrAuthorType[0], count: 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await getEnterGame(roleId, gameCode);
|
||||||
|
|
||||||
return resResult(STATUS.SUCCESS, { status, gameCode, detailCode, charas, incCoin });
|
return resResult(STATUS.SUCCESS, { status, gameCode, detailCode, charas, incCoin });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -770,7 +772,7 @@ export class RougeHandler {
|
|||||||
cardId = getRandEelmWithWeight(newCards).dic.cardId;
|
cardId = getRandEelmWithWeight(newCards).dic.cardId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cardId > 0) handleAddFun.pushHolyCard(cardId);
|
if (cardId > 0) handleAddFun.pushHolyCard(cardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = 1;
|
status = 1;
|
||||||
|
|||||||
@@ -460,6 +460,19 @@ export async function getAddPassiveWeight(roleId: string, gameCode: string, auth
|
|||||||
return addPassiveWeight;
|
return addPassiveWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2008
|
||||||
|
export async function getEnterGame(roleId: string, gameCode: string) {
|
||||||
|
let rougeEffect = new RougeEffect(roleId, gameCode);
|
||||||
|
let { newEffect, holyMap } = await rougeEffect.getEffectData([
|
||||||
|
ROUGE_EFFECT_TYPE.HOLY_ENEMY_MAIN_ATTR_DOWN,//2008
|
||||||
|
]);
|
||||||
|
if (newEffect.length == 0) return;
|
||||||
|
for (const { effectParam, cardCode } of newEffect) {
|
||||||
|
if (!getHolyCardIsUse(holyMap.get(cardCode))) continue;
|
||||||
|
await updateHolyUseCount(holyMap.get(cardCode), gameCode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 非boss战斗失败视为胜利,并且满血复活 2009
|
// 非boss战斗失败视为胜利,并且满血复活 2009
|
||||||
export async function getNoBossRecoveryHp(roleId: string, gameCode: string) {
|
export async function getNoBossRecoveryHp(roleId: string, gameCode: string) {
|
||||||
let rougeEffect = new RougeEffect(roleId, gameCode);
|
let rougeEffect = new RougeEffect(roleId, gameCode);
|
||||||
|
|||||||
Reference in New Issue
Block a user