feat: 新增指定目标卡池等级抽卡功能并调整UI布局

- 在drawCardsByRule函数中增加targetPoolLv参数,支持强制从指定等级卡池抽卡
- 修改MissionCardComp中刷新英雄卡牌逻辑,使用targetPoolLv替代heroLv参数
- 调整role_controller.prefab中多个UI元素的位置和尺寸
- 将开始按钮文本从"开始"改为"开始战斗"并加宽按钮
This commit is contained in:
walkpan
2026-04-05 21:12:39 +08:00
parent 96f06535e1
commit c93ccbcaec
4 changed files with 43 additions and 19 deletions

View File

@@ -438,12 +438,12 @@ export class MissionCardComp extends CCComp {
return filled;
}
private tryRefreshHeroCards(heroType?: HType, heroLv?: number): boolean {
private tryRefreshHeroCards(heroType?: HType, targetPoolLv?: number): boolean {
const cards = drawCardsByRule(this.poolLv, {
count: 4,
type: CardType.Hero,
heroType,
heroLv
targetPoolLv
});
if (cards.length <= 0) return false;
this.layoutCardSlots();
@@ -453,8 +453,8 @@ export class MissionCardComp extends CCComp {
private tryRefreshHeroCardsByEffect(refreshHeroType: SpecialRefreshHeroType, refreshLv: number): boolean {
const heroType = this.resolveRefreshHeroType(refreshHeroType);
const heroLv = refreshLv > 0 ? refreshLv : undefined;
return this.tryRefreshHeroCards(heroType, heroLv);
const targetPoolLv = refreshLv > 0 ? refreshLv : undefined;
return this.tryRefreshHeroCards(heroType, targetPoolLv);
}
private resolveRefreshHeroType(refreshHeroType: SpecialRefreshHeroType): HType | undefined {