/** * 每层可随机到的奖励 */ import { parseGoodStr, readFileAndParse } from '../util' import { FILENAME } from '../../consts' export interface DicRougeLayerRewardPlan { readonly id: number; readonly planId: number; readonly nodeType: number; // 精英关、普通关、boss关、挑战、随机事件、休整点 readonly charaPlan: number; // 角色卡 readonly charaRandomNum: number; // 玩家可以随机出多少奖励 readonly charaChooseNum: number; // 玩家可以从随机出的里选择多少奖励 readonly charaPassivePlan: number; // 高级卡自带的特性卡 readonly passiveCardPlan: number; // 特性卡 readonly passiveCardRandomNum: number; // 玩家可以随机出多少奖励 readonly passiveCardChooseNum: number; // 玩家可以从随机出的里选择多少奖励 readonly holyCardPlan: number; // 圣物 readonly holyCardRandomNum: number; // 玩家可以随机出多少奖励 readonly holyCardChooseNum: number; // 玩家可以从随机出的里选择多少奖励 readonly coin: number; // 试炼币 readonly score: number; // 学分 readonly tech: number; // 科技点 // readonly goods: RewardInter[]; // 灵石 物品表id&count } export const dicRougeLayerRewardPlan = new Map(); export function loadRougeLayerRewardPlan() { dicRougeLayerRewardPlan.clear(); let arr = readFileAndParse(FILENAME.DIC_ROUGE_LAYER_REWARD_PLAN); arr.forEach(o => { o.goods = parseGoodStr(o.goods); dicRougeLayerRewardPlan.set(o.planId + '_' + o.nodeType, o); }); arr = undefined; }