refactor(skill&buff): 优化计时buff配置方式

移除冗余的7112/7113buff配置,统一复用7111基础配置
通过新增buff_duration参数实现持续时间和数值的灵活覆写
简化占卜师技能buff的多档成长配置逻辑
This commit is contained in:
pan
2026-07-24 10:35:39 +08:00
parent 9d3a7a49f7
commit aa937ae62f
4 changed files with 11 additions and 17 deletions

View File

@@ -74,25 +74,13 @@ export const BuffList: Record<number, BuffConfig> = {
is_control: true, control_kind: 'stun', is_control: true, control_kind: 'stun',
info: "击晕目标,无法行动", info: "击晕目标,无法行动",
}, },
// 占卜师战前攻击强化(限时版,三档成长:+30/5s → +60/7s → +90/10s // 占卜师战前攻击强化(基础档:+30/5s高阶通过 buff_value/buff_duration 覆写成长
7111: { 7111: {
id: 7111, name: "战前强攻", icon: "Stat_Attack_03", id: 7111, name: "战前强攻", icon: "Stat_Attack_03",
category: BuffCategory.Buff, duration: 5, max_stack: 0, category: BuffCategory.Buff, duration: 5, max_stack: 0,
modifiers: [{ attr: Attrs.ap, op: ModOp.Flat, value: 30 }], modifiers: [{ attr: Attrs.ap, op: ModOp.Flat, value: 30 }],
info: "攻击力 +30持续 5 秒", info: "攻击力 +30持续 5 秒",
}, },
7112: {
id: 7112, name: "战前强攻", icon: "Stat_Attack_03",
category: BuffCategory.Buff, duration: 7, max_stack: 0,
modifiers: [{ attr: Attrs.ap, op: ModOp.Flat, value: 60 }],
info: "攻击力 +60持续 7 秒",
},
7113: {
id: 7113, name: "战前强攻", icon: "Stat_Attack_03",
category: BuffCategory.Buff, duration: 10, max_stack: 0,
modifiers: [{ attr: Attrs.ap, op: ModOp.Flat, value: 90 }],
info: "攻击力 +90持续 10 秒",
},
// ==================== 玩家计时性强化(药水/技能用,默认 5s ==================== // ==================== 玩家计时性强化(药水/技能用,默认 5s ====================
// 计时性回血HoT // 计时性回血HoT

View File

@@ -156,6 +156,7 @@ export interface SkillConfig {
buff_type?: Attrs, // Buff 类型 (单一职责) buff_type?: Attrs, // Buff 类型 (单一职责)
timed_buff_id?: number, // 计时性 buff 配置 id指向 BuffList存在时走 buffManager 而非永久 add_* timed_buff_id?: number, // 计时性 buff 配置 id指向 BuffList存在时走 buffManager 而非永久 add_*
buff_value?: number, // 覆写计时 buff 的修饰数值modifiers.value / tick.damage_or_heal由药水卡自定义档位 buff_value?: number, // 覆写计时 buff 的修饰数值modifiers.value / tick.damage_or_heal由药水卡自定义档位
buff_duration?: number, // 覆写计时 buff 的持续时间(秒),不配置则用 BuffList 默认值
call_hero?: number, // 召唤技能召唤英雄id(可选) call_hero?: number, // 召唤技能召唤英雄id(可选)
is_accel?: boolean, // 是否逐渐加速飞行 is_accel?: boolean, // 是否逐渐加速飞行
info: string, // 技能描述 info: string, // 技能描述
@@ -174,6 +175,7 @@ export interface SkillOverrides {
buff_type?: Attrs; buff_type?: Attrs;
timed_buff_id?: number; timed_buff_id?: number;
buff_value?: number; buff_value?: number;
buff_duration?: number;
call_hero?: number; call_hero?: number;
is_accel?: boolean; is_accel?: boolean;
} }

View File

@@ -390,13 +390,13 @@ export const HeroInfo: Record<number, heroInfo> = {
uuid: 5051, name: "占卜师", path: "hm1", fac: FacSet.HERO, pool_lv: 1, lv: 1, type: HType.Long, hp: 143, ap: 40, uuid: 5051, name: "占卜师", path: "hm1", fac: FacSet.HERO, pool_lv: 1, lv: 1, type: HType.Long, hp: 143, ap: 40,
skills: { 6001: { uuid: 6001, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Mid3].cd, ccd: 0 } }, skills: { 6001: { uuid: 6001, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Mid3].cd, ccd: 0 } },
// 战前计时 buff每波开始全队 AP 限时提升(+30/5s → +60/7s → +90/10s6级追加暴击驻场光环 // 战前计时 buff每波开始全队 AP 限时提升(+30/5s → +60/7s → +90/10s6级追加暴击驻场光环
// 通过 overrides.timed_buff_id 切换 BuffList 中的限时 buff 配置,走 buffManager 限时路径 // 统一复用 7111 基础配置,通过 buff_value/buff_duration 覆写实现三档成长
fstart: [{ s_uuid: 6401, t_num: 1, overrides: { TGroup: TGroup.Team, timed_buff_id: 7111 } }], fstart: [{ s_uuid: 6401, t_num: 1, overrides: { TGroup: TGroup.Team, timed_buff_id: 7111 } }],
evolve: { evolve: {
2: { hp_bonus: 80 }, 2: { hp_bonus: 80 },
3: { fstart: [{ s_uuid: 6401, t_num: 1, overrides: { TGroup: TGroup.Team, timed_buff_id: 7112 } }] }, 3: { fstart: [{ s_uuid: 6401, t_num: 1, overrides: { TGroup: TGroup.Team, timed_buff_id: 7111, buff_value: 60, buff_duration: 7 } }] },
4: { hp_bonus: 80 }, 4: { hp_bonus: 80 },
5: { fstart: [{ s_uuid: 6401, t_num: 1, overrides: { TGroup: TGroup.Team, timed_buff_id: 7113 } }] }, 5: { fstart: [{ s_uuid: 6401, t_num: 1, overrides: { TGroup: TGroup.Team, timed_buff_id: 7111, buff_value: 90, buff_duration: 10 } }] },
6: { field: [7204] }, 6: { field: [7204] },
}, },
info: "战斗开始时全队攻击力限时提升(+30/5s→+60/7s→+90/10s6级起全队暴击率+20%(驻场)" info: "战斗开始时全队攻击力限时提升(+30/5s→+60/7s→+90/10s6级起全队暴击率+20%(驻场)"

View File

@@ -490,12 +490,16 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
// 计时性 buff配置了 timed_buff_id 时走 buffManager 限时路径, // 计时性 buff配置了 timed_buff_id 时走 buffManager 限时路径,
// 同一技能不应既永久加成又限时加成,故提前 return 跳过下方永久 add_* 逻辑 // 同一技能不应既永久加成又限时加成,故提前 return 跳过下方永久 add_* 逻辑
if (config.timed_buff_id) { if (config.timed_buff_id) {
// 汇总 buff 覆写参数value 覆写修饰数值duration 覆写持续时间
const buffOverrides: { value?: number; duration?: number } = {};
if (config.buff_value !== undefined) buffOverrides.value = config.buff_value;
if (config.buff_duration !== undefined) buffOverrides.duration = config.buff_duration;
buffManager.applyBuff( buffManager.applyBuff(
target.ent, target.ent,
config.timed_buff_id, config.timed_buff_id,
_cAttrsComp.hero_uuid, _cAttrsComp.hero_uuid,
_cAttrsComp.ap, _cAttrsComp.ap,
config.buff_value !== undefined ? { value: config.buff_value } : undefined Object.keys(buffOverrides).length > 0 ? buffOverrides : undefined
); );
return; return;
} }