Skip to content

Commit b7bd7c1

Browse files
authored
Blunt damage will do stamina damage on wide attacks (space-wizards#32422)
Fix: blunt damage will now do stamina damage on wide attacks.
1 parent 088ec56 commit b7bd7c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,12 @@ private bool DoHeavyAttack(EntityUid user, HeavyAttackEvent ev, EntityUid meleeU
670670

671671
if (damageResult != null && damageResult.GetTotal() > FixedPoint2.Zero)
672672
{
673+
// If the target has stamina and is taking blunt damage, they should also take stamina damage based on their blunt to stamina factor
674+
if (damageResult.DamageDict.TryGetValue("Blunt", out var bluntDamage))
675+
{
676+
_stamina.TakeStaminaDamage(entity, (bluntDamage * component.BluntStaminaDamageFactor).Float(), visual: false, source: user, with: meleeUid == user ? null : meleeUid);
677+
}
678+
673679
appliedDamage += damageResult;
674680

675681
if (meleeUid == user)

0 commit comments

Comments
 (0)