From 9fa9564093e2b57c00c0ddffa2375b05be61798f 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, 21 Sep 2025 22:43:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E8=83=BD=E9=87=8F?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E8=AE=A1=E7=AE=97=E4=B8=AD=E7=9A=84=E9=9A=8F?= =?UTF-8?q?=E6=9C=BA=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复能量存储计算中随机范围错误,避免可能出现负值的情况 --- scripts/Statemachine/EntityBase.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index 1883541..2875cd1 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -167,7 +167,7 @@ func _physics_process(_delta: float) -> void: if (isPlayer() or is_instance_valid(currentFocusedBoss)) and not charginup and canRunAi: ai() move_and_slide() - storeEnergy(randf_range(0.01, 0.05 + fields.get(FieldStore.Entity.ENERGY_REGENERATION)), true) + storeEnergy(randf_range(0.01, 0.05 + fields.get(FieldStore.Entity.ENERGY_REGENERATION) - 1), true) trailParticle.emitting = trailing # 通用方法