feat(buff): 新增出血debuff并实现暴击率加成逻辑

1.  在BuffSet中新增出血debuff的配置、图标映射与相关常量
2.  在HeroAtkSystem中添加出血层数带来的被暴击率加成计算逻辑
This commit is contained in:
panFD
2026-08-15 22:40:14 +08:00
parent 1f4a4c5936
commit d49f4fb77e
2 changed files with 26 additions and 3 deletions

View File

@@ -43,6 +43,7 @@ export enum DebuffIcon {
Penetration = "Penetration", // 穿透
Stun = "Stun", // 击晕
Poison = "Poison", // 中毒
Blood = "Blood", // 出血
}
/**
@@ -56,10 +57,15 @@ export const DEBUFF_ICON_MAP: Record<number, DebuffIcon> = {
7004: DebuffIcon.Stun, // 击晕
7005: DebuffIcon.Poison, // 中毒
7006: DebuffIcon.AttackDebuff, // 减攻
7007: DebuffIcon.Blood, // 出血
};
/** 易伤 buff 的 idHeroAtkSystem 结算时按此 id 汇总易伤值) */
export const VULNERABLE_BUFF_ID = 7002;
/** 出血 buff 的 id每层使目标被暴击率 +1% */
export const BLEED_BUFF_ID = 7007;
/** 出血每层附加的被暴击率(百分点) */
export const BLEED_CRIT_PER_STACK = 1;
/** Buff 静态定义 */
export interface BuffConfig {
@@ -121,6 +127,13 @@ export const BuffList: Record<number, BuffConfig> = {
modifiers: [{ attr: Attrs.ap, op: ModOp.Flat, value: -10 }],
info: "攻击力降低 10 点,持续 5 秒",
},
// 出血(每层使目标被暴击率 +1%,微量伤害 DoT暴击率加成由 HeroAtkSystem 按 BLEED_BUFF_ID 层数结算)
7007: {
id: 7007, name: "出血", icon: "Stat_Blood",
category: BuffCategory.Debuff, duration: 5, max_stack: 5,
tick: { interval: 0.5, damage_or_heal: -1, scale_by_ap_pct: 0 },
info: "微量出血,每层使自身被暴击率提升 1%,可叠加,持续 5 秒",
},
// 占卜师战前攻击强化(基础档:+30/5s高阶通过 buff_value/buff_duration 覆写成长)
7111: {
id: 7111, name: "战前强攻", icon: "Stat_Attack_03",