mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 22:18:52 +03:00
# 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% -  # Changelog 🆑 - add: Added different stamina damage resistance to hardsuits. --------- Co-authored-by: whateverusername0 <whateveremail>
34 lines
914 B
C#
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;
|
|
}
|
|
}
|