diff --git a/assets/resources/gui/element/ibox.prefab b/assets/resources/gui/element/ibox.prefab index 06055ab9..e15e3d99 100644 --- a/assets/resources/gui/element/ibox.prefab +++ b/assets/resources/gui/element/ibox.prefab @@ -848,15 +848,15 @@ "__id__": 42 }, "_lineHeight": 21, - "_string": "RichText", + "_string": "ewrwerwer", "_horizontalAlign": 0, "_verticalAlign": 1, "_fontSize": 20, "_fontColor": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, + "r": 48, + "g": 48, + "b": 48, "a": 255 }, "_maxWidth": 680, diff --git a/assets/resources/gui/element/sbox.prefab b/assets/resources/gui/element/sbox.prefab index 9a06b372..ac5c9bab 100644 --- a/assets/resources/gui/element/sbox.prefab +++ b/assets/resources/gui/element/sbox.prefab @@ -3715,7 +3715,7 @@ }, { "__type__": "cc.Node", - "_name": "Label", + "_name": "num", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -3737,7 +3737,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": 0, + "y": -26.82, "z": 0 }, "_lrot": { @@ -3918,7 +3918,9 @@ "bg_node": { "__id__": 2 }, - "info_label": null, + "num_label": { + "__id__": 167 + }, "cd_mask": { "__id__": 156 }, diff --git a/assets/script/game/common/config/BuffSet.ts b/assets/script/game/common/config/BuffSet.ts index 037510c9..770b9d11 100644 --- a/assets/script/game/common/config/BuffSet.ts +++ b/assets/script/game/common/config/BuffSet.ts @@ -160,4 +160,11 @@ export const BuffList: Record = { modifiers: [{ attr: Attrs.critical_damage, op: ModOp.Flat, value: 30 }], info: "暴击伤害提升 30%,持续 5 秒", }, + // 冰冻概率强化(限时) + 7021: { + id: 7021, name: "冰冻概率爆发", icon: "Stat_Freeze", + category: BuffCategory.Buff, duration: 5, max_stack: 1, + modifiers: [{ attr: Attrs.freeze_chance, op: ModOp.Flat, value: 5 }], + info: "冰冻概率提升 5%,持续 5 秒", + }, }; diff --git a/assets/script/game/map/SkillBoxComp.ts b/assets/script/game/map/SkillBoxComp.ts index e2c449e6..16c6c0e7 100644 --- a/assets/script/game/map/SkillBoxComp.ts +++ b/assets/script/game/map/SkillBoxComp.ts @@ -65,7 +65,7 @@ export class SkillBoxComp extends CCComp { /** 剩余次数标签 */ @property(Label) - private info_label: Label = null; + private num_label: Label = null; /** cd计时遮罩 */ @property({ type: Node }) @@ -248,7 +248,9 @@ export class SkillBoxComp extends CCComp { this.card_lv = card_lv; // 查询触发配置(药水卡不在 SkillCardList,会走 else 分支) - const config = SkillCardList.find(c => c.uuid === uuid); + // 同时按 卡uuid 或 技能skill id 查找:MissSkillsComp.addSkill 传入的是 payload.skill(技能ID), + // 而 SkillCardList 的 uuid 字段是卡ID(如 8101),必须兼容 skill 字段匹配(如 6001) + const config = SkillCardList.find(c => c.uuid === uuid || c.skill === uuid); if (config) { this.s_uuid = config.skill ?? uuid; // 获取实际的技能 UUID this.is_instant = config.is_inst ?? true; @@ -302,6 +304,11 @@ export class SkillBoxComp extends CCComp { case CardTriggerType.Interval: // 定时循环:监听 FightStart 进入战斗后启动计时 oops.message.on(GameEvent.FightStart, this.onFightStart, this); + // 若购买时战斗已在进行(FightStart 已派发过),立即进入战斗态,避免空等下一波 + if (smc.mission.in_fight) { + this.in_combat = true; + this.timer = 0; + } break; case CardTriggerType.Field: @@ -437,7 +444,7 @@ export class SkillBoxComp extends CCComp { this.trigger_type === CardTriggerType.HeroDead || this.trigger_type === CardTriggerType.HeroCall; - if (this.info_label) { + if (this.num_label) { if (showRemainCount) { // 事件型按 trigger_limit;Interval 按 t_times const isEvent = @@ -449,24 +456,31 @@ export class SkillBoxComp extends CCComp { const total = isEvent ? this.trigger_limit : this.trigger_times; if (isEvent && !isFinite(total)) { // 无上限:显示已触发次数 - this.info_label.string = `${used}`; + this.num_label.string = `${used}`; } else { const remain = Math.max(0, Math.floor(total) - used); - this.info_label.string = `${remain}`; + this.num_label.string = `${remain}`; } } else { - this.info_label.string = ""; + this.num_label.string = ""; } } // 初始化或重置 CD 遮罩表现(仅 Interval 类型有冷却进度) + // cd_mask 使用 Sprite.Type.FILLED + FillType.RADIAL(径向擦除,典型 CD 表现) if (this.cd_mask && this.cd_mask.isValid) { let sprite = this.cd_mask.getComponent(Sprite); if (sprite) { if (this.trigger_type === CardTriggerType.Interval && this.trigger_interval > 0) { + // 强制设为 FILLED + RADIAL,确保在编辑器里漏配也能正常运行 + if (sprite.type !== Sprite.Type.FILLED) sprite.type = Sprite.Type.FILLED; + if (sprite.fillType !== Sprite.FillType.RADIAL) sprite.fillType = Sprite.FillType.RADIAL; + this.cd_mask.active = true; sprite.fillRange = Math.max(0, 1 - (this.timer / this.trigger_interval)); } else { - sprite.fillRange = 0; // 非冷却类型直接归 0 + // 非冷却类型直接隐藏遮罩 + this.cd_mask.active = false; + sprite.fillRange = 0; } } }