武将:一键升星

This commit is contained in:
luying
2021-07-05 19:51:21 +08:00
parent 5a948d1741
commit 50867e8878
11 changed files with 6420 additions and 3858 deletions

View File

@@ -293,7 +293,8 @@ export function calHeroStarIncAttr(originHero: HeroType, update: HeroUpdate, typ
if(starStage == ABI_STAGE.START) star--;
if(colorStarStage == ABI_STAGE.START) colorStar--;
const dicStar = isWake ? getHeroWakeByQuality(dicHero.quality, colorStar) : getHeroStarByQuality(quality, star); // 星级表
const dicJob = gameData.job.get(dicHero.jobid);
const dicStar = isWake ? getHeroWakeByQuality(dicJob.job_class, dicHero.quality, colorStar) : getHeroStarByQuality(dicJob.job_class, quality, star); // 星级表
let stages = new Array<number>(); // 需要升级的阶
@@ -302,6 +303,14 @@ export function calHeroStarIncAttr(originHero: HeroType, update: HeroUpdate, typ
} else if (type == HERO_SYSTEM_TYPE.LVUP) {
stages = getAllAttrStage();
} else if (type == HERO_SYSTEM_TYPE.STAR) {
let end = isUpStar? ABI_STAGE.END: starStage;
if(end < originStarStage) {
stages = getAllAttrStage();
} else {
for(let i = originStarStage; i < end; i++) {
stages.push(i + 1);
}
}
stages.push(isUpStar? ABI_STAGE.END: starStage);
} else if (type == HERO_SYSTEM_TYPE.QUALITY) {
stages = getAllAttrStage();
@@ -309,7 +318,14 @@ export function calHeroStarIncAttr(originHero: HeroType, update: HeroUpdate, typ
if (isFirstWake) { // 首次觉醒
stages = getAllAttrStage();
} else {
stages.push(isUpStar ? ABI_STAGE.END : colorStarStage);
let end = isUpStar? ABI_STAGE.END: colorStarStage;
if(end < originColorStarStage) {
stages = getAllAttrStage();
} else {
for(let i = originColorStarStage; i < end; i++) {
stages.push(i + 1);
}
}
}
}
for (let stage of stages) {