关卡:主公经验和等级挂钩
This commit is contained in:
25
shared/pubUtils/dictionary/DicKingExpRatio.ts
Normal file
25
shared/pubUtils/dictionary/DicKingExpRatio.ts
Normal 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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user