refactor(ui/skill): 优化技能描述显示与字段文案

1.  将技能触发类型Field的文案从"场上存活"改为"光环"
2.  为技能名称添加「」引号包裹增强可读性
3.  调整英雄头像面板的UI布局与文字样式
This commit is contained in:
panFD
2026-07-31 00:46:51 +08:00
parent bf697906ae
commit fbaaefea8f
3 changed files with 236 additions and 240 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -193,7 +193,7 @@ function buildFieldLine(head: string, uuid: number): ISkillLine | null {
if (!fs) return null;
const desc = FieldDescSet[fs.type];
// 未入表类型回退基础备注 info整行不高亮
if (!desc) return { prefix: `${head}${fs.name} ${fs.info}`, value: "", suffix: "" };
if (!desc) return { prefix: `${head}${fs.name} ${fs.info}`, value: "", suffix: "" };
// 数值按格式渲染为高亮片段
let valueText: string;
@@ -209,7 +209,7 @@ function buildFieldLine(head: string, uuid: number): ISkillLine | null {
valueText = `+${fs.value}`;
break;
}
return { prefix: `${head}${fs.name} ${desc.verb}`, value: valueText, suffix: "" };
return { prefix: `${head}${fs.name} ${desc.verb}`, value: valueText, suffix: "" };
}
/**
@@ -227,7 +227,7 @@ function buildReviveLine(source: ISkillDescSource): ISkillLine | null {
const tpl = SkillTriggerDesc[SkillTriggerType.Revive] ?? "复活时";
// 高亮片段选回血百分比(数值中最关键的收益指标)
return {
prefix: `${tpl}:${base.name} 可复活${maxCount}次,每次恢复`,
prefix: `${tpl}:${base.name} 可复活${maxCount}次,每次恢复`,
value: `${hpPct}%`,
suffix: "生命",
};
@@ -269,14 +269,14 @@ function buildSkillLines(source: ISkillDescSource): ISkillLine[] {
if (!base) continue;
const skill = mergeSkillParams(base, item.overrides);
const trigger = tpl.replace("n", String(item.t_num));
lines.push(buildEffectLine(`${trigger}:${base.name} `, skill));
lines.push(buildEffectLine(`${trigger}:${base.name} `, skill));
}
}
// ---- 驻场光环field查 FieldDescSet 结构化渲染value 数值高亮 ----
const fieldUuids = source[SkillTriggerType.Field] as number[] | undefined;
if (fieldUuids?.length) {
const tpl = SkillTriggerDesc[SkillTriggerType.Field] ?? "场上存活";
const tpl = SkillTriggerDesc[SkillTriggerType.Field] ?? "光环";
for (const uuid of fieldUuids) {
const line = buildFieldLine(`${tpl}:`, uuid);
if (line) lines.push(line);

View File

@@ -137,7 +137,7 @@ export const SkillTriggerDesc = {
[SkillTriggerType.Dead]: "死亡时",
[SkillTriggerType.FStart]: "战斗开始时",
[SkillTriggerType.FEnd]: "战斗结束时",
[SkillTriggerType.Field]: "场上存活",
[SkillTriggerType.Field]: "光环",
[SkillTriggerType.Atking]: "攻击n次",
[SkillTriggerType.Atked]: "受击n次",
[SkillTriggerType.Revive]: "复活时",