✨ feat(gvg): 复活队伍
This commit is contained in:
@@ -337,6 +337,7 @@ export const gameData = {
|
||||
gvgBattleDurabilityMinus: { win: 0, fail: 0 },
|
||||
gvgTeamDurability: new Map<number, number>(),
|
||||
gvgPointByAreaId: dicGVGPointsByAreaId,
|
||||
gvgReviveGold: new Map<number|'max', number>(),
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -1230,6 +1231,21 @@ function parseGVGTeamDurability() {
|
||||
|
||||
}
|
||||
|
||||
function parseGVGReviveCoin() {
|
||||
let arr = decodeArrayListStr(param.GVG.GVG_REVIVE_GOLD);
|
||||
for(let [_cnt, _gold] of arr) {
|
||||
let cnt = parseInt(_cnt);
|
||||
let gold = parseInt(_gold);
|
||||
gameData.gvgReviveGold.set(cnt, gold);
|
||||
gameData.gvgReviveGold.set('max', gold);
|
||||
}
|
||||
}
|
||||
|
||||
export function getReviveGold(cnt: number) {
|
||||
if(gameData.gvgReviveGold.has(cnt)) return gameData.gvgReviveGold.get(cnt)||0;
|
||||
return gameData.gvgReviveGold.get('max')||0;
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
function initDatas() {
|
||||
parseDicParam();
|
||||
@@ -1255,6 +1271,7 @@ function parseDicParam() {
|
||||
parseGVGVestigeCnt();
|
||||
parseGVGDurabilityMinus();
|
||||
parseGVGTeamDurability();
|
||||
parseGVGReviveCoin();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user