Files
ZYZ/shared/pubUtils/dictionary/DicSe.ts
2020-12-16 16:47:29 +08:00

30 lines
654 B
TypeScript

// 武将特技表
import { readJsonFile, parseNumberList } from '../util'
import { FILENAME } from '../../consts'
export interface DicSe {
// 特技id
readonly id: number;
// 特技名
readonly name: string;
// 类型
readonly type: number;
// 是否显示
readonly isShow: number;
// 包含的值
readonly gainValueArr: Array<number>;
// 最大触发数
readonly maxOnlyNum: number;
}
const str = readJsonFile(FILENAME.DIC_SE);
let arr = JSON.parse(str);
export const dicSe = new Map<number, DicSe>();
arr.forEach(o => {
o.gainValueArr = parseNumberList(o.gainvalue)
dicSe.set(o.id, o);
});