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();

View File

@@ -30,7 +30,6 @@ export class HeroAttrsComp extends ecs.Comp {
// ==================== 特殊属性 ====================
critical: number = 0; // 暴击率
freeze_chance: number = 0; // 冰冻概率
back_chance: number = 0; // 击退概率
puncture: number = 0; // 穿刺次数
wfuny: number = 0; // 风怒
@@ -232,7 +231,6 @@ export class HeroAttrsComp extends ecs.Comp {
this.skills = {};
this.critical = 0;
this.freeze_chance = 0;
this.back_chance = 0;
this.revive_count = 0;
this.revive_time = 0;
this.invincible_time = 0;

View File

@@ -105,7 +105,6 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
mockAttrs.ap = highestAp;
mockAttrs.critical = 0;
mockAttrs.freeze_chance = 0;
mockAttrs.back_chance = 0;
mockAttrs.puncture = 0;
mockAttrs.fac = FacSet.HERO;