30 lines
901 B
TypeScript
30 lines
901 B
TypeScript
/**
|
|
* 技能卡
|
|
*/
|
|
|
|
import { parseGoodStr, readFileAndParse } from '../util'
|
|
import { FILENAME } from '../../consts'
|
|
import { RewardInter } from '../interface';
|
|
|
|
export interface DicRougeSkillCard {
|
|
readonly id: number;
|
|
readonly name: string;
|
|
readonly quality: number; // 品质
|
|
readonly skillType: number; // 技能类型
|
|
readonly authorType: number; // 所属百家流派,在该流派试炼中出现概率提升
|
|
readonly skillId: number; // 战场技能
|
|
readonly collectReward: RewardInter[];
|
|
}
|
|
|
|
export const dicRougeSkillCard = new Map<number, DicRougeSkillCard>();
|
|
export function loadRougeSkillCard() {
|
|
dicRougeSkillCard.clear();
|
|
|
|
let arr = readFileAndParse(FILENAME.DIC_ROUGE_SKILL_CARD);
|
|
|
|
arr.forEach(o => {
|
|
o.collectReward = parseGoodStr(o.collectReward);
|
|
dicRougeSkillCard.set(o.id, o);
|
|
});
|
|
arr = undefined;
|
|
} |