diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 8bd9e6d2..96a4546f 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -116,7 +116,8 @@ export class Hero extends ecs.Entity { // 初始化 buff/debuff 系统 model.initAttrs(); model.Attrs[Attrs.REVIVE_COUNT]=1 - + model.Attrs[Attrs.BACK_CHANCE]=20 + model.Attrs[Attrs.CON_RES]=10 this.add(hv); oops.message.dispatchEvent(GameEvent.MasterCalled,{uuid:uuid}) const move = this.get(HeroMoveComp); diff --git a/assets/script/game/hero/HeroAtkSystem.ts b/assets/script/game/hero/HeroAtkSystem.ts index 07d4cb3f..96c97771 100644 --- a/assets/script/game/hero/HeroAtkSystem.ts +++ b/assets/script/game/hero/HeroAtkSystem.ts @@ -180,9 +180,9 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd TAttrsComp.hp -= damage; // 应用伤害到数据层 // 受击者产生击退效果 - if (damage > 0 && targetView) { - targetView.back(); - } + // if (damage > 0 && targetView) { + // targetView.back(); + // } smc.updateHeroInfo(TAttrsComp); // 更新英雄数据到 VM if (this.debugMode) { @@ -193,9 +193,9 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd //反伤判定 并应用到施法者 this.check_thorns(TAttrsComp, caster?.ent,damage); // 击退判定 - // 使用施法者的击退概率属性(damageEvent.Attrs 快照) + // 使用施法者的击退概率属性(damageEvent.Attrs 快照) - 被攻击者的控制抗性 // 击退成功后需要清理施法者的相关天赋buff - const isBack = this.checkChance(damageEvent.Attrs[Attrs.BACK_CHANCE] || 0); + const isBack = this.checkChance((damageEvent.Attrs[Attrs.BACK_CHANCE] || 0) - (TAttrsComp.Attrs[Attrs.CON_RES] || 0)); if (isBack) CAttrsComp?.useValueTalByAttr(Attrs.BACK_CHANCE); diff --git a/assets/script/game/hero/Mon.ts b/assets/script/game/hero/Mon.ts index b03906c2..03ecf725 100644 --- a/assets/script/game/hero/Mon.ts +++ b/assets/script/game/hero/Mon.ts @@ -127,7 +127,8 @@ export class Monster extends ecs.Entity { model.Attrs[Attrs.AP] = ap; model.Attrs[Attrs.SPEED] = speed; // 使用成长后的速度 model.Attrs[Attrs.DIS] = hero.dis; - + model.Attrs[Attrs.BACK_CHANCE]=15 + model.Attrs[Attrs.CON_RES]=10 // ✅ 初始化技能数据(迁移到 HeroSkillsComp) skillsComp.initSkills(hero.skills, uuid, this);