feat(稷下学宫): 修改每周学分进度奖励

This commit is contained in:
zhangxk
2023-09-08 21:25:39 +08:00
parent 7faeeb10e1
commit 77d30f8722
11 changed files with 285 additions and 30 deletions

View File

@@ -0,0 +1,32 @@
/**
* 角色卡奖励卡池方案
*/
import { FILENAME } from "../../consts";
import { readFileAndParse } from "../util";
export interface DicRougeCharaCardPlan {
readonly id: number;
readonly planId: number; // 方案编号
readonly cardId: number; // 角色卡id
readonly weight: number; // 权重
}
export const dicRougeCharaCardPlan = new Map<number, DicRougeCharaCardPlan[]>();
export function loadRougeCharaCardPlan() {
dicRougeCharaCardPlan.clear();
let arr = readFileAndParse(FILENAME.DIC_ROUGE_CHARA_CARD_PLAN);
arr.forEach(o => {
if (!dicRougeCharaCardPlan.has(o.planId)) {
dicRougeCharaCardPlan.set(o.planId, []);
}
dicRougeCharaCardPlan.get(o.planId).push(o);
});
arr = undefined;
}

View File

@@ -0,0 +1,34 @@
/**
* 圣物卡奖励卡池方案
*/
import { FILENAME } from "../../consts";
import { readFileAndParse } from "../util";
export interface DicRougeHolyCardPlan {
readonly id: number;
readonly planId: number; // 方案编号
readonly cardId: number; // 角色卡id
readonly weight: number; // 权重
}
export const dicRougeHolyCardPlan = new Map<number, DicRougeHolyCardPlan[]>();
export function loadRougeHolyCardPlan() {
dicRougeHolyCardPlan.clear();
let arr = readFileAndParse(FILENAME.DIC_ROUGE_HOLY_CARD_PLAN);
arr.forEach(o => {
if (!dicRougeHolyCardPlan.has(o.planId)) {
dicRougeHolyCardPlan.set(o.planId, []);
}
dicRougeHolyCardPlan.get(o.planId).push(o);
});
arr = undefined;
}

View File

@@ -10,18 +10,19 @@ export interface DicRougeScoreReward {
readonly index: number;
readonly score: number; // 积分
readonly reward: RewardInter[]; // 图鉴收集奖励同Group只领取一次奖励
readonly level: number; // 难度等级
}
export const dicRougeScoreReward = new Map<number, DicRougeScoreReward>();
export const dicRougeScoreNum = { num: 0 }
export const dicRougeScoreRewardByLv = new Map<number, Map<number, DicRougeScoreReward>>();
export function loadRougeScoreReward() {
dicRougeScoreReward.clear();
dicRougeScoreRewardByLv.clear();
let arr = readFileAndParse(FILENAME.DIC_ROUGE_SCORE_REWARD);
arr.forEach(o => {
o.reward = parseGoodStr(o.reward);
dicRougeScoreReward.set(o.index, o);
dicRougeScoreNum.num++;
if (!dicRougeScoreRewardByLv.has(o.level)) dicRougeScoreRewardByLv.set(o.level, new Map);
dicRougeScoreRewardByLv.get(o.level).set(o.index, o);
});
arr = undefined;
}