style(heroSkill): 为技能描述添加持续时间高亮
优化技能描述文本的显示效果,给计时buff的持续时间数值添加高亮配色,提升玩家阅读体验
This commit is contained in:
@@ -326,9 +326,11 @@ export function buildSkillDescRich(source: ISkillDescSource): string {
|
||||
return buildSkillLines(source)
|
||||
.map(l => {
|
||||
const prefix = l.prefix.replace(SKILL_NAME_PATTERN, `「<color=${RICH_NAME_COLOR}>$1</color>」`);
|
||||
return l.value
|
||||
const text = l.value
|
||||
? `${prefix}<color=${RICH_VALUE_COLOR}>${l.value}</color>${l.suffix}`
|
||||
: `${prefix}${l.suffix}`;
|
||||
// 持续时间数值同样高亮(计时 buff 的"持续X秒")
|
||||
return highlightDuration(text);
|
||||
})
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user