using Content.Server.Damage.Systems;
using Robust.Shared.GameStates;
namespace Content.Server.Damage.Components;
///
/// Add to an entity to paralyze it whenever it reaches critical amounts of Stamina DamageType.
///
[RegisterComponent]
public sealed class StaminaComponent : Component
{
///
/// Have we reached peak stamina damage and been paralyzed?
///
[ViewVariables(VVAccess.ReadWrite), DataField("critical")]
public bool Critical;
///
/// How much stamina reduces per second.
///
[ViewVariables(VVAccess.ReadWrite), DataField("decay")]
public float Decay = 3f;
///
/// How much time after receiving damage until stamina starts decreasing.
///
[ViewVariables(VVAccess.ReadWrite), DataField("cooldown")]
public float DecayCooldown = 5f;
///
/// How much stamina damage this entity has taken.
///
[ViewVariables(VVAccess.ReadWrite), DataField("staminaDamage")]
public float StaminaDamage;
///
/// How much stamina damage is required to entire stam crit.
///
[ViewVariables(VVAccess.ReadWrite), DataField("excess")]
public float CritThreshold = 100f;
///
/// Next time we're allowed to decrease stamina damage. Refreshes whenever the stam damage is changed.
///
[ViewVariables(VVAccess.ReadWrite), DataField("decayAccumulator")]
public float StaminaDecayAccumulator;
}