From bb6e63756ceca23034b6784dbd38425ca45c6b93 Mon Sep 17 00:00:00 2001 From: walkpan Date: Thu, 23 Apr 2026 21:51:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8A=BD=E5=8D=A1):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=88=98=E6=96=97=E9=98=B6=E6=AE=B5=E5=8F=AF=E6=8A=BD=E5=8D=A1?= =?UTF-8?q?=E5=8F=8A=E5=8D=A1=E7=89=8C=E9=9D=A2=E6=9D=BF=E6=9C=AA=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 战斗开始后隐藏卡牌面板并清空卡牌,而非刷新战斗卡牌 - 在抽卡逻辑开始时检查战斗阶段,阻止战斗时抽卡 - 注释掉卡池中三个特殊刷新卡牌配置 --- assets/script/game/common/config/CardSet.ts | 6 +++--- assets/script/game/map/MissionCardComp.ts | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/assets/script/game/common/config/CardSet.ts b/assets/script/game/common/config/CardSet.ts index bc3ff07e..a20f111b 100644 --- a/assets/script/game/common/config/CardSet.ts +++ b/assets/script/game/common/config/CardSet.ts @@ -93,9 +93,9 @@ export const CardPoolList: CardConfig[] = [ { uuid: 6304, type: CardType.Skill, cost: 3, weight: 20, pool_lv: 3, kind: CKind.Skill, card_lv: 1, name: "神圣治疗", info: "恢复场上随机3个友方单位的生命值", is_inst: true, t_times: 1, t_inv: 0 }, { uuid: 6305, type: CardType.Skill, cost: 4, weight: 20, pool_lv: 3, kind: CKind.Skill, card_lv: 1, name: "群体护盾", info: "随机3个友方获得2次伤害免疫", is_inst: true, t_times: 1, t_inv: 0 }, - { uuid: 7101, type: CardType.SpecialRefresh, cost: 1, weight: 12, pool_lv: 1 ,kind: CKind.Card }, - { uuid: 7102, type: CardType.SpecialRefresh, cost: 1, weight: 12, pool_lv: 1 ,kind: CKind.Card }, - { uuid: 7103, type: CardType.SpecialRefresh, cost: 1, weight: 12, pool_lv: 1 ,kind: CKind.Card }, + // { uuid: 7101, type: CardType.SpecialRefresh, cost: 1, weight: 12, pool_lv: 1 ,kind: CKind.Card }, + // { uuid: 7102, type: CardType.SpecialRefresh, cost: 1, weight: 12, pool_lv: 1 ,kind: CKind.Card }, + // { uuid: 7103, type: CardType.SpecialRefresh, cost: 1, weight: 12, pool_lv: 1 ,kind: CKind.Card }, ] diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index 452da4a0..c1bde972 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -302,13 +302,11 @@ export class MissionCardComp extends CCComp { this.playCoinChangeAnim(v > 0); } - /** 战斗开始:不收起面板,而是刷新为战斗阶段卡牌 */ + /** 战斗开始:收起面板,清空卡牌 */ private onFightStart() { this.isBattlePhase = true; this.enterBattlePhase(); - this.layoutCardSlots(); - const cards = this.buildDrawCards(); - this.dispatchCardsToSlots(cards); + this.clearAllCards(); } /** @@ -537,6 +535,10 @@ export class MissionCardComp extends CCComp { * 3. 重新布局槽位 → 从卡池构建 4 张卡 → 分发到槽位。 */ private onClickDraw() { + if (this.isBattlePhase) { + oops.gui.toast("战斗阶段无法抽卡"); + return; + } const cost = this.getRefreshCost(); const currentCoin = this.getMissionCoin(); if (currentCoin < cost) { @@ -616,10 +618,15 @@ export class MissionCardComp extends CCComp { private enterBattlePhase() { if (!this.cards_node || !this.cards_node.isValid) return; this.initCardsPanelPos(); - this.cards_node.active = true; Tween.stopAllByTarget(this.cards_node); - this.cards_node.setScale(this.cardsShowScale); - // 取消战斗阶段隐藏面板的逻辑 + tween(this.cards_node) + .to(this.cardsPanelMoveDuration, { scale: this.cardsHideScale }) + .call(() => { + if (this.cards_node && this.cards_node.isValid) { + this.cards_node.active = false; + } + }) + .start(); } /** 构建本次抽卡结果,保证最终可分发4条数据 */