pvp:生成对手

This commit is contained in:
luying
2021-10-27 19:40:52 +08:00
parent 7fb13da627
commit 50ea1c45cf
6 changed files with 64 additions and 34 deletions

View File

@@ -0,0 +1,22 @@
import { readFileAndParse, parseGoodStr } from '../util'
import { FILENAME } from '../../consts'
export interface DicPvpDifficultRatio {
readonly id: number;
readonly teamLineupMin: number;
readonly teamLineupMax: number;
readonly value: number;
readonly enemyLv: number;
}
export const dicPvpDifficultRatio = new Array<DicPvpDifficultRatio>();
export function loadPvpDifficultRatio() {
dicPvpDifficultRatio.splice(0, dicPvpDifficultRatio.length);
let arr = readFileAndParse(FILENAME.DIC_PVP_DIFFICULTRATIO);
arr.forEach(o => {
dicPvpDifficultRatio.push(o);
});
arr = undefined;
}