diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index c2dd0c75..d8ddaae7 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -188,6 +188,9 @@ export interface SkillOverrides { revive_hp?: number; /** 复活次数上限,配合 revive_hp 使用(仅 dead 触发有效) */ revive_count?: number; + /** 英雄语境专属图标(图鉴面板/技能弹窗展示用):配置后覆盖 SkillSet.icon, + * 实现"同一底座、不同英雄/档位不同外观"(如 5002 普攻与冲刺斩同 6004 但图标不同) */ + icon?: string; } /** diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index a0ff32d1..635e3965 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -324,6 +324,64 @@ export function getFieldGroupName(hero: heroInfo | undefined): string { return firstUuid ? (FieldSkillSet[firstUuid]?.name ?? "") : ""; } +/** + * 解析技能的对外展示图标(英雄语境):英雄/触发引用侧通过 overrides.icon 覆写时优先, + * 缺省回退 SkillSet 底座 icon;驻场光环词条统一取 FieldSkillSet 底座 icon。 + * Why: 图标是"对外展示"维度(与数值覆写同一套注入机制),实现同一底座不同英雄/档位不同外观。 + * @param hero 英雄配置 + * @param skillUuid 技能 uuid(skills key / 触发组 s_uuid / FieldSkillSet uuid) + * @param slot 技能所属槽位(可空):指定时仅在该槽位查找;缺省按 普攻/大招→触发组 顺序定位 + * @param isGroup 整组模式:true 时取组内首个 s_uuid 的图标(slot 必填,光环取首个词条) + * @returns 图标ID;未找到返回 undefined + */ +export function getHeroSkillIcon(hero: heroInfo | undefined, skillUuid: number, slot?: SkillTriggerType, isGroup: boolean = false): string | undefined { + if (!hero) return undefined; + // 整组模式:组内首个 s_uuid/词条的图标 + if (isGroup && slot !== undefined) { + if (slot === SkillTriggerType.Field) { + const firstEntry = hero.field?.[0]?.uuids?.[0]; + return firstEntry ? FieldSkillSet[firstEntry.uuid]?.icon : undefined; + } + const grouped = hero[slot] as TriggerGrouped | undefined; + if (!grouped) return undefined; + for (const key in grouped) { + const icon = resolveTriggerSkillIcon(grouped[Number(key)]?.[0], Number(key)); + if (icon) return icon; + } + return undefined; + } + // 普攻/大招(slot 缺省时优先定位):lv_entries 首档 icon > 基础 overrides.icon > 底座 + const hSkill = hero.skills?.[skillUuid]; + if (hSkill && slot === undefined) { + return hSkill.lv_entries?.[0]?.overrides?.icon + ?? hSkill.overrides?.icon + ?? SkillSet[skillUuid]?.icon; + } + // 指定触发槽位:该组首个 s_uuid 首档 icon + if (slot !== undefined && slot !== SkillTriggerType.Field) { + const grouped = hero[slot] as TriggerGrouped | undefined; + const entry = grouped?.[skillUuid]?.[0]; + if (entry) return resolveTriggerSkillIcon(entry, skillUuid); + return undefined; + } + // 自动定位:再各触发组,最后光环 + for (const type of [SkillTriggerType.Call, SkillTriggerType.Dead, SkillTriggerType.FStart, SkillTriggerType.Atking, SkillTriggerType.Atked]) { + const grouped = hero[type] as TriggerGrouped | undefined; + const entry = grouped?.[skillUuid]?.[0]; + if (entry) return resolveTriggerSkillIcon(entry, skillUuid); + } + if (hero.field?.some(t => t.uuids.some(u => u.uuid === skillUuid))) { + return FieldSkillSet[skillUuid]?.icon; + } + return undefined; +} + +/** 触发技能档位图标:档位 overrides.icon 优先,缺省回退该 s_uuid 的底座 icon */ +function resolveTriggerSkillIcon(entry: LvTriggerEntry | undefined, skillUuid: number): string | undefined { + if (!entry) return undefined; + return entry.overrides?.icon ?? SkillSet[skillUuid]?.icon; +} + /** * 复活已纳入 dead 触发组:通过 SkillOverrides.revive_hp / revive_count 配置, * 不再需要独立的 revive 字段和解析函数。 @@ -490,21 +548,23 @@ export const HeroInfo: Record = { 5001: { uuid: 5001, name: "叠甲骑士", path: "hk1", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, hp: HERO_ROLE_BASE[HRole.Tank].hp + 20, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def + 10, skills: { - 6004: { uuid: 6004, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: {"ap":100}, desc: "挥剑对{target}造成攻击力{ap}%伤害", + 6004: { + uuid: 6004, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { "ap": 100 }, desc: "挥剑对{target}造成攻击力{ap}%伤害", lv_entries: [ - { lv: 2, s_lv: SkillLv.Lv2, overrides: {"ap":120} }, + { lv: 2, s_lv: SkillLv.Lv2, overrides: { "ap": 120 } }, ], }, - 6301: { uuid: 6301, name: "魔法盾", lv: 1, cd: 8, ccd: 0, overrides: {"ap":30}, desc: "{target}获得生命最大值{ap}%的护盾", + 6301: { + uuid: 6301, name: "魔法盾", lv: 1, cd: 8, ccd: 0, overrides: { "ap": 30 }, desc: "{target}获得生命最大值{ap}%的护盾", lv_entries: [ - { lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":60}, desc: "{target}获得生命最大值{ap}%的护盾" }, - { lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":120}, desc: "{target}获得生命最大值{ap}%的护盾" }, + { lv: 8, s_lv: SkillLv.Lv2, overrides: { "ap": 60 }, desc: "{target}获得生命最大值{ap}%的护盾" }, + { lv: 16, s_lv: SkillLv.Lv3, overrides: { "ap": 120 }, desc: "{target}获得生命最大值{ap}%的护盾" }, ], }, }, atked: { 6301: [ - { lv: 4, s_lv: SkillLv.Lv1, name: "全体圣盾", t_num: 3, overrides: {"TGroup":null,"ap":10,"summon_count":1}, desc: "全队获得本英雄生命最大值{ap}%的护盾" }, + { lv: 4, s_lv: SkillLv.Lv1, name: "全体圣盾", t_num: 3, overrides: { "TGroup": null, "ap": 10, "summon_count": 1 }, desc: "全队获得本英雄生命最大值{ap}%的护盾" }, ], }, info: "", @@ -513,21 +573,23 @@ export const HeroInfo: Record = { 5002: { uuid: 5002, name: "易伤剑仙", path: "hk3", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, hp: HERO_ROLE_BASE[HRole.Warrior].hp + 5, ap: HERO_ROLE_BASE[HRole.Warrior].ap + 20, def: HERO_ROLE_BASE[HRole.Warrior].def + 5, skills: { - 6004: { uuid: 6004, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: {"ap":100}, desc: "对{target}造成攻击力{ap}%伤害", + 6004: { + uuid: 6004, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { "ap": 100 }, desc: "对{target}造成攻击力{ap}%伤害", lv_entries: [ - { lv: 2, s_lv: SkillLv.Lv2, overrides: {"ap":120} }, + { lv: 2, s_lv: SkillLv.Lv2, overrides: { "ap": 120 } }, ], }, - 6101: { uuid: 6101, name: "气斩", lv: 1, cd: 8, ccd: 0, overrides: {"ap":150,"timed_buff_id":7002,"summon_count":1}, desc: "斩出气刃,对{target}造成攻击力{ap}%伤害,并使目标易伤(受到伤害加深,持续{dur}秒)", + 6101: { + uuid: 6101, name: "气斩", lv: 1, cd: 8, ccd: 0, overrides: { "ap": 150, "timed_buff_id": 7002, "summon_count": 1 }, desc: "斩出气刃,对{target}造成攻击力{ap}%伤害,并使目标易伤(受到伤害加深,持续{dur}秒)", lv_entries: [ - { lv: 8, s_lv: SkillLv.Lv2, overrides: {"buff_value":20,"summon_count":1} }, - { lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":180,"bck":60,"buff_value":40,"summon_count":2}, desc: "斩出气刃,对{target}造成攻击力{ap}%伤害,击退{bck},并使目标易伤(持续{dur}秒)" }, + { lv: 8, s_lv: SkillLv.Lv2, overrides: { "buff_value": 20, "summon_count": 1 } }, + { lv: 16, s_lv: SkillLv.Lv3, overrides: { "ap": 180, "bck": 60, "buff_value": 40, "summon_count": 2 }, desc: "斩出气刃,对{target}造成攻击力{ap}%伤害,击退{bck},并使目标易伤(持续{dur}秒)" }, ], }, }, atking: { 6004: [ - { lv: 4, s_lv: SkillLv.Lv1, name: "风暴打击", t_num: 3, overrides: {"ap":300}, desc: "立刻打击{target},造成攻击力{ap}%伤害" }, + { lv: 4, s_lv: SkillLv.Lv1, name: "风暴打击", t_num: 3, overrides: { "ap": 300 }, desc: "立刻打击{target},造成攻击力{ap}%伤害" }, ], }, info: "", @@ -536,15 +598,17 @@ export const HeroInfo: Record = { 5003: { uuid: 5003, name: "眩晕暴击哥", path: "hk5", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, hp: HERO_ROLE_BASE[HRole.Warrior].hp + 5, ap: HERO_ROLE_BASE[HRole.Warrior].ap + 20, def: HERO_ROLE_BASE[HRole.Warrior].def + 5, skills: { - 6004: { uuid: 6004, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: {"ap":100}, desc: "挥斧对{target}造成攻击力{ap}%伤害", + 6004: { + uuid: 6004, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { "ap": 100 }, desc: "挥斧对{target}造成攻击力{ap}%伤害", lv_entries: [ - { lv: 2, s_lv: SkillLv.Lv2, overrides: {"stun":10}, desc: "挥斧对{target}造成攻击力{ap}%伤害,{stun}%概率击晕" }, + { lv: 2, s_lv: SkillLv.Lv2, overrides: { "stun": 10 }, desc: "挥斧对{target}造成攻击力{ap}%伤害,{stun}%概率击晕" }, ], }, - 6104: { uuid: 6104, name: "开山斧", lv: 1, cd: 8, ccd: 0, overrides: {"ap":300,"stun":100,"summon_count":1}, desc: "劈出开山斧,对{target}造成攻击力{ap}%伤害,必定击晕", + 6104: { + uuid: 6104, name: "开山斧", lv: 1, cd: 8, ccd: 0, overrides: { "ap": 300, "stun": 100, "summon_count": 1 }, desc: "劈出开山斧,对{target}造成攻击力{ap}%伤害,必定击晕", lv_entries: [ - { lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":450,"stun":100,"summon_count":1} }, - { lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":450,"stun":100,"summon_count":2} }, + { lv: 8, s_lv: SkillLv.Lv2, overrides: { "ap": 450, "stun": 100, "summon_count": 1 } }, + { lv: 16, s_lv: SkillLv.Lv3, overrides: { "ap": 450, "stun": 100, "summon_count": 2 } }, ], }, }, @@ -557,15 +621,17 @@ export const HeroInfo: Record = { 5004: { uuid: 5004, name: "刀刀暴击", path: "hc1", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Mid, grow_type: HGrowType.Assassin, role: HRole.Assassin, hp: HERO_ROLE_BASE[HRole.Assassin].hp, ap: HERO_ROLE_BASE[HRole.Assassin].ap + 30, def: HERO_ROLE_BASE[HRole.Assassin].def, skills: { - 6002: { uuid: 6002, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Fast].cd, ccd: 0, overrides: {"ap":100}, desc: "挥刀对{target}造成攻击力{ap}%伤害", + 6002: { + uuid: 6002, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Fast].cd, ccd: 0, overrides: { "ap": 100 }, desc: "挥刀对{target}造成攻击力{ap}%伤害", lv_entries: [ - { lv: 2, s_lv: SkillLv.Lv2, overrides: {"crt":10}, desc: "挥刀对{target}造成攻击力{ap}%伤害,{crt}%概率暴击" }, + { lv: 2, s_lv: SkillLv.Lv2, overrides: { "crt": 10 }, desc: "挥刀对{target}造成攻击力{ap}%伤害,{crt}%概率暴击" }, ], }, - 6100: { uuid: 6100, name: "光闪", lv: 1, cd: 8, ccd: 0, overrides: {"ap":150,"summon_count":1}, desc: "斩出光闪,对{target}造成攻击力{ap}%伤害", + 6100: { + uuid: 6100, name: "光闪", lv: 1, cd: 8, ccd: 0, overrides: { "ap": 150, "summon_count": 1 }, desc: "斩出光闪,对{target}造成攻击力{ap}%伤害", lv_entries: [ - { lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":250,"summon_count":1} }, - { lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":350,"summon_count":2} }, + { lv: 8, s_lv: SkillLv.Lv2, overrides: { "ap": 250, "summon_count": 1 } }, + { lv: 16, s_lv: SkillLv.Lv3, overrides: { "ap": 350, "summon_count": 2 } }, ], }, }, @@ -578,15 +644,17 @@ export const HeroInfo: Record = { 5005: { uuid: 5005, name: "出血贼", path: "hc2", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Mid, grow_type: HGrowType.Assassin, role: HRole.Assassin, hp: HERO_ROLE_BASE[HRole.Assassin].hp, ap: HERO_ROLE_BASE[HRole.Assassin].ap + 30, def: HERO_ROLE_BASE[HRole.Assassin].def, skills: { - 6002: { uuid: 6002, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Fast].cd, ccd: 0, overrides: {"ap":100}, desc: "挥刀对{target}造成攻击力{ap}%伤害", + 6002: { + uuid: 6002, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Fast].cd, ccd: 0, overrides: { "ap": 100 }, desc: "挥刀对{target}造成攻击力{ap}%伤害", lv_entries: [ - { lv: 2, s_lv: SkillLv.Lv2, overrides: {"timed_buff_id":7007,"buff_value":30,"buff_chance":30}, desc: "挥刀对{target}造成攻击力{ap}%伤害,{buff_chance}%概率使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" }, + { lv: 2, s_lv: SkillLv.Lv2, overrides: { "timed_buff_id": 7007, "buff_value": 30, "buff_chance": 30 }, desc: "挥刀对{target}造成攻击力{ap}%伤害,{buff_chance}%概率使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" }, ], }, - 6103: { uuid: 6103, name: "闪电斩", lv: 1, cd: 8, ccd: 0, overrides: {"ap":150,"summon_count":1}, desc: "召唤落雷斩击{target},造成攻击力{ap}%伤害", + 6103: { + uuid: 6103, name: "闪电斩", lv: 1, cd: 8, ccd: 0, overrides: { "ap": 150, "summon_count": 1 }, desc: "召唤落雷斩击{target},造成攻击力{ap}%伤害", lv_entries: [ - { lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":250,"timed_buff_id":7007,"summon_count":1}, desc: "召唤落雷斩击{target},造成攻击力{ap}%伤害,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" }, - { lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":350,"para":50,"timed_buff_id":7007,"buff_value":60,"summon_count":2}, desc: "召唤落雷斩击{target},造成攻击力{ap}%伤害,{para}%概率麻痹,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" }, + { lv: 8, s_lv: SkillLv.Lv2, overrides: { "ap": 250, "timed_buff_id": 7007, "summon_count": 1 }, desc: "召唤落雷斩击{target},造成攻击力{ap}%伤害,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" }, + { lv: 16, s_lv: SkillLv.Lv3, overrides: { "ap": 350, "para": 50, "timed_buff_id": 7007, "buff_value": 60, "summon_count": 2 }, desc: "召唤落雷斩击{target},造成攻击力{ap}%伤害,{para}%概率麻痹,并使目标出血(每0.5秒受到{buff_value}点伤害,持续{dur}秒)" }, ], }, }, @@ -599,15 +667,17 @@ export const HeroInfo: Record = { 5006: { uuid: 5006, name: "冻箭哥", path: "ha1", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Long, grow_type: HGrowType.Archer, role: HRole.Archer, hp: HERO_ROLE_BASE[HRole.Archer].hp, ap: HERO_ROLE_BASE[HRole.Archer].ap + 30, def: HERO_ROLE_BASE[HRole.Archer].def, skills: { - 6006: { uuid: 6006, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Normal].cd, ccd: 0, overrides: {"ap":100}, desc: "射出箭矢,对{target}造成攻击力{ap}%伤害", + 6006: { + uuid: 6006, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Normal].cd, ccd: 0, overrides: { "ap": 100 }, desc: "射出箭矢,对{target}造成攻击力{ap}%伤害", lv_entries: [ - { lv: 2, s_lv: SkillLv.Lv2, overrides: {"bck":10}, desc: "射出箭矢,对{target}造成攻击力{ap}%伤害,击退{bck}" }, + { lv: 2, s_lv: SkillLv.Lv2, overrides: { "bck": 10 }, desc: "射出箭矢,对{target}造成攻击力{ap}%伤害,击退{bck}" }, ], }, - 6150: { uuid: 6150, name: "万箭齐发·冰", lv: 1, cd: 8, ccd: 0, overrides: {"ap":150,"frz":30,"summon_count":1}, desc: "万箭齐发,对{target}造成攻击力{ap}%伤害,{frz}%概率冰冻", + 6150: { + uuid: 6150, name: "万箭齐发·冰", lv: 1, cd: 8, ccd: 0, overrides: { "ap": 150, "frz": 30, "summon_count": 1 }, desc: "万箭齐发,对{target}造成攻击力{ap}%伤害,{frz}%概率冰冻", lv_entries: [ - { lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":200,"frz":50,"summon_count":1} }, - { lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":250,"frz":70,"summon_count":2} }, + { lv: 8, s_lv: SkillLv.Lv2, overrides: { "ap": 200, "frz": 50, "summon_count": 1 } }, + { lv: 16, s_lv: SkillLv.Lv3, overrides: { "ap": 250, "frz": 70, "summon_count": 2 } }, ], }, }, @@ -620,15 +690,17 @@ export const HeroInfo: Record = { 5007: { uuid: 5007, name: "击退火女", path: "hm1", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, hp: HERO_ROLE_BASE[HRole.Mage].hp - 5, ap: HERO_ROLE_BASE[HRole.Mage].ap + 10, def: HERO_ROLE_BASE[HRole.Mage].def, skills: { - 6010: { uuid: 6010, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: {"ap":100,"bck":30}, desc: "掷出紫魔球,对{target}造成攻击力{ap}%伤害,击退{bck}", + 6010: { + uuid: 6010, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { "ap": 100, "bck": 30 }, desc: "掷出紫魔球,对{target}造成攻击力{ap}%伤害,击退{bck}", lv_entries: [ - { lv: 2, s_lv: SkillLv.Lv2, overrides: {"bck":40} }, + { lv: 2, s_lv: SkillLv.Lv2, overrides: { "bck": 40 } }, ], }, - 6200: { uuid: 6200, name: "火焰喷射", lv: 1, cd: 8, ccd: 0, overrides: {"ap":250,"bck":100,"summon_count":1}, desc: "喷出烈焰风暴,对{target}造成攻击力{ap}%伤害,击退{bck}", + 6200: { + uuid: 6200, name: "火焰喷射", lv: 1, cd: 8, ccd: 0, overrides: { "ap": 250, "bck": 100, "summon_count": 1 }, desc: "喷出烈焰风暴,对{target}造成攻击力{ap}%伤害,击退{bck}", lv_entries: [ - { lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":350,"bck":100,"summon_count":1} }, - { lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":450,"bck":100,"summon_count":2} }, + { lv: 8, s_lv: SkillLv.Lv2, overrides: { "ap": 350, "bck": 100, "summon_count": 1 } }, + { lv: 16, s_lv: SkillLv.Lv3, overrides: { "ap": 450, "bck": 100, "summon_count": 2 } }, ], }, }, @@ -641,26 +713,28 @@ export const HeroInfo: Record = { 5008: { uuid: 5008, name: "团疗奶爸", path: "hh1", fac: FacSet.HERO, rarity: 1, lv: 1, type: HType.Long, grow_type: HGrowType.Support, role: HRole.Support, hp: HERO_ROLE_BASE[HRole.Support].hp + 10, ap: HERO_ROLE_BASE[HRole.Support].ap + 20, def: HERO_ROLE_BASE[HRole.Support].def, skills: { - 6011: { uuid: 6011, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Normal].cd, ccd: 0, overrides: {"ap":100}, desc: "挥杖对{target}造成攻击力{ap}%伤害", + 6011: { + uuid: 6011, name: "强化普攻", lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Normal].cd, ccd: 0, overrides: { "ap": 100 }, desc: "挥杖对{target}造成攻击力{ap}%伤害", lv_entries: [ - { lv: 2, s_lv: SkillLv.Lv2, overrides: {"bck":10}, desc: "挥杖对{target}造成攻击力{ap}%伤害,击退{bck}" }, + { lv: 2, s_lv: SkillLv.Lv2, overrides: { "bck": 10 }, desc: "挥杖对{target}造成攻击力{ap}%伤害,击退{bck}" }, ], }, - 6302: { uuid: 6302, name: "治疗", lv: 1, cd: 8, ccd: 0, overrides: {"ap":300,"summon_count":1}, desc: "为{target}回复攻击力{ap}%生命", + 6302: { + uuid: 6302, name: "治疗", lv: 1, cd: 8, ccd: 0, overrides: { "ap": 300, "summon_count": 1 }, desc: "为{target}回复攻击力{ap}%生命", lv_entries: [ - { lv: 8, s_lv: SkillLv.Lv2, overrides: {"ap":400,"summon_count":1} }, - { lv: 16, s_lv: SkillLv.Lv3, overrides: {"ap":450,"summon_count":2} }, + { lv: 8, s_lv: SkillLv.Lv2, overrides: { "ap": 400, "summon_count": 1 } }, + { lv: 16, s_lv: SkillLv.Lv3, overrides: { "ap": 450, "summon_count": 2 } }, ], }, }, atking: { 6301: [ - { lv: 4, s_lv: SkillLv.Lv1, name: "圣愈之盾", t_num: 3, overrides: {"ap":30,"summon_count":1}, desc: "{target}获得生命最大值{ap}%的护盾" }, + { lv: 4, s_lv: SkillLv.Lv1, name: "圣愈之盾", t_num: 3, overrides: { "ap": 30, "summon_count": 1 }, desc: "{target}获得生命最大值{ap}%的护盾" }, ], }, info: "", }, -// @hero-setup:heroes-end + // @hero-setup:heroes-end /* *=============怪物配置列表================ diff --git a/assets/script/game/map/SSkillBoxComp.ts b/assets/script/game/map/SSkillBoxComp.ts index 13aa42ec..dc93d09d 100644 --- a/assets/script/game/map/SSkillBoxComp.ts +++ b/assets/script/game/map/SSkillBoxComp.ts @@ -6,7 +6,7 @@ import { CardTriggerType } from "../common/config/CardSet"; import { SkillSet, FieldSkillSet } from "../common/config/SkillSet"; import { FieldEntry, HeroInfo, TriggerGrouped, SkillTriggerType, - getGroupedTriggerName, getFieldSkillName, getTriggerGroupName, getFieldGroupName, + getGroupedTriggerName, getFieldSkillName, getTriggerGroupName, getFieldGroupName, getHeroSkillIcon, } from "../common/config/heroSet"; import { UIID } from "../common/config/GameUIConfig"; import { smc } from "../common/SingletonModuleComp"; @@ -234,15 +234,19 @@ export class SSkillBoxComp extends CCComp { // 优先使用卡牌自定义 icon;未定义则按图鉴模式 / 装备卡 trigger_type 自动取 let iconId: string | undefined = this.card_icon; if (!iconId) { - if (this.hero_icon_source === "field") { - // 英雄图鉴:驻场光环词条图标取 FieldSkillSet + if (this.hero_uuid > 0) { + // 英雄图鉴:英雄语境图标优先(overrides.icon 覆写),底座 icon 兜底 + iconId = getHeroSkillIcon(HeroInfo[this.hero_uuid], this.s_uuid, this.hero_slot, this.hero_group); + } + if (!iconId && this.hero_icon_source === "field") { + // 光环词条图标取 FieldSkillSet iconId = this.s_uuid ? FieldSkillSet[this.s_uuid]?.icon : undefined; - } else if (this.hero_icon_source === "skill") { - // 英雄图鉴:大招/触发技能图标取 SkillSet + } else if (!iconId && this.hero_icon_source === "skill") { + // 大招/触发技能图标取 SkillSet iconId = this.s_uuid ? SkillSet[this.s_uuid]?.icon : undefined; - } else if (this.trigger_type === CardTriggerType.Interval) { + } else if (!iconId && this.trigger_type === CardTriggerType.Interval) { iconId = this.s_uuid ? SkillSet[this.s_uuid]?.icon : undefined; - } else if (this.trigger_type === CardTriggerType.Field) { + } else if (!iconId && this.trigger_type === CardTriggerType.Field) { const fieldUuid = this.field?.[0]?.uuid; iconId = fieldUuid ? FieldSkillSet[fieldUuid]?.icon : undefined; } diff --git a/assets/script/game/map/SinfoComp.ts b/assets/script/game/map/SinfoComp.ts index e30f2467..43bb7b83 100644 --- a/assets/script/game/map/SinfoComp.ts +++ b/assets/script/game/map/SinfoComp.ts @@ -35,7 +35,7 @@ import { oops } from "db://oops-framework/core/Oops"; import { CardTriggerType, CardConfig } from "../common/config/CardSet"; import { SkillSet, FieldSkillSet } from "../common/config/SkillSet"; import { SkillCardList } from "../common/config/SCardSet"; -import { FieldEntry, SkillTriggerType } from "../common/config/heroSet"; +import { FieldEntry, SkillTriggerType, HeroInfo, getHeroSkillIcon } from "../common/config/heroSet"; import { buildCardDescRich } from "../common/config/CardSkillText"; import { buildHeroSkillTierLines, buildHeroGroupTierLines, HeroSkillTierLine } from "../common/HeroSkillText"; import { smc } from "../common/SingletonModuleComp"; @@ -372,6 +372,10 @@ export class SinfoComp extends CCComp { /** 解析图标ID */ private resolveIconId(p: SInfoParams): string | undefined { if (p.card_icon) return p.card_icon; + // 英雄图鉴模式:英雄语境图标优先(overrides.icon 覆写),底座 icon 兜底 + if (p.hero_uuid) { + return getHeroSkillIcon(HeroInfo[p.hero_uuid], p.uuid, p.hero_slot, p.hero_group); + } // 技能卡:从 SkillCardList 查 icon const skillCard = SkillCardList.find(c => c.uuid === p.uuid || c.skill === p.uuid); if (skillCard?.icon) return skillCard.icon; diff --git a/put/web/src/components/OverrideEditor.vue b/put/web/src/components/OverrideEditor.vue index 1cc0dabb..92eaff42 100644 --- a/put/web/src/components/OverrideEditor.vue +++ b/put/web/src/components/OverrideEditor.vue @@ -1,10 +1,23 @@