29 lines
896 B
TypeScript
29 lines
896 B
TypeScript
/**
|
|
* 随机事件配置表
|
|
*/
|
|
|
|
import { readFileAndParse } from '../util'
|
|
import { FILENAME } from '../../consts'
|
|
|
|
export interface DicRougeEventOption {
|
|
readonly id: number;
|
|
readonly randomEventId: number; // 事件id
|
|
readonly optionGroup: number; // 一组选项的组id
|
|
readonly title: string //标题
|
|
readonly index: number; // 选项在他这组里的索引
|
|
readonly text: string; // 选项
|
|
readonly afterGroup: number; // 选了这个选项之后的选项组
|
|
readonly holyCardPlan: number; // 奖励的圣物
|
|
}
|
|
export const dicRougeEventOption = new Map<number, DicRougeEventOption>();
|
|
export function loadRougeEventOption() {
|
|
dicRougeEventOption.clear();
|
|
|
|
let arr = readFileAndParse(FILENAME.DIC_ROUGE_EVENT_OPTION);
|
|
|
|
arr.forEach(o => {
|
|
|
|
dicRougeEventOption.set(o.id, o);
|
|
});
|
|
arr = undefined;
|
|
} |