From 33e549d22c25cff3a5744f3e742acd0cc04a45c9 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 14:29:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E5=86=B7=E5=8D=B4=E6=97=B6=E9=97=B4=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E5=92=8C=E6=B2=BB=E7=96=97=E7=89=B9=E6=95=88=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将技能初始化时的冷却时间设为0,避免首次使用时需要等待完整冷却 - 修正HeroViewComp中health方法错误调用heathed属性而非方法的问题 --- assets/script/game/hero/Hero.ts | 2 +- assets/script/game/hero/HeroViewComp.ts | 2 +- assets/script/game/hero/Mon.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 4b2999b4..4dbf3023 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -84,7 +84,7 @@ export class Hero extends ecs.Entity { const skill = hero.skills[key]; if (!skill) continue; //用于增量 计算最终技能等级:英雄等级与技能初始等级均从1开始,需各减1抵消,故-2,最低等级时0 - model.skills[skill.uuid] = { ...skill, lv: Math.max(0,skill.lv + hero_lv - 2), ccd: skill.cd }; + model.skills[skill.uuid] = { ...skill, lv: Math.max(0,skill.lv + hero_lv - 2), ccd: 0 }; } model.updateSkillDistanceCache(); diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 642a9f44..a3fe7ada 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -368,7 +368,7 @@ export class HeroViewComp extends CCComp { health(hp: number = 0) { // ✅ 仅显示特效和提示,不调用 hp_show() if(hp<=20) return; - this.heathed(); + this.heathed this.hp_tip(TooltipTypes.health, hp.toFixed(0)); this.lastBarUpdateTime = Date.now() / 1000; } diff --git a/assets/script/game/hero/Mon.ts b/assets/script/game/hero/Mon.ts index e90d3bee..f9fb74a1 100644 --- a/assets/script/game/hero/Mon.ts +++ b/assets/script/game/hero/Mon.ts @@ -145,7 +145,7 @@ export class Monster extends ecs.Entity { for (const key in hero.skills) { const skill = hero.skills[key]; if (!skill) continue; - model.skills[skill.uuid] = { ...skill, ccd: skill.cd }; + model.skills[skill.uuid] = { ...skill, ccd: 0 }; } model.updateSkillDistanceCache(); //根据刷怪控制脚本对ap和hp进行加强