refactor: 移除英雄击退相关属性和逻辑

移除 HeroAttrsComp 中的 back_chance 属性及相关配置,清理 SCastSystem、Skill 和 HeroAtkSystem 中击退概率的计算与判定逻辑,简化攻击效果处理流程。
This commit is contained in:
panw
2026-04-15 16:20:19 +08:00
parent 083a530a72
commit bf799a84fe
6 changed files with 13 additions and 11 deletions

View File

@@ -171,13 +171,12 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
mLogger.log(this.debugMode, 'HeroAtkSystem', ` 英雄${TAttrsComp.hero_name} (uuid: ${TAttrsComp.hero_uuid}) 受到 eid:${casterEid} 的 伤害 ${damage},${isCrit?"暴击":"普通"}攻击,技能ID ${damageEvent.s_uuid}`);
// 击退和冰冻判定
const isBack = this.checkChance((damageEvent.Attrs[Attrs.back_chance] || 0));
// 冰冻判定
const freezeChance = damageEvent.Attrs[Attrs.freeze_chance] || 0;
const isFrost = !TAttrsComp.isFrost() && this.checkChance(freezeChance);
// ✅ 触发视图层表现(伤害数字、受击动画、后退,冰冻)
// ✅ 触发视图层表现(伤害数字、受击动画、冰冻)
if (targetView) {
targetView.do_atked(damage, isCrit, damageEvent.s_uuid, isBack);
targetView.do_atked(damage, isCrit, damageEvent.s_uuid, false);
targetView.playEnd(skillConf.endAnm);
if (isFrost) {
TAttrsComp.toFrost();