Revenant stuff (#110)

* - add: Chaplain cult shield immune.

* - add: Revenant stuff.
This commit is contained in:
Aviu00
2024-02-24 01:06:24 +09:00
committed by GitHub
parent 6d26bf8e5d
commit a411d14461
10 changed files with 225 additions and 29 deletions

View File

@@ -3,6 +3,7 @@ using Content.Server.Actions;
using Content.Server.GameTicking;
using Content.Server.Store.Components;
using Content.Server.Store.Systems;
using Content.Shared._White.Chaplain;
using Content.Shared.Alert;
using Content.Shared.Damage;
using Content.Shared.DoAfter;
@@ -19,6 +20,8 @@ using Content.Shared.Revenant.Components;
using Content.Shared.StatusEffect;
using Content.Shared.Stunnable;
using Content.Shared.Tag;
using Content.Shared.Weapons.Melee;
using Content.Shared.Weapons.Melee.Events;
using Robust.Server.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
@@ -62,9 +65,21 @@ public sealed partial class RevenantSystem : EntitySystem
SubscribeLocalEvent<RevenantComponent, StatusEffectEndedEvent>(OnStatusEnded);
SubscribeLocalEvent<RoundEndTextAppendEvent>(_ => MakeVisible(true));
SubscribeLocalEvent<RevenantComponent, AttackedEvent>(OnAttacked); // WD EDIT
InitializeAbilities();
}
// WD START
private void OnAttacked(Entity<RevenantComponent> ent, ref AttackedEvent args)
{
if (!HasComp<HolyWeaponComponent>(args.Used) || !TryComp(args.Used, out MeleeWeaponComponent? weapon))
return;
args.BonusDamage = weapon.Damage;
}
// WD END
private void OnStartup(EntityUid uid, RevenantComponent component, ComponentStartup args)
{
//update the icon