抽卡:修改抽卡奖池逻辑

This commit is contained in:
luying
2022-07-08 14:09:18 +08:00
parent e4d8708898
commit 35c7c57bda
20 changed files with 695 additions and 579 deletions

View File

@@ -0,0 +1,25 @@
import { readFileAndParse } from '../util';
import { GACHA_FLOOR_TYPE, FILENAME } from '../../consts';
export interface DicGachaFloor {
// 保底id
readonly id: number;
// 类型
readonly floorType: GACHA_FLOOR_TYPE;
// 目标武将品质
readonly heroQuality: number;
// 参数
readonly param: number;
}
export const dicGachaFloor = new Map<number, DicGachaFloor>(); // floorId => plans
export function loadGachaFloor() {
dicGachaFloor.clear();
let arr = readFileAndParse(FILENAME.DIC_GACHA_FLOOR);
arr.forEach(o => {
dicGachaFloor.set(o.id, o);
});
arr = undefined;
}