feat: 新增麻痹异常状态机制
1. 新增麻痹概率属性与相关属性计算方法 2. 为英雄普攻和技能添加麻痹触发逻辑 3. 配置闪电系技能默认30%麻痹概率 4. 更新英雄技能说明与配置参数
This commit is contained in:
@@ -202,6 +202,10 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpda
|
||||
const stunChance = (damageEvent.Attrs[Attrs.stun_chance] || 0) - TAttrsComp.getFinalStunRes();
|
||||
const isStun = !TAttrsComp.isStun() && this.checkChance(stunChance);
|
||||
|
||||
// 麻痹判定(无麻痹抗性,仅按概率)
|
||||
const paralyzeChance = damageEvent.Attrs[Attrs.paralyze_chance] || 0;
|
||||
const isParalyze = !TAttrsComp.isParalyze() && this.checkChance(paralyzeChance);
|
||||
|
||||
// ✅ 触发视图层表现(伤害数字、受击动画、冰冻、击晕、击退)
|
||||
if (targetView) {
|
||||
if (isDot) {
|
||||
@@ -242,6 +246,9 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpda
|
||||
smc.vmdata.scores.stun_count++;
|
||||
}
|
||||
}
|
||||
if (isParalyze) {
|
||||
TAttrsComp.toParalyze();
|
||||
}
|
||||
}
|
||||
|
||||
// 命中附带 debuff(如灼烧 DoT):仅普攻路径,复用友方 timed_buff_id 机制;
|
||||
|
||||
Reference in New Issue
Block a user