/** * 圣物 */ 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(); 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; }