feat(skill-override): 新增反伤相关的覆写配置
1. 在常量文件中添加thorns_dmg和thorns_rate的覆写配置项 2. 在服务端和前端技能详情展示中添加反伤参数的解析展示逻辑
This commit is contained in:
@@ -243,6 +243,8 @@ function overrideShort(ov, { includeAp = true } = {}) {
|
||||
if (ov.para != null) parts.push(`para${ov.para}`)
|
||||
if (ov.frz != null) parts.push(`frz${ov.frz}`)
|
||||
if (ov.bck != null) parts.push(`bck${ov.bck}`)
|
||||
if (ov.thorns_dmg != null) parts.push(`thorns${ov.thorns_dmg}`)
|
||||
if (ov.thorns_rate != null) parts.push(`thorns${ov.thorns_rate}%`)
|
||||
if (ov.summon_count != null && ov.summon_count > 1) parts.push(`summon${ov.summon_count}`)
|
||||
if (ov.timed_buff_id != null) {
|
||||
const buffName = cache?.BuffList?.[ov.timed_buff_id]?.name || ''
|
||||
|
||||
@@ -241,6 +241,8 @@ function skillDetail(sk) {
|
||||
if (sk.overrides?.timed_buff_id != null) parts.push(`buff${sk.overrides.timed_buff_id}`)
|
||||
if (sk.overrides?.frz != null) parts.push(`frz${sk.overrides.frz}`)
|
||||
if (sk.overrides?.stun != null) parts.push(`stun${sk.overrides.stun}`)
|
||||
if (sk.overrides?.thorns_dmg != null) parts.push(`thorns${sk.overrides.thorns_dmg}`)
|
||||
if (sk.overrides?.thorns_rate != null) parts.push(`thorns${sk.overrides.thorns_rate}%`)
|
||||
if (sk.overrides?.summon_count != null) parts.push(`数${sk.overrides.summon_count}`)
|
||||
if (sk.lv_entries?.length) parts.push(`→lv${Math.max(...sk.lv_entries.map((e) => e.lv))}`)
|
||||
return parts.join(' ')
|
||||
|
||||
@@ -112,6 +112,8 @@ export const OVERRIDE_KEYS = [
|
||||
{ key: 'buff_value', label: 'buff_value 修饰数值' },
|
||||
{ key: 'buff_duration', label: 'buff_duration 持续时间' },
|
||||
{ key: 'buff_chance', label: 'buff_chance 附加概率' },
|
||||
{ key: 'thorns_dmg', label: 'thorns_dmg 反伤固定值' },
|
||||
{ key: 'thorns_rate', label: 'thorns_rate 反伤比例(%)' },
|
||||
// 枚举型覆写:计时 buff 施加目标(缺省跟随技能主效果目标,见 SkillSet.BuffTarget)
|
||||
{ key: 'buff_target', label: 'buff_target buff施加目标', type: 'enum', options: [
|
||||
{ value: 0, label: '0 被命中者(Hit/默认)' },
|
||||
|
||||
Reference in New Issue
Block a user