Compare commits
2 Commits
bb6e63756c
...
42d1ca5bd5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42d1ca5bd5 | ||
|
|
d97e3d8cb9 |
@@ -4834,7 +4834,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 67.5,
|
||||
"y": -90,
|
||||
"y": -96.599,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -5033,7 +5033,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 129,
|
||||
"width": 135,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@@ -5181,10 +5181,10 @@
|
||||
},
|
||||
"_alignFlags": 44,
|
||||
"_target": null,
|
||||
"_left": 3,
|
||||
"_right": 3,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": -35,
|
||||
"_bottom": -41.599000000000004,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
@@ -5259,7 +5259,9 @@
|
||||
"icon_node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"sell_node": null,
|
||||
"sell_node": {
|
||||
"__id__": 209
|
||||
},
|
||||
"NF_node": {
|
||||
"__id__": 117
|
||||
},
|
||||
|
||||
@@ -51,7 +51,7 @@ export const CardsUpSet: Record<number, number> = {
|
||||
}
|
||||
|
||||
/**初始coin数 */
|
||||
export const CardInitCoins = 4
|
||||
export const CardInitCoins = 11
|
||||
/** 卡池升级每波减免金额 */
|
||||
export const CARD_POOL_UPGRADE_DISCOUNT_PER_WAVE = 10
|
||||
/** 卡池默认初始等级 */
|
||||
@@ -59,39 +59,39 @@ export const CARD_POOL_INIT_LEVEL = CardLV.LV1
|
||||
/** 卡池等级上限 */
|
||||
export const CARD_POOL_MAX_LEVEL = CardLV.LV3
|
||||
/** 英雄最高等级限制 */
|
||||
export const CARD_HERO_MAX_LEVEL = 2
|
||||
export const CARD_HERO_MAX_LEVEL = 1
|
||||
/** 基础卡池(英雄、技能、功能) */
|
||||
|
||||
export const CardPoolList: CardConfig[] = [
|
||||
{ uuid: 5001, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5101, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5201, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5301, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5001, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5101, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5201, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5301, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5003, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5102, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5302, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5003, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5102, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5302, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5002, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5103, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5202, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5002, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5103, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5202, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5004, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5104, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5303, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5004, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5104, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5303, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5105, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 3, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5304, type: CardType.Hero, cost: 3, weight: 25, pool_lv: 3, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5105, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 3, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5304, type: CardType.Hero, cost: 10, weight: 25, pool_lv: 3, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
// 技能卡牌 (以增益/辅助为主,因为在备战期没有敌人)
|
||||
{ uuid: 6401, type: CardType.Skill, cost: 2, weight: 20, pool_lv: 1, kind: CKind.Skill, card_lv: 1, name: "单体攻击", info: "随机1个友方+5攻击", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6402, type: CardType.Skill, cost: 2, weight: 20, pool_lv: 1, kind: CKind.Skill, card_lv: 1, name: "单体生命", info: "随机1个友方+20最大生命值", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6403, type: CardType.Skill, cost: 3, weight: 20, pool_lv: 1, kind: CKind.Skill, card_lv: 1, name: "单体全能", info: "随机1个友方+2攻击,+10最大生命值", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6404, type: CardType.Skill, cost: 4, weight: 20, pool_lv: 1, kind: CKind.Skill, card_lv: 1, name: "群体攻击", info: "随机3个友方+2攻击", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6405, type: CardType.Skill, cost: 4, weight: 20, pool_lv: 2, kind: CKind.Skill, card_lv: 1, name: "群体生命", info: "随机3个友方+10最大生命值", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6406, type: CardType.Skill, cost: 5, weight: 20, pool_lv: 2, 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: 6401, type: CardType.Skill, cost: 10, weight: 20, pool_lv: 1, kind: CKind.Skill, card_lv: 1, name: "单体攻击", info: "随机1个友方+5攻击", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6402, type: CardType.Skill, cost: 10, weight: 20, pool_lv: 1, kind: CKind.Skill, card_lv: 1, name: "单体生命", info: "随机1个友方+20最大生命值", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6403, type: CardType.Skill, cost: 10, weight: 20, pool_lv: 1, kind: CKind.Skill, card_lv: 1, name: "单体全能", info: "随机1个友方+2攻击,+10最大生命值", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6404, type: CardType.Skill, cost: 10, weight: 20, pool_lv: 1, kind: CKind.Skill, card_lv: 1, name: "群体攻击", info: "随机3个友方+2攻击", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6405, type: CardType.Skill, cost: 10, weight: 20, pool_lv: 2, kind: CKind.Skill, card_lv: 1, name: "群体生命", info: "随机3个友方+10最大生命值", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6406, type: CardType.Skill, cost: 10, weight: 20, pool_lv: 2, kind: CKind.Skill, card_lv: 1, name: "群体全能", info: "为随机3个友方单位增加攻击力和生命上限", is_inst: true, t_times: 1, t_inv: 0 },
|
||||
{ uuid: 6304, type: CardType.Skill, cost: 10, 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: 10, 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 },
|
||||
|
||||
@@ -92,6 +92,16 @@ export class HInfoComp extends CCComp {
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前是否处于战斗阶段,控制出售按钮显示/隐藏
|
||||
* @param isBattlePhase 是否处于战斗阶段
|
||||
*/
|
||||
setBattlePhase(isBattlePhase: boolean) {
|
||||
if (this.sell_node && this.sell_node.isValid) {
|
||||
this.sell_node.active = !isBattlePhase;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新显示:
|
||||
* 1. 根据英雄等级切换高级 / 普通边框。
|
||||
|
||||
@@ -613,6 +613,12 @@ export class MissionCardComp extends CCComp {
|
||||
this.cards_node.active = true;
|
||||
Tween.stopAllByTarget(this.cards_node);
|
||||
this.cards_node.setScale(this.cardsShowScale);
|
||||
|
||||
this.heroInfoItems.forEach(item => {
|
||||
if (item.comp && item.comp.isValid) {
|
||||
item.comp.setBattlePhase(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private enterBattlePhase() {
|
||||
@@ -627,6 +633,12 @@ export class MissionCardComp extends CCComp {
|
||||
}
|
||||
})
|
||||
.start();
|
||||
|
||||
this.heroInfoItems.forEach(item => {
|
||||
if (item.comp && item.comp.isValid) {
|
||||
item.comp.setBattlePhase(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 构建本次抽卡结果,保证最终可分发4条数据 */
|
||||
@@ -847,6 +859,7 @@ export class MissionCardComp extends CCComp {
|
||||
comp
|
||||
};
|
||||
comp.bindData(eid, model);
|
||||
comp.setBattlePhase(this.isBattlePhase);
|
||||
this.heroInfoItems.set(eid, item);
|
||||
this.relayoutHeroInfoPanels();
|
||||
this.updateHeroInfoPanel(item);
|
||||
@@ -881,6 +894,7 @@ export class MissionCardComp extends CCComp {
|
||||
comp: HInfoComp
|
||||
}) {
|
||||
item.comp.refresh();
|
||||
item.comp.setBattlePhase(this.isBattlePhase);
|
||||
}
|
||||
|
||||
private relayoutHeroInfoPanels() {
|
||||
|
||||
@@ -83,12 +83,12 @@ export class MissionComp extends CCComp {
|
||||
private maxMonsterCount: number = 5;
|
||||
/** 怪物数量恢复阈值(降至此值以下恢复刷怪) */
|
||||
private resumeMonsterCount: number = 3;
|
||||
/** 新一波金币奖励基础值 */
|
||||
private prepareBaseCoinReward: number = 100;
|
||||
/** 每一波金币增长值 */
|
||||
private prepareCoinWaveGrow: number = 1;
|
||||
/** 金币奖励上限 */
|
||||
private prepareCoinRewardCap: number = 500;
|
||||
/** 新一波金币奖励基础值(现已固定,不再随波次增长) */
|
||||
private prepareBaseCoinReward: number = 25;
|
||||
/** 每一波金币增长值(固定收益设为0) */
|
||||
private prepareCoinWaveGrow: number = 0;
|
||||
/** 金币奖励上限(固定收益,此值不再生效) */
|
||||
private prepareCoinRewardCap: number = 100;
|
||||
/** 卡池升级波次配置:达到对应波次时,推送卡池升级事件 */
|
||||
@property({ type: [CCInteger], tooltip: "卡池升级波次配置,例如 [10, 20] 表示第10波升到2级,第20波升到3级" })
|
||||
cardPoolUpgradeWaves: number[] = [5, 10];
|
||||
@@ -712,19 +712,17 @@ export class MissionComp extends CCComp {
|
||||
}
|
||||
|
||||
/**
|
||||
* 按波数发放金币奖励:
|
||||
* reward = min(cap, base + (wave - 1) × grow)
|
||||
* 按波数发放固定金币奖励(外加技能加成)。
|
||||
* 第1波不发放(使用初始金币),从第2波起发放。
|
||||
* 仅在波数首次到达时发放,防止重复。
|
||||
*
|
||||
* @param wave 当前波数
|
||||
*/
|
||||
private grantPrepareCoinByWave(wave: number) {
|
||||
if (wave <= 0) return;
|
||||
if (wave <= 1) return;
|
||||
if (wave <= this.lastPrepareCoinWave) return;
|
||||
const base = Math.max(0, Math.floor(this.prepareBaseCoinReward));
|
||||
const grow = Math.max(0, Math.floor(this.prepareCoinWaveGrow));
|
||||
const cap = Math.max(0, Math.floor(this.prepareCoinRewardCap));
|
||||
let reward = Math.min(cap, base + (wave - 1) * grow);
|
||||
|
||||
let reward = Math.max(0, Math.floor(this.prepareBaseCoinReward));
|
||||
|
||||
// 增加驻场技能金币收益
|
||||
const goldBoost = HeroAttrsComp.getFieldSkillTotalValue(FieldSkillType.WaveGold);
|
||||
|
||||
Reference in New Issue
Block a user