Files
wwdpublic/Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs
username 55aa822a96 Stamina Damage Resistance Real (#679)
# Description
Added stamina damage resistance, acts the same way as armor does.
Call this shock resistance if you wish :trollface:
Just attach StaminaDamageResistance component to an entity with a set
multiplier and have fun.

Made all hardsuits 25% stun resistant by default.
With some variety, e.g. nukie, ERT, captain, HoS suits are 50%, DS are
90%, etc. etc.

This will not remove stuneta but it will make it more difficult to
stamcrit a traitor or such.

Some armor/batong ratios that you need to hit before the target is
stamcritted:
0% - 3 batong hits
25% - 4 batong hits
50% - 6 batong hits
75% - 12 batong hits
90% - 28 batong hits :trollface:
100% - 

![image](https://github.com/user-attachments/assets/da147676-520b-4e3c-b027-ef9dc6a7394b)


# Changelog

🆑
- add: Added different stamina damage resistance to hardsuits.

---------

Co-authored-by: whateverusername0 <whateveremail>
2024-08-06 15:08:47 -04:00

34 lines
914 B
C#

using Content.Shared.Damage.Components;
using Content.Shared.Inventory;
namespace Content.Shared.Damage.Events;
/// <summary>
/// The components in the list are going to be hit,
/// give opportunities to change the damage or other stuff.
/// </summary>
public sealed class TakeStaminaDamageEvent : HandledEntityEventArgs, IInventoryRelayEvent
{
public SlotFlags TargetSlots { get; } = ~SlotFlags.POCKET;
/// <summary>
/// List of hit stamina components.
/// </summary>
public EntityUid Target;
/// <summary>
/// The multiplier. Generally, try to use *= or /= instead of overwriting.
/// </summary>
public float Multiplier = 1;
/// <summary>
/// The flat modifier. Generally, try to use += or -= instead of overwriting.
/// </summary>
public float FlatModifier = 0;
public TakeStaminaDamageEvent(EntityUid target)
{
Target = target;
}
}