Add reveal to rev attack

This commit is contained in:
Vanessa 2026-08-13 08:19:22 -05:00
parent 7dc2c2ad70
commit 73712a7153
2 changed files with 18 additions and 0 deletions

View File

@ -22,6 +22,7 @@ using Content.Shared.StatusEffect;
using Content.Shared.Store.Components;
using Content.Shared.Stunnable;
using Content.Shared.Tag;
using Content.Shared.Weapons.Melee.Events; // DeltaV
using Robust.Server.GameObjects;
using Robust.Shared.Physics.Components;
using Robust.Shared.Prototypes;
@ -64,6 +65,7 @@ public sealed partial class RevenantSystem : EntitySystem
SubscribeLocalEvent<RevenantComponent, StatusEffectAddedEvent>(OnStatusAdded);
SubscribeLocalEvent<RevenantComponent, StatusEffectEndedEvent>(OnStatusEnded);
SubscribeLocalEvent<RoundEndTextAppendEvent>(_ => MakeVisible(true));
SubscribeLocalEvent<RevenantComponent, MeleeAttackEvent>(OnMeleeAttack); // DeltaV
SubscribeLocalEvent<RevenantComponent, GetVisMaskEvent>(OnRevenantGetVis);
@ -131,6 +133,14 @@ public sealed partial class RevenantSystem : EntitySystem
ChangeEssenceAmount(uid, essenceDamage, component);
}
/// <summary>
/// DeltaV - No more attack spam and remaining invisible
/// </summary>
private void OnMeleeAttack(Entity<RevenantComponent> ent, ref MeleeAttackEvent args)
{
_statusEffects.TryAddStatusEffect<CorporealComponent>(ent, "Corporeal", ent.Comp.MeleeRevealTime, false);
}
public bool ChangeEssenceAmount(EntityUid uid, FixedPoint2 amount, RevenantComponent? component = null, bool allowDeath = true, bool regenCap = false)
{
if (!Resolve(uid, ref component))

View File

@ -300,4 +300,12 @@ public sealed partial class RevenantComponent : Component
public string HarvestingState = "harvesting";
#endregion
[DataField] public EntityUid? HauntAction; // Imp
#region Melee
/// <summary>
/// DeltaV - The amount of time a rev is revealed after making a melee attack.
/// </summary>
[DataField]
public TimeSpan MeleeRevealTime = TimeSpan.FromSeconds(2);
#endregion
}