From eece417834a22650e7c8164c0555179d0b3469c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Sun, 7 Sep 2025 14:59:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=92=8C=E6=8A=80=E8=83=BD=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将Chick角色的最大生命值从2000降低至1500以平衡游戏难度 修改EntityBase的能量恢复为随机范围(0.01-0.15)增加变化性 更新SkillIcon进度计算,加入能量限制条件防止显示异常 --- scripts/Contents/Characters/Chick.gd | 2 +- scripts/Statemachine/EntityBase.gd | 2 +- scripts/Statemachine/SkillIcon.gd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Contents/Characters/Chick.gd b/scripts/Contents/Characters/Chick.gd index e7b1fcb..4cbf36e 100644 --- a/scripts/Contents/Characters/Chick.gd +++ b/scripts/Contents/Characters/Chick.gd @@ -6,7 +6,7 @@ class_name Chick const laserCount = 4 func register(): - fields[FieldStore.Entity.MAX_HEALTH] = 2000 + fields[FieldStore.Entity.MAX_HEALTH] = 1500 fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.5 attackCooldownMap[0] = 500 attackCooldownMap[1] = 6000 diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index 98d79b8..61af2f4 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -156,7 +156,7 @@ func _physics_process(_delta: float) -> void: if (isPlayer() or is_instance_valid(currentFocusedBoss)) and not charginup: ai() move_and_slide() - storeEnergy(0.05 * fields.get(FieldStore.Entity.ENERGY_REGENERATION), true) + storeEnergy(randf_range(0.01, 0.15) * fields.get(FieldStore.Entity.ENERGY_REGENERATION), true) trailParticle.emitting = trailing # 通用方法 diff --git a/scripts/Statemachine/SkillIcon.gd b/scripts/Statemachine/SkillIcon.gd index 203f68b..e162739 100644 --- a/scripts/Statemachine/SkillIcon.gd +++ b/scripts/Statemachine/SkillIcon.gd @@ -10,5 +10,5 @@ func _ready(): func _physics_process(_delta): if is_instance_valid(weapon): textureRect.texture = weapon.avatarTexture - var progress = weapon.cooldownTimer.timeSinceLastStart() / weapon.cooldownTimer.cooldown + var progress = min(weapon.cooldownTimer.timeSinceLastStart() / weapon.cooldownTimer.cooldown, UIState.player.energy / weapon.needEnergy) textureRect.material.set_shader_parameter("progress", progress)