From b7bd7c1d68fb54044b45191821d9f80ca5c69c32 Mon Sep 17 00:00:00 2001 From: Calecute <34964590+Calecute@users.noreply.github.com> Date: Sun, 20 Oct 2024 00:41:44 -0300 Subject: [PATCH] Blunt damage will do stamina damage on wide attacks (#32422) Fix: blunt damage will now do stamina damage on wide attacks. --- Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 9b15e5f8a0..767b5c4ef6 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -670,6 +670,12 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem if (damageResult != null && damageResult.GetTotal() > FixedPoint2.Zero) { + // If the target has stamina and is taking blunt damage, they should also take stamina damage based on their blunt to stamina factor + if (damageResult.DamageDict.TryGetValue("Blunt", out var bluntDamage)) + { + _stamina.TakeStaminaDamage(entity, (bluntDamage * component.BluntStaminaDamageFactor).Float(), visual: false, source: user, with: meleeUid == user ? null : meleeUid); + } + appliedDamage += damageResult; if (meleeUid == user) -- 2.52.0