DodgeWideswingComponent.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
  2. // SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
  3. // SPDX-FileCopyrightText: 2025 Misandry <mary@thughunt.ing>
  4. // SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
  5. //
  6. // SPDX-License-Identifier: AGPL-3.0-or-later
  7. using Robust.Shared.GameStates;
  8. using Robust.Shared.Localization;
  9. namespace Content.Shared.Goobstation.Weapons.DodgeWideswing;
  10. /// <summary>
  11. /// Makes this entity have a chance to dodge a wideswing attack, converting the incoming damage into stamina damage.
  12. /// </summary>
  13. [RegisterComponent]
  14. public sealed partial class DodgeWideswingComponent : Component
  15. {
  16. [DataField]
  17. public float Chance = 1f;
  18. /// <summary>
  19. /// How much stamina damage to apply per damage from source.
  20. /// </summary>
  21. [DataField]
  22. public float StaminaRatio = 1f;
  23. /// <summary>
  24. /// Whether to still evade if knocked down.
  25. /// </summary>
  26. [DataField]
  27. public bool WhenKnockedDown = false;
  28. [DataField]
  29. public LocId? PopupId = "wideswing-dodge-generic";
  30. }