/** * 特性卡 */ import { parseNumberList, readFileAndParse } from '../util' import { FILENAME } from '../../consts' export interface DicRougePassiveCard { readonly id: number; readonly group: number; // 同样的group之间才可以特训 readonly lv: number; // 特训等级,可以初始获得不同等级 readonly name: string; readonly quality: number; // 品质 readonly authorType: number; // 所属百家流派,在该流派试炼中出现概率提升 readonly seid: string; // 纯战场、服务器不读 readonly content: string; readonly passiveLabel: number[]; // 关联其他特性卡,获得这个特性卡之后他relationId的概率提升 readonly holyLabel: number[]; // 关联圣物,获得这个特性卡之后圣物概率提升 readonly strengthConsume: number; // 强化消耗 readonly price: number; // 试炼币购买 readonly getLimit: number; //获取上限 } export const dicRougePassiveCard = new Map(); export const dicRougePassiveCardByGroup = new Map(); export function loadRougePassiveCard() { dicRougePassiveCard.clear(); dicRougePassiveCardByGroup.clear(); let arr = readFileAndParse(FILENAME.DIC_ROUGE_PASSIVE_CARD); arr.forEach(o => { o.passiveLabel = parseNumberList(o.passiveLabel); o.holyLabel = parseNumberList(o.holyLabel); dicRougePassiveCard.set(o.id, o); if (!dicRougePassiveCardByGroup.has(o.group)) { dicRougePassiveCardByGroup.set(o.group, []); } dicRougePassiveCardByGroup.get(o.group).push(o); }); arr = undefined; }