2 Commits

Author SHA1 Message Date
panFD
9f738ab881 fix(map,card): 优化卡牌抽取逻辑,新增去重机制
1. 为drawCardsByRule新增unique参数,实现抽取卡牌不重复
2. 修复 fallback 抽取时的重复问题,优先选择未抽到过的卡牌
3. 修复驻场技能卡的图标显示逻辑,使用FieldSkillSet配置
2026-06-18 22:18:05 +08:00
panFD
e0c6622bec refactor(skill config): 统一技能图标资源路径并清理废弃技能
1.  修正预加载的图集资源路径
2.  批量更新所有技能的图标为统一命名的资源
3.  删除冗余的废弃技能配置条目
4.  为场地技能配置新增图标字段并补全对应资源路径
2026-06-18 21:46:40 +08:00
5 changed files with 79 additions and 67 deletions

View File

@@ -283,13 +283,13 @@ export class SingletonModuleComp extends ecs.Comp {
* 在游戏载入早期调用,预加载常用图集
*/
preloadCommonAssets() {
resources.load("gui/uicons", SpriteAtlas, (err, atlas) => {
resources.load("gui/ui3", SpriteAtlas, (err, atlas) => {
if (!err && atlas) {
// 增加引用计数防止图集被引擎自动垃圾回收GC导致底层 spriteFrames 为 null
atlas.addRef();
this.uiconsAtlas = atlas;
} else {
mLogger.error(this.debugMode, 'SMC', "预加载 gui/uicons 图集失败:", err);
mLogger.error(this.debugMode, 'SMC', "预加载 gui/ui3 图集失败:", err);
}
});
}

View File

@@ -290,14 +290,19 @@ const weightedPick = (cards: CardConfig[]): CardConfig | null => {
return cards[cards.length - 1]
}
/** 连续抽取 count 张卡,允许重复 */
const pickCards = (cards: CardConfig[], count: number): CardConfig[] => {
/** 连续抽取 count 张卡,允许重复或通过 unique 剔除重复 */
const pickCards = (cards: CardConfig[], count: number, unique: boolean = false): CardConfig[] => {
if (cards.length === 0 || count <= 0) return []
const selected: CardConfig[] = []
let available = [...cards]
while (selected.length < count) {
const pick = weightedPick(cards)
if (available.length === 0) break
const pick = weightedPick(available)
if (!pick) break
selected.push(pick)
if (unique) {
available = available.filter(c => c.uuid !== pick.uuid)
}
}
return selected
}
@@ -345,6 +350,7 @@ export const drawCardsByRule = (
heroLv?: number
targetPoolLv?: number
wave?: number
unique?: boolean
} = {}
): CardConfig[] => {
const count = Math.max(0, Math.floor(options.count ?? 4))
@@ -394,6 +400,6 @@ export const drawCardsByRule = (
})
}
const picked = pickCards(pool, count)
const picked = pickCards(pool, count, options.unique)
return picked
}

View File

@@ -208,39 +208,33 @@ export const SkillSet: Record<number, SkillConfig> = {
* 6010 箭矢黄 击晕取向
**/
6001: {
uuid: 6001, name: "火球", sp_name: "atk_1", icon: "1026", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6001, name: "火球", sp_name: "atk_1", icon: "Stat_Attack_01", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.Melee,
RType: RType.bezier, EType: EType.collision, info: "造成攻击力100%的伤害",
},
6002: {
uuid: 6002, name: "紫烟", sp_name: "atk_2", icon: "1126", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6002, name: "紫烟", sp_name: "atk_2", icon: "Stat_Attack_01", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 1, hitcd: 0.3, speed: 720, with: 90, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.bezier, EType: EType.collision, info: "近战普通攻击技能",
},
6003: {
uuid: 6003, name: "白球", sp_name: "atk_3", icon: "1126", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6003, name: "白球", sp_name: "atk_3", icon: "Stat_Attack_01", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 1, hitcd: 0.3, speed: 720, with: 90, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.bezier, EType: EType.collision, info: "一定几率暴击",
},
6004: {
uuid: 6004, name: "水球", sp_name: "atk_4", icon: "1126", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 1, hitcd: 0.3, speed: 720, with: 90, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.bezier, EType: EType.collision, info: "普通远程攻击",
},
6008: {
uuid: 6008, name: "箭矢", sp_name: "arrow", icon: "1135", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6008, name: "箭矢", sp_name: "arrow", icon: "Stat_RangedAttack", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.bezier, EType: EType.collision, bezier_start_y: 20, bezier_mid_y: 140, bezier_arc: 1.05, info: "造成攻击力100%的伤害",
},
6009: {
uuid: 6009, name: "箭矢蓝", sp_name: "arrow_blue", icon: "1135", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6009, name: "箭矢蓝", sp_name: "arrow_blue", icon: "Stat_RangedAttack", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.bezier, EType: EType.collision, bezier_start_y: 20, bezier_mid_y: 140, bezier_arc: 1.05, info: "造成攻击力100%的伤害",
},
6010: {
uuid: 6010, name: "箭矢红", sp_name: "arrow_red", icon: "1135", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6010, name: "箭矢红", sp_name: "arrow_red", icon: "Stat_RangedAttack", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.bezier, EType: EType.collision, bezier_start_y: 20, bezier_mid_y: 140, bezier_arc: 1.05, info: "造成攻击力100%的伤害",
},
@@ -252,27 +246,22 @@ export const SkillSet: Record<number, SkillConfig> = {
* 6104 水球 溅射:分裂多个
**/
6101: {
uuid: 6101, name: "大火球", sp_name: "line_1", icon: "1126", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6101, name: "大火球", sp_name: "line_1", icon: "Stat_FireDamage", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, stun: 0, ap: 100, hit_count: 2, hitcd: 0.3, speed: 720, with: 90, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.linear, EType: EType.collision, info: "造成攻击力100%的伤害,一定几率暴击,高阶技能",
},
//怪物法师统一使用 暗影球
6102: {
uuid: 6102, name: "大紫球", sp_name: "line_2", icon: "1126", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6102, name: "大紫球", sp_name: "line_2", icon: "Stat_Mana", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 2, hitcd: 0.3, speed: 720, with: 90, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.linear, EType: EType.collision, info: "造成攻击力100%的伤害,高阶技能",
},
6103: {
uuid: 6103, name: "大白球", sp_name: "line_3", icon: "1126", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
uuid: 6103, name: "大白球", sp_name: "line_3", icon: "Stat_WaterDamage", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
DTType: DTType.single, ap: 100, hit_count: 2, hitcd: 0.3, speed: 720, with: 90, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.linear, EType: EType.collision, info: "造成攻击力100%的伤害,一定几率上毒(后期加入),高阶技能 ",
},
6104: {
uuid: 6104, name: "大水球", sp_name: "line_4", icon: "1135", TGroup: TGroup.Enemy, readyAnm: "yellow", endAnm: "", act: "max",
DTType: DTType.single, crt: 20, ap: 100, hit_count: 2, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.linear, EType: EType.collision, info: "射出强力箭矢最多穿透6个敌人附带20%额外暴击率",
},
/*** ======高阶范围攻击技能 ====
* 都是3*3 范围攻击 不是英雄技能是技能卡20波技能
* 6201 雷墙 击晕向
@@ -283,105 +272,105 @@ export const SkillSet: Record<number, SkillConfig> = {
* 6206 陨石术 暴击向
**/
6201: {
uuid: 6201, name: "雷墙", sp_name: "box_1", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
uuid: 6201, name: "雷墙", sp_name: "box_1", icon: "Stat_LightningDamag", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.fixed, EType: EType.animationEnd, info: "召唤雷墙阻挡敌人,有概率击晕",
},
6202: {
uuid: 6202, name: "火墙", sp_name: "box_2", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
uuid: 6202, name: "火墙", sp_name: "box_2", icon: "Stat_FireDamage", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.fixed, EType: EType.animationEnd, info: "召唤雷墙阻挡敌人,有概率击晕",
},
6203: {
uuid: 6203, name: "飓风", sp_name: "box_3", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
uuid: 6203, name: "飓风", sp_name: "box_3", icon: "Stat_Stun_01", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.fixed, EType: EType.animationEnd, info: "召唤雷墙阻挡敌人,有概率击晕",
},
6204: {
uuid: 6204, name: "水墙", sp_name: "box_4", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
uuid: 6204, name: "水墙", sp_name: "box_4", icon: "Stat_Mana", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.fixed, EType: EType.animationEnd, info: "召唤雷墙阻挡敌人,有概率击晕",
},
6205: {
uuid: 6205, name: "风墙", sp_name: "box_5", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
uuid: 6205, name: "风墙", sp_name: "box_5", icon: "Stat_Stun_01", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.fixed, EType: EType.animationEnd, info: "召唤风墙困住敌人,有概率击晕",
},
6206: {
uuid: 6206, name: "陨石术", sp_name: "box_6", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
uuid: 6206, name: "陨石术", sp_name: "box_6", icon: "Stat_Tripleshot", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
RType: RType.fixed, EType: EType.animationEnd, info: "召唤陨石范围攻击敌人,有概率击晕",
},
//============================= ====== 辅助技能 技能卡牌 1 波技能 ====== ==========================
6301: {
uuid: 6301, name: "护盾", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Self, readyAnm: "up_blue", endAnm: "", act: "atk",
uuid: 6301, name: "护盾", sp_name: "buff_wind", icon: "Stat_Defense", TGroup: TGroup.Self, readyAnm: "up_blue", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Shield, ap: 3, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, info: "为伙伴/自己添加护盾可抵挡3次伤害",
},
6302: {
uuid: 6302, name: "治疗", sp_name: "buff_wind", icon: "1292", TGroup: TGroup.Team, readyAnm: "up_green", endAnm: "", act: "atk",
uuid: 6302, name: "治疗", sp_name: "buff_wind", icon: "Stat_Hp_01", TGroup: TGroup.Team, readyAnm: "up_green", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Heal, ap: 300, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, info: "治疗伙伴/自己",
},
//==========================buff 技能 也是 技能卡牌 5 波技能
6303: {
uuid: 6303, name: "获取金币", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Self, readyAnm: "up_blue", endAnm: "gold", act: "atk",
uuid: 6303, name: "获取金币", sp_name: "buff_wind", icon: "Stat_GoldGainIncrease_01", TGroup: TGroup.Self, readyAnm: "up_blue", endAnm: "gold", act: "atk",
DTType: DTType.single, kind: SkillKind.Gold, ap: 0, gold: 1, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, info: "增加一定数量的金币",
},
//==========================buff 技能=====================
6401: {
uuid: 6401, name: "攻击强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
uuid: 6401, name: "攻击强化", sp_name: "buff_wind", icon: "Stat_Attack_03", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 5, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, buff_type: Attrs.ap, info: "全体友方攻击力提升5点持续1次",
},
6402: {
uuid: 6402, name: "生命强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_hp", endAnm: "", act: "atk",
uuid: 6402, name: "生命强化", sp_name: "buff_wind", icon: "Stat_Hp_02", TGroup: TGroup.Team, readyAnm: "up_hp", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 20, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, buff_type: Attrs.hp_max, info: "全体友方最大生命值提升20点持续1次",
},
6403: {
uuid: 6403, name: "暴击强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
uuid: 6403, name: "暴击强化", sp_name: "buff_wind", icon: "Stat_CriticalChance_02", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 1, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, buff_type: Attrs.critical, info: "全体友方暴击率提升10%持续1次",
},
6404: {
uuid: 6404, name: "暴伤强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
uuid: 6404, name: "暴伤强化", sp_name: "buff_wind", icon: "Stat_Critical_01", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 1, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, buff_type: Attrs.critical_damage, info: "全体友方暴击伤害提升20%持续1次",
},
6405: {
uuid: 6405, name: "击晕强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_blue", endAnm: "", act: "atk",
uuid: 6405, name: "击晕强化", sp_name: "buff_wind", icon: "Stat_Stun_01", TGroup: TGroup.Team, readyAnm: "up_blue", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 1, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, buff_type: Attrs.stun_chance, info: "全体友方击晕概率提升10%持续1次",
},
6406: {
uuid: 6406, name: "击退强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_blue", endAnm: "", act: "atk",
uuid: 6406, name: "击退强化", sp_name: "buff_wind", icon: "Stat_Stun_01", TGroup: TGroup.Team, readyAnm: "up_blue", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 1, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, info: "暂未使用",
},
6407: {
uuid: 6407, name: "距推强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_blue", endAnm: "", act: "atk",
uuid: 6407, name: "距推强化", sp_name: "buff_wind", icon: "Stat_Stun_01", TGroup: TGroup.Team, readyAnm: "up_blue", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 1, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, info: "暂未使用",
},
6408: {
uuid: 6408, name: "穿刺强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
uuid: 6408, name: "穿刺强化", sp_name: "buff_wind", icon: "Stat_Tripleshot", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 20, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, buff_type: Attrs.puncture_chance, info: "全体友方穿透概率提升20%持续1次",
},
6409: {
uuid: 6409, name: "风怒强化", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
uuid: 6409, name: "风怒强化", sp_name: "buff_wind", icon: "Stat_CriticalComboChance", TGroup: TGroup.Team, readyAnm: "up_ap", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 1, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, buff_type: Attrs.wfuny, info: "全体友方风怒次数提升1次持续1次",
},
6501: {
uuid: 6501, name: "复活", sp_name: "buff_wind", icon: "1255", TGroup: TGroup.Self, readyAnm: "up_ap", endAnm: "", act: "atk",
uuid: 6501, name: "复活", sp_name: "buff_wind", icon: "Stat_HolyDamage", TGroup: TGroup.Self, readyAnm: "up_ap", endAnm: "", act: "atk",
DTType: DTType.single, kind: SkillKind.Support, ap: 50, hit_count: 3, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.support,
RType: RType.fixed, EType: EType.animationEnd, info: "ap 代表复活的生命值百分比",
}
@@ -413,29 +402,30 @@ export enum FieldSkillType {
export interface FieldSkillConfig {
uuid: number;
name: string;
icon: string; // 新增图标字段
type: FieldSkillType;
value: number; // 提升的数值
info: string;
}
export const FieldSkillSet: Record<number, FieldSkillConfig> = {
7001: { uuid: 7001, name: "召唤强化", type: FieldSkillType.SummonCount, value: 1, info: "召唤触发技能次数+1" }, //15 波技能
7002: { uuid: 7002, name: "死亡强化", type: FieldSkillType.DeadCount, value: 1, info: "死亡触发技能次数+1" }, //15 波技能
7003: { uuid: 7003, name: "开场强化", type: FieldSkillType.StartCount, value: 1, info: "战斗开始触发技能次数+1" }, //15 波技能
7004: { uuid: 7004, name: "结束强化", type: FieldSkillType.EndCount, value: 1, info: "战斗结束触发技能次数+1" }, //15 波技能
7005: { uuid: 7005, name: "金币收益", type: FieldSkillType.WaveGold, value: 1, info: "每回合金币收益+1" }, //1 波技能
7006: { uuid: 7006, name: "出售强化", type: FieldSkillType.SellGold, value: 1, info: "卖出英雄金币+1" }, //1 波技能
7007: { uuid: 7007, name: "战后恢复", type: FieldSkillType.WaveHeal, value: 0.1, info: "战斗结束生命回复量+10%" }, //1 波技能
7008: { uuid: 7008, name: "攻击加成", type: FieldSkillType.HeroAtk, value: 0.1, info: "英雄攻击力+10%" }, //10 波技能
7009: { uuid: 7009, name: "击晕加成", type: FieldSkillType.HeroStun, value: 0.1, info: "英雄击晕概率+10%" }, //10 波技能
7010: { uuid: 7010, name: "暴击加成", type: FieldSkillType.HeroCrit, value: 0.1, info: "英雄暴击率+10%" }, //10 波技能
7011: { uuid: 7011, name: "暴伤加成", type: FieldSkillType.HeroCritDamage, value: 0.2, info: "英雄暴击伤害+20%" }, //10 波技能
7012: { uuid: 7012, name: "攻速加成", type: FieldSkillType.HeroSpeed, value: 0.1, info: "英雄攻击速度+10%" }, //10 波技能
7001: { uuid: 7001, name: "召唤强化", icon: "Stat_UnitSummonIncrease_02", type: FieldSkillType.SummonCount, value: 1, info: "召唤触发技能次数+1" }, //15 波技能
7002: { uuid: 7002, name: "死亡强化", icon: "Stat_PoisonChanceIncrease", type: FieldSkillType.DeadCount, value: 1, info: "死亡触发技能次数+1" }, //15 波技能
7003: { uuid: 7003, name: "开场强化", icon: "Stat_AttackRangeIncrease_01", type: FieldSkillType.StartCount, value: 1, info: "战斗开始触发技能次数+1" }, //15 波技能
7004: { uuid: 7004, name: "结束强化", icon: "Stat_UnitSummonIncrease_01", type: FieldSkillType.EndCount, value: 1, info: "战斗结束触发技能次数+1" }, //15 波技能
7005: { uuid: 7005, name: "金币收益", icon: "Stat_InventorySlotIncrease", type: FieldSkillType.WaveGold, value: 1, info: "每回合金币收益+1" }, //1 波技能
7006: { uuid: 7006, name: "出售强化", icon: "Stat_GoldGainIncrease_01", type: FieldSkillType.SellGold, value: 1, info: "卖出英雄金币+1" }, //1 波技能
7007: { uuid: 7007, name: "战后恢复", icon: "Stat_PotionBoost", type: FieldSkillType.WaveHeal, value: 0.1, info: "战斗结束生命回复量+10%" }, //1 波技能
7008: { uuid: 7008, name: "攻击加成", icon: "Stat_Attack_03", type: FieldSkillType.HeroAtk, value: 0.1, info: "英雄攻击力+10%" }, //10 波技能
7009: { uuid: 7009, name: "击晕加成", icon: "Stat_Stun_01", type: FieldSkillType.HeroStun, value: 0.1, info: "英雄击晕概率+10%" }, //10 波技能
7010: { uuid: 7010, name: "暴击加成", icon: "Stat_CriticalChance_02", type: FieldSkillType.HeroCrit, value: 0.1, info: "英雄暴击率+10%" }, //10 波技能
7011: { uuid: 7011, name: "暴伤加成", icon: "Stat_Critical_01", type: FieldSkillType.HeroCritDamage, value: 0.2, info: "英雄暴击伤害+20%" }, //10 波技能
7012: { uuid: 7012, name: "攻速加成", icon: "Stat_AttackSpeed_02", type: FieldSkillType.HeroSpeed, value: 0.1, info: "英雄攻击速度+10%" }, //10 波技能
// ---- 13~18 来自原 TalentSet统一为驻场百分比 / 绝对值口径 ----
// 出售返还由原生 SellGold 承担SellBonus 不再单独配置
7013: { uuid: 7013, name: "购买优惠", type: FieldSkillType.BuyDiscount, value: 1, info: "购买卡牌费用-1金币" }, //10 波技能
7014: { uuid: 7014, name: "刷新优惠", type: FieldSkillType.RefreshDiscount, value: 1, info: "刷新卡牌费用-1金币" }, //10 波技能
7016: { uuid: 7016, name: "生命加成", type: FieldSkillType.HeroHp, value: 0.1, info: "英雄最大生命+10%" }, //10 波技能
7017: { uuid: 7017, name: "风怒加成", type: FieldSkillType.HeroWindFury, value: 0.1, info: "英雄风怒概率+10%" }, //10 波技能
7018: { uuid: 7018, name: "穿刺加成", type: FieldSkillType.HeroPuncture, value: 0.1, info: "英雄穿刺概率+10%" }, //10 波技能
7013: { uuid: 7013, name: "购买优惠", icon: "Stat_KeyCapacityIncrease", type: FieldSkillType.BuyDiscount, value: 1, info: "购买卡牌费用-1金币" }, //10 波技能
7014: { uuid: 7014, name: "刷新优惠", icon: "Stat_RandomBonus", type: FieldSkillType.RefreshDiscount, value: 1, info: "刷新卡牌费用-1金币" }, //10 波技能
7016: { uuid: 7016, name: "生命加成", icon: "Stat_Hp_02", type: FieldSkillType.HeroHp, value: 0.1, info: "英雄最大生命+10%" }, //10 波技能
7017: { uuid: 7017, name: "风怒加成", icon: "Stat_CriticalComboChance", type: FieldSkillType.HeroWindFury, value: 0.1, info: "英雄风怒概率+10%" }, //10 波技能
7018: { uuid: 7018, name: "穿刺加成", icon: "Stat_Tripleshot", type: FieldSkillType.HeroPuncture, value: 0.1, info: "英雄穿刺概率+10%" }, //10 波技能
};

View File

@@ -906,7 +906,8 @@ export class MissionCardComp extends CCComp {
const cards = drawCardsByRule(this.poolLv, {
count: 3,
type: targetType,
wave: currentWave
wave: currentWave,
unique: true // 保证技能牌不重复
});
if (cards.length >= 3) return cards.slice(0, 3);
@@ -915,10 +916,18 @@ export class MissionCardComp extends CCComp {
const fallback = drawCardsByRule(this.poolLv, {
count: 3,
type: targetType,
wave: currentWave
wave: currentWave,
unique: true
});
if (fallback.length === 0) break;
filled.push(fallback[filled.length % fallback.length]);
// 如果池子数量不足,只能被迫允许重复,但尽量拿没被抽到的
const fPick = fallback.find(c => !filled.some(fc => fc.uuid === c.uuid));
if (fPick) {
filled.push(fPick);
} else {
filled.push(fallback[filled.length % fallback.length]);
}
}
return filled;
}

View File

@@ -13,7 +13,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { CardConfig, CardType, CKind, CardPoolList } from "../common/config/CardSet";
import { CardBgComp } from "./CardBgComp";
import { SkillSet } from "../common/config/SkillSet";
import { FieldSkillSet, SkillSet } from "../common/config/SkillSet";
import { GameEvent } from "../common/config/GameEvent";
import { oops } from "db://oops-framework/core/Oops";
import { smc } from "../common/SingletonModuleComp";
@@ -272,7 +272,14 @@ export class SCardComp extends CCComp {
if (iconNode) {
iconNode.setScale(new Vec3(1, 1, 1));
this.clearIconAnimation(iconNode);
const iconId = skill?.icon || `${s_uuid}`;
// 驻场技能卡(skill=undefined 但有 field)使用 FieldSkillSet 中的图标
let iconId: string;
if (!this.cardData.skill && this.cardData.field && this.cardData.field.length > 0) {
const fieldUuid = this.cardData.field[0];
iconId = FieldSkillSet[fieldUuid]?.icon || `${fieldUuid}`;
} else {
iconId = skill?.icon || `${s_uuid}`;
}
this.updateIcon(iconNode, iconId);
}
}