// 武将特技表 import { readFileAndParse, parseNumberList } from '../util' import { FILENAME } from '../../consts' export interface DicRandomEffectPool { // 特技id readonly id: number; // 类型 readonly type: number; // 包含的值 readonly gainValueArr: Array; // 随机值位置 readonly index: number; // 随机最小值 readonly Min: number; // 随机最大值 readonly Max: number; } export const dicRandomEffectPool = new Map(); export function loadRandomEffectPool() { let arr = readFileAndParse(FILENAME.DIC_RANDOM_EFFECT_POOL); arr.forEach(o => { o.gainValueArr = parseNumberList(o.gainValue) dicRandomEffectPool.set(o.id, o); }); arr = undefined; }