抽卡:武将池使用招募表
This commit is contained in:
@@ -225,9 +225,10 @@ export function getAllHeroByQuality(quality: number) {
|
|||||||
if(quality == 0) return [ GACHA_OCCUPY_HID ];
|
if(quality == 0) return [ GACHA_OCCUPY_HID ];
|
||||||
|
|
||||||
let allHero: number[] = [];
|
let allHero: number[] = [];
|
||||||
for(let [id, dicHero] of gameData.hero) {
|
for(let { actorId } of gameData.recruit) {
|
||||||
if(dicHero.recruit && dicHero.quality == quality) {
|
let dicHero = gameData.hero.get(actorId);
|
||||||
allHero.push(id);
|
if(dicHero.quality == quality) {
|
||||||
|
allHero.push(actorId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return allHero;
|
return allHero;
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ export const FILENAME = {
|
|||||||
DIC_GACHA: 'dic_zyz_gacha',
|
DIC_GACHA: 'dic_zyz_gacha',
|
||||||
DIC_GACHA_CONTENT: 'dic_zyz_recruitContent',
|
DIC_GACHA_CONTENT: 'dic_zyz_recruitContent',
|
||||||
DIC_GIFT_PACKAGE: 'dic_zyz_giftPackage',
|
DIC_GIFT_PACKAGE: 'dic_zyz_giftPackage',
|
||||||
|
DIC_RECRUIT: 'dic_zyz_recruit',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WAR_RELATE_TABLES = [
|
export const WAR_RELATE_TABLES = [
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ import { dicTaskBox } from './dictionary/DicTaskBox';
|
|||||||
import { dicGacha } from "./dictionary/DicGacha";
|
import { dicGacha } from "./dictionary/DicGacha";
|
||||||
import { dicGachaContent, dicGachaContentHero } from "./dictionary/DicGachaContent";
|
import { dicGachaContent, dicGachaContentHero } from "./dictionary/DicGachaContent";
|
||||||
import { dicGiftPackage } from "./dictionary/DicGiftPackage";
|
import { dicGiftPackage } from "./dictionary/DicGiftPackage";
|
||||||
|
import { dicRecruit } from './dictionary/DicRecruit';
|
||||||
|
|
||||||
export const gameData = {
|
export const gameData = {
|
||||||
blurprtCompose: dicBlueprtCompose,
|
blurprtCompose: dicBlueprtCompose,
|
||||||
@@ -195,7 +196,8 @@ export const gameData = {
|
|||||||
gachaTurntable: getGachaTurntablePercent(),
|
gachaTurntable: getGachaTurntablePercent(),
|
||||||
heroTransPiece: getHeroTransPiece(),
|
heroTransPiece: getHeroTransPiece(),
|
||||||
giftPackage: dicGiftPackage,
|
giftPackage: dicGiftPackage,
|
||||||
comBtlLvRange: parseComBtlLvRange()
|
comBtlLvRange: parseComBtlLvRange(),
|
||||||
|
recruit: dicRecruit
|
||||||
};
|
};
|
||||||
|
|
||||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
// 排行榜表
|
||||||
|
import { readJsonFile } from '../util'
|
||||||
|
import { FILENAME } from '../../consts'
|
||||||
|
|
||||||
|
export interface DicRecruit {
|
||||||
|
|
||||||
|
// id
|
||||||
|
readonly id: number;
|
||||||
|
// 武将id
|
||||||
|
readonly actorId: number;
|
||||||
|
// 权重
|
||||||
|
readonly weight: number;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const str = readJsonFile(FILENAME.DIC_RECRUIT);
|
||||||
|
let arr = JSON.parse(str);
|
||||||
|
|
||||||
|
export const dicRecruit = new Array<DicRecruit>();
|
||||||
|
|
||||||
|
arr.forEach(o => {
|
||||||
|
dicRecruit.push(o);
|
||||||
|
});
|
||||||
|
|
||||||
|
arr = undefined;
|
||||||
Reference in New Issue
Block a user