百家学宫,名将谱战力

This commit is contained in:
luying
2020-12-26 16:42:33 +08:00
parent a3c5f6b57f
commit ffb12668f7
13 changed files with 796 additions and 826 deletions

View File

@@ -33,6 +33,9 @@ import { dicSuit } from './dictionary/DicSuit';
import { dicTitle } from './dictionary/DicTitle';
import { dicTeraph } from './dictionary/DicTeraph';
import { dicSchool } from './dictionary/DicSchool';
import { dicSchoolRate } from './dictionary/DicSchoolRate';
import { dicHeroScroll, preHeroScroll } from './dictionary/DicHeroScroll';
import { ABI_TYPE_TO_STAGE } from "../consts";
export const gameData = {
blurprtCompose: dicBlueprtCompose,
@@ -77,7 +80,10 @@ export const gameData = {
suit: dicSuit,
title: dicTitle,
teraphs: dicTeraph,
school: dicSchool
school: dicSchool,
schoolRate: dicSchoolRate,
heroScroll: dicHeroScroll,
preHeroScroll: preHeroScroll
};
// 在此提供一些原先在gamedata中提供的方法以便更方便获取gameData数据
@@ -214,3 +220,25 @@ export function getTeraph(id: number, grade: number) {
const teraphInfo = gameData.teraphs.get(id +'_'+ grade);
return teraphInfo;
}
export function getSchoolRateByStar(star: number, colorStar: number, quality: number) {
const schoolRate = gameData.schoolRate.get(`${star}_${colorStar}_${quality}`);
return schoolRate;
}
export function getScollByStar(quality: number, star: number, curQuality: number, colorStar: number) {
const heroScroll = gameData.heroScroll.get(`${quality}_${star}_${curQuality}_${colorStar}`);
return heroScroll;
}
// 根据存在升星表等的stage字段的id对应17维id
export function getFieldByStage(stage: number, jobid: number) {
let targetAttrId = ABI_TYPE_TO_STAGE.get(stage);
if(typeof targetAttrId === 'number') {
return targetAttrId
} else {
const dicJob = gameData.job.get(jobid);
return targetAttrId(dicJob.type);
}
}