fix(战斗): 调整技能攻击参数和冰冻逻辑

- 提高部分技能攻击的Y轴偏移量,优化命中判定
- 将冰冻基础时间从1秒调整为3秒,增强控制效果
- 修复冰冻时间叠加逻辑,改为取最大值避免重复叠加
- 修复冰冻触发条件,避免对已冰冻目标重复触发
- 调整英雄进度条总长度,优化UI显示
This commit is contained in:
panw
2026-03-26 16:30:00 +08:00
parent 81a1d83d89
commit 3963a8f3ba
10 changed files with 17 additions and 13 deletions

View File

@@ -80,7 +80,7 @@ export enum FightSet {
BACK_RANG=30,//后退范围
FiIGHT_TIME=60*10,//战斗时间
BACK_CHANCE=40,//击退概率
FROST_TIME=1,//冰冻时间
FROST_TIME=3,//冰冻时间
}

View File

@@ -150,13 +150,16 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
// 击退和冰冻判定
const isBack = this.checkChance((damageEvent.Attrs[Attrs.back_chance] || 0));
const isFrost = this.checkChance(damageEvent.Attrs[Attrs.freeze_chance]);
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.playEnd(skillConf.endAnm);
if(isFrost) TAttrsComp.toFrost();
targetView.in_iced(TAttrsComp.frost_end_time);
if (isFrost) {
TAttrsComp.toFrost();
targetView.in_iced(TAttrsComp.frost_end_time);
}
}

View File

@@ -117,7 +117,8 @@ export class HeroAttrsComp extends ecs.Comp {
toFrost(time: number=1) {
this.frost_end_time += FightSet.FROST_TIME*time;
const frostTime = FightSet.FROST_TIME * time;
this.frost_end_time = Math.max(this.frost_end_time, frostTime);
}
updateCD(dt: number){