关卡:主公经验和等级挂钩

This commit is contained in:
luying
2021-08-27 14:40:38 +08:00
parent cbc4087a5b
commit d71767dfca
9 changed files with 49 additions and 38 deletions

View File

@@ -0,0 +1,25 @@
// 任务奖励主公经验
import { readFileAndParse, } from '../util'
import { FILENAME, KING_EXP_RATIO_TYPE, } from '../../consts'
export interface DicKingExpRatio {
// 主公等级
readonly lv: number;
// 主公经验
readonly exp: number;
// 关卡获得的武将经验
readonly expGk: number;
}
export const dicKingExpRatio = new Map<number, Map<KING_EXP_RATIO_TYPE, number>>();
export function loadKingExpRatio() {
let arr1 = readFileAndParse(FILENAME.DIC_EXP_RATIO);
arr1.forEach(o => {
let map = new Map<KING_EXP_RATIO_TYPE, number>();
map.set(KING_EXP_RATIO_TYPE.TASK, o.exp);
map.set(KING_EXP_RATIO_TYPE.BATTLE, o.expGk);
dicKingExpRatio.set(o.lv, map);
});
arr1 = undefined;
}

View File

@@ -1,20 +0,0 @@
// 任务奖励主公经验
import { readFileAndParse, } from '../util'
import { FILENAME, } from '../../consts'
export interface DicTaskExp {
// 主公等级
readonly lv: number;
// 主公经验
readonly exp: number;
}
export const dicTaskExp = new Map<number, number>();
export function loadTskExp() {
let arr1 = readFileAndParse(FILENAME.DIC_TASK_EXP);
arr1.forEach(o => {
dicTaskExp.set(o.lv, o.exp);
});
arr1 = undefined;
}