更新json和部分dictionary定义

This commit is contained in:
luying
2021-01-06 17:16:15 +08:00
parent 44ebf774b9
commit 514a8de340
25 changed files with 4240 additions and 28 deletions
@@ -0,0 +1,27 @@
// pvp三个对手
import {readJsonFile} from '../util'
import { FILENAME } from '../../consts'
export interface DicPvpOpponent {
// id
readonly id: number;
// 战胜可得积分
readonly score: number;
// 匹配对手最高等级
readonly maxLv: number;
// 匹配对手最低等级
readonly minLv: number;
// 系数
readonly ratio: number;
}
const str = readJsonFile(FILENAME.DIC_PVP_OPPONENT);
let arr = JSON.parse(str);
export const dicPvpOpponent = new Map<number, DicPvpOpponent>();
arr.forEach(o => {
dicPvpOpponent.set(o.id, o);
});
arr = undefined;