Blunt damage will do stamina damage on wide attacks (#32422)

Fix: blunt damage will now do stamina damage on wide attacks.
This commit is contained in:
Calecute
2024-10-20 00:41:44 -03:00
committed by GitHub
parent 088ec569fe
commit b7bd7c1d68

View File

@@ -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)