// 武将特技表 import { readJsonFile, 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; } const str = readJsonFile(FILENAME.DIC_RANDOM_EFFECT_POOL); let arr = JSON.parse(str); export const dicRandomEffectPool = new Map(); arr.forEach(o => { o.gainValueArr = parseNumberList(o.gainValue) dicRandomEffectPool.set(o.id, o); });