import { readFileAndParse } from '../util'
import { FILENAME } from '../../consts'

export interface DicPvpDifficultRatio {
    readonly id: number;
    readonly teamLineupMin: number;
    readonly teamLineupMax: number;
    readonly value: number;
    readonly enemyLv: number;
    readonly secondAttrLevel: 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;
}