/** * 随机事件图鉴 */ import { parseGoodStr, readFileAndParse } from '../util' import { FILENAME } from '../../consts' import { RewardInter } from '../interface'; export interface DicRougeScoreReward { readonly index: number; readonly score: number; // 积分 readonly reward: RewardInter[]; // 图鉴收集奖励(同Group只领取一次奖励) } export const dicRougeScoreReward = new Map(); export const dicRougeScoreNum = { num: 0 } export function loadRougeScoreReward() { dicRougeScoreReward.clear(); let arr = readFileAndParse(FILENAME.DIC_ROUGE_SCORE_REWARD); arr.forEach(o => { o.reward = parseGoodStr(o.reward); dicRougeScoreReward.set(o.index, o); dicRougeScoreNum.num++; }); arr = undefined; }