From 48f9f58a9c0cfef003bdd65dd0e963f471af8c42 Mon Sep 17 00:00:00 2001 From: Calecute <34964590+Calecute@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:25:32 -0300 Subject: [PATCH] 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 bc19235cd3927e..529c91626c4633 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -658,6 +658,12 @@ private bool DoHeavyAttack(EntityUid user, HeavyAttackEvent ev, EntityUid meleeU 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)