feat(技能系统): 扩展Buff运行类型并修复治疗与护盾配置
- 扩展BuffRunType枚举,新增Permanent和Timed类型,明确区分永久、定时和间隔效果 - 在HeroAttrsComp中重构addBuff方法,根据配置智能解析运行类型 - 为治疗(10301)和护盾(10302)配置显式添加runType: Permanent,确保逻辑一致性 - 修复定时Buff的持续时间处理,避免time为0时使用默认值1
This commit is contained in:
@@ -48,8 +48,9 @@ export enum SkillKind {
|
||||
}
|
||||
|
||||
export enum BuffRunType {
|
||||
Attr = 0,
|
||||
Interval = 1
|
||||
Permanent = 0,
|
||||
Timed = 1,
|
||||
Interval = 2
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -329,9 +330,9 @@ export const BuffsList: Record<number, BuffConf> = {
|
||||
|
||||
// ========== 治疗与护盾 (转换自原 SType) ========== 10300 - 10399
|
||||
// 治疗 (基于攻击力百分比)
|
||||
10301: { uuid: 10301, name: "治疗", icon: "1292", buff: Attrs.hp, BType: BType.RATIO, value: 30, time: 0, chance: 1, info: "回复30%最大生命值" },
|
||||
10301: { uuid: 10301, name: "治疗", icon: "1292", buff: Attrs.hp, BType: BType.RATIO, value: 30, time: 0, chance: 1, runType: BuffRunType.Permanent, info: "回复30%最大生命值" },
|
||||
// 护盾 (基于攻击力百分比)
|
||||
10302: { uuid: 10302, name: "护盾", icon: "1255", buff: Attrs.shield, 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, runType: BuffRunType.Permanent, 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秒" },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user