From 40e1eb346296e12fed6e1ba4d5204ed5863acf4a Mon Sep 17 00:00:00 2001 From: Ggafrik <906823881@qq.com> Date: Sat, 5 Jul 2025 00:23:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ServerStorage/Proxy/DamageProxy.luau | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ServerStorage/Proxy/DamageProxy.luau b/src/ServerStorage/Proxy/DamageProxy.luau index 4d91da4..d3a1ece 100644 --- a/src/ServerStorage/Proxy/DamageProxy.luau +++ b/src/ServerStorage/Proxy/DamageProxy.luau @@ -53,7 +53,8 @@ function DamageProxy:TakeDamage(Caster: TypeList.Character, Victim: TypeList.Cha local DamageTag = DamageInfo.DamageTag -- 伤害计算 - + local VictimHealth = Victim:GetAttribute("health") + Victim:ChangeAttribute("health", math.max(0, VictimHealth - Damage)) end end