refactor(skill-card): 统一技能卡牌波次配置为单一数据源
1. 新增SKILL_CARD_WAVES常量管理技能卡牌出现波次档位 2. 替换MissionCardComp中硬编码的波次判断逻辑 3. 重构CardSet中的技能卡牌波次映射和配置项,实现自动关联档位 4. 确保所有技能卡牌配置与波次配置严格对齐,避免抽卡池为空的问题
This commit is contained in:
@@ -45,7 +45,7 @@ import { HeroAttrsComp } from "../hero/HeroAttrsComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { HeroInfo, HType } from "../common/config/heroSet";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { FacSet, FightSet, CARD_POOL_UPGRADE_WAVES } from "../common/config/GameSet";
|
||||
import { FacSet, FightSet, CARD_POOL_UPGRADE_WAVES, SKILL_CARD_WAVES } from "../common/config/GameSet";
|
||||
import { MoveComp } from "../hero/MoveComp";
|
||||
import { MissionHeroComp } from "./MissionHeroComp";
|
||||
import { MissionEconomy } from "./MissionEconomy";
|
||||
@@ -235,7 +235,7 @@ export class MissionCardComp extends CCComp {
|
||||
this.dispatchCardsToSlots(cards);
|
||||
|
||||
const wave = this.getCurrentWave();
|
||||
if ([1, 5, 10, 15, 20].includes(wave)) {
|
||||
if (SKILL_CARD_WAVES.includes(wave)) {
|
||||
this.showSkillCardPopup();
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ export class MissionCardComp extends CCComp {
|
||||
this.dispatchCardsToSlots(cards);
|
||||
|
||||
const wave = this.getCurrentWave();
|
||||
if ([1, 5, 10, 15, 20].includes(wave)) {
|
||||
if (SKILL_CARD_WAVES.includes(wave)) {
|
||||
this.showSkillCardPopup();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user