feat(buff): 新增间隔触发型buff效果支持

- 在 SkillSet.ts 中添加 BuffRunType 枚举和 interval 配置字段
- 在 HeroAttrsComp 中实现间隔效果处理逻辑,支持持续治疗和流血等效果
- 新增 INTERVAL_EFFECTS 数组和 updateIntervalEffectsBySystem 方法来管理间隔触发
- 添加 10311(持续治疗)和 10312(流血)两个示例buff配置
This commit is contained in:
panw
2026-03-13 10:21:40 +08:00
parent 3b545e3bff
commit d2418c03c8
2 changed files with 101 additions and 19 deletions

View File

@@ -47,6 +47,11 @@ export enum SkillKind {
Support = 3
}
export enum BuffRunType {
Attr = 0,
Interval = 1
}
/**
* 攻击距离类型分类
* 用于AI决策和技能配置规范化
@@ -147,6 +152,8 @@ export interface BuffConf {
chance:number; // 触发概率
info?:string; // 描述
isDebuff?:boolean; // 是否为负面效果
runType?:BuffRunType;
interval?:number;
}
interface IReady {
@@ -325,6 +332,8 @@ export const BuffsList: Record<number, BuffConf> = {
10301: { uuid: 10301, name: "治疗", icon: "1292", buff: Attrs.hp, BType: BType.RATIO, value: 30, time: 0, chance: 1, info: "回复30%最大生命值" },
// 护盾 (基于攻击力百分比)
10302: { uuid: 10302, name: "护盾", icon: "1255", buff: Attrs.shield, BType: BType.RATIO, value: 30, time: 0, chance: 1, info: "获得30%最大生命值护盾" },
10311: { uuid: 10311, name: "持续治疗", icon: "1292", buff: Attrs.hp, BType: BType.RATIO, value: 5, time: 5, interval: 1, chance: 1, runType: BuffRunType.Interval, info: "每秒回复5%最大生命值持续5秒" },
10312: { uuid: 10312, name: "流血", icon: "10211", buff: Attrs.hp, BType: BType.RATIO, value: -4, time: 5, interval: 1, chance: 1, isDebuff: true, runType: BuffRunType.Interval, info: "每秒损失4%最大生命值持续5秒" },
// ========== 减益类 Buff (属性降低) ========== 10200 - 10299
// 减速 (移动速度降低)