fix(抽卡): 修复战斗阶段可抽卡及卡牌面板未隐藏的问题
- 战斗开始后隐藏卡牌面板并清空卡牌,而非刷新战斗卡牌 - 在抽卡逻辑开始时检查战斗阶段,阻止战斗时抽卡 - 注释掉卡池中三个特殊刷新卡牌配置
This commit is contained in:
@@ -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: 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: 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: 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: 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: 7103, type: CardType.SpecialRefresh, cost: 1, weight: 12, pool_lv: 1 ,kind: CKind.Card },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -302,13 +302,11 @@ export class MissionCardComp extends CCComp {
|
|||||||
this.playCoinChangeAnim(v > 0);
|
this.playCoinChangeAnim(v > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 战斗开始:不收起面板,而是刷新为战斗阶段卡牌 */
|
/** 战斗开始:收起面板,清空卡牌 */
|
||||||
private onFightStart() {
|
private onFightStart() {
|
||||||
this.isBattlePhase = true;
|
this.isBattlePhase = true;
|
||||||
this.enterBattlePhase();
|
this.enterBattlePhase();
|
||||||
this.layoutCardSlots();
|
this.clearAllCards();
|
||||||
const cards = this.buildDrawCards();
|
|
||||||
this.dispatchCardsToSlots(cards);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -537,6 +535,10 @@ export class MissionCardComp extends CCComp {
|
|||||||
* 3. 重新布局槽位 → 从卡池构建 4 张卡 → 分发到槽位。
|
* 3. 重新布局槽位 → 从卡池构建 4 张卡 → 分发到槽位。
|
||||||
*/
|
*/
|
||||||
private onClickDraw() {
|
private onClickDraw() {
|
||||||
|
if (this.isBattlePhase) {
|
||||||
|
oops.gui.toast("战斗阶段无法抽卡");
|
||||||
|
return;
|
||||||
|
}
|
||||||
const cost = this.getRefreshCost();
|
const cost = this.getRefreshCost();
|
||||||
const currentCoin = this.getMissionCoin();
|
const currentCoin = this.getMissionCoin();
|
||||||
if (currentCoin < cost) {
|
if (currentCoin < cost) {
|
||||||
@@ -616,10 +618,15 @@ export class MissionCardComp extends CCComp {
|
|||||||
private enterBattlePhase() {
|
private enterBattlePhase() {
|
||||||
if (!this.cards_node || !this.cards_node.isValid) return;
|
if (!this.cards_node || !this.cards_node.isValid) return;
|
||||||
this.initCardsPanelPos();
|
this.initCardsPanelPos();
|
||||||
this.cards_node.active = true;
|
|
||||||
Tween.stopAllByTarget(this.cards_node);
|
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条数据 */
|
/** 构建本次抽卡结果,保证最终可分发4条数据 */
|
||||||
|
|||||||
Reference in New Issue
Block a user