✨ feat(稷下学宫): ff931afe4到7421822f6
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* 试炼难度配置表
|
||||
*/
|
||||
|
||||
import { parseGoodStr, readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicRougeLayerPlan {
|
||||
readonly id: number;
|
||||
readonly planId: number; // 试炼类型
|
||||
readonly layerIndex: number; // 层
|
||||
readonly nodeNumPlan: number; // 每层可以随机的点的数量
|
||||
readonly nodePlan: number; // 每层可以随机到的节点
|
||||
readonly rewardPlan: number; // 每层可以赠送的奖励
|
||||
readonly shopPlan: number; // 该层可以随机到的商店方案
|
||||
readonly takeoutReward: RewardInter[]; //额外奖励
|
||||
readonly spiritPlan: number; //英灵随机奖励
|
||||
}
|
||||
export const dicRougeLayerPlan = new Map<string, DicRougeLayerPlan>();
|
||||
export const dicRougeLayerPlanByPlanId = new Map<number, DicRougeLayerPlan[]>();
|
||||
|
||||
export function loadRougeLayerPlan() {
|
||||
dicRougeLayerPlan.clear();
|
||||
dicRougeLayerPlanByPlanId.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_ROUGE_LAYER_PLAN);
|
||||
|
||||
arr.forEach(o => {
|
||||
|
||||
o.takeoutReward = parseGoodStr(o.takeoutReward);
|
||||
dicRougeLayerPlan.set(o.planId + '_' + o.layerIndex, o);
|
||||
|
||||
if (!dicRougeLayerPlanByPlanId.get(o.planId)) dicRougeLayerPlanByPlanId.set(o.planId, []);
|
||||
dicRougeLayerPlanByPlanId.get(o.planId).push(o);
|
||||
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user