Files
ZYZ/shared/pubUtils/dictionary/DicPvpOpponent.ts
2021-10-15 18:16:05 +08:00

29 lines
678 B
TypeScript

// pvp三个对手
import {readFileAndParse} 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;
}
export const dicPvpOpponent = new Map<number, DicPvpOpponent>();
export function loadPvpOpponent() {
dicPvpOpponent.clear();
let arr = readFileAndParse(FILENAME.DIC_PVP_OPPONENT);
arr.forEach(o => {
dicPvpOpponent.set(o.id, o);
});
arr = undefined;
}