Files
ZYZ/shared/pubUtils/dictionary/DicRougeHolyCard.ts
2023-08-30 11:02:52 +08:00

38 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 圣物
*/
import { parseGoodStr, parseNumberList, readFileAndParse } from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
export interface DicRougeHolyCard {
readonly id: number;
readonly name: string;
readonly imageName: string;
readonly quality: number; // 品质
readonly authorType: number; // 所属百家流派
readonly skillId: number; // ?待解释,可能是战场技能
readonly content: string;
readonly useCount: number;
readonly label: number; // 当获得同标签的百家特性卡达到X个同标签的圣物获得概率增加
readonly purchasePrice: number; // 试炼币购买
readonly collectReward: RewardInter[];
readonly effectId: number[];
readonly getLimit: number; //获取上限
}
export const dicRougeHolyCard = new Map<number, DicRougeHolyCard>();
export function loadRougeHolyCard() {
dicRougeHolyCard.clear();
let arr = readFileAndParse(FILENAME.DIC_ROUGE_HOLY_CARD);
arr.forEach(o => {
o.collectReward = parseGoodStr(o.collectReward);
o.effectId = parseNumberList(o.effectId);
dicRougeHolyCard.set(o.id, o);
});
arr = undefined;
}