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

@@ -1239,7 +1239,7 @@
"__id__": 36 "__id__": 36
}, },
"_mode": 0, "_mode": 0,
"_totalLength": 70, "_totalLength": 50,
"_progress": 1, "_progress": 1,
"_reverse": false, "_reverse": false,
"_id": "" "_id": ""
@@ -1769,7 +1769,7 @@
"__id__": 60 "__id__": 60
}, },
"_mode": 0, "_mode": 0,
"_totalLength": 70, "_totalLength": 50,
"_progress": 1, "_progress": 1,
"_reverse": false, "_reverse": false,
"_id": "" "_id": ""

View File

@@ -281,7 +281,7 @@
"__id__": 13 "__id__": 13
}, },
"atk_x": 10, "atk_x": 10,
"atk_y": 15, "atk_y": 25,
"debugMode": false, "debugMode": false,
"_id": "" "_id": ""
}, },

View File

@@ -281,7 +281,7 @@
"__id__": 13 "__id__": 13
}, },
"atk_x": 10, "atk_x": 10,
"atk_y": 15, "atk_y": 25,
"debugMode": false, "debugMode": false,
"_id": "" "_id": ""
}, },

View File

@@ -281,7 +281,7 @@
"__id__": 13 "__id__": 13
}, },
"atk_x": 10, "atk_x": 10,
"atk_y": 15, "atk_y": 25,
"debugMode": true, "debugMode": true,
"_id": "" "_id": ""
}, },

View File

@@ -281,7 +281,7 @@
"__id__": 13 "__id__": 13
}, },
"atk_x": 10, "atk_x": 10,
"atk_y": 15, "atk_y": 20,
"debugMode": true, "debugMode": true,
"_id": "" "_id": ""
}, },

View File

@@ -281,7 +281,7 @@
"__id__": 13 "__id__": 13
}, },
"atk_x": 10, "atk_x": 10,
"atk_y": 15, "atk_y": 25,
"debugMode": true, "debugMode": true,
"_id": "" "_id": ""
}, },

View File

@@ -281,7 +281,7 @@
"__id__": 13 "__id__": 13
}, },
"atk_x": 10, "atk_x": 10,
"atk_y": 15, "atk_y": 20,
"debugMode": true, "debugMode": true,
"_id": "" "_id": ""
}, },

View File

@@ -80,7 +80,7 @@ export enum FightSet {
BACK_RANG=30,//后退范围 BACK_RANG=30,//后退范围
FiIGHT_TIME=60*10,//战斗时间 FiIGHT_TIME=60*10,//战斗时间
BACK_CHANCE=40,//击退概率 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 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) { if (targetView) {
targetView.do_atked(damage, isCrit, damageEvent.s_uuid, isBack); targetView.do_atked(damage, isCrit, damageEvent.s_uuid, isBack);
targetView.playEnd(skillConf.endAnm); targetView.playEnd(skillConf.endAnm);
if(isFrost) TAttrsComp.toFrost(); if (isFrost) {
targetView.in_iced(TAttrsComp.frost_end_time); 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) { 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){ updateCD(dt: number){