Skip to content

Commit

Permalink
Stun on full mana drain.
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxxoTrystan committed Nov 12, 2024
1 parent 0a87907 commit b20fa81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Content.Shared/Shadowkin/SharedEtherealSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
using Robust.Shared.Configuration;
using Content.Shared.Abilities.Psionics;
using Content.Shared.Tag;
using Content.Shared.Damage.Components;
using Content.Shared.Damage.Systems;

namespace Content.Shared.Shadowkin;

Expand All @@ -24,6 +26,7 @@ public abstract class SharedEtherealSystem : EntitySystem
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly StaminaSystem _stamina = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -99,6 +102,9 @@ private void OnManaUpdate(EntityUid uid, EtherealComponent component, ref OnMana

if (magic.Mana <= 0)
{
if (TryComp<StaminaComponent>(uid, out var stamina))
_stamina.TakeStaminaDamage(uid, stamina.CritThreshold, stamina, uid);

SpawnAtPosition("ShadowkinShadow", Transform(uid).Coordinates);
SpawnAtPosition("EffectFlashShadowkinDarkSwapOff", Transform(uid).Coordinates);
RemComp(uid, component);
Expand Down

0 comments on commit b20fa81

Please sign in to comment.