Skip to content

Commit

Permalink
Added a yml nerf option in case revenant is too powerful
Browse files Browse the repository at this point in the history
  • Loading branch information
TGRCdev committed Sep 15, 2024
1 parent 3231ab6 commit 6895a5c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void OnBibleInteract(EntityUid uid, RevenantStasisComponent comp, ref Af

var revenant = stasis.Revenant;

if (!HasComp<BibleUserComponent>(args.User))
if (revenant.Comp.ExorcismRequiresBibleUser && !HasComp<BibleUserComponent>(args.User))
{
_popup.PopupEntity(Loc.GetString("revenant-exorcise-fail", ("bible", bible)), user, user);
return;
Expand Down
10 changes: 10 additions & 0 deletions Content.Shared/Revenant/Components/RevenantComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ public sealed partial class RevenantComponent : Component
[DataField("stasisTime"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan StasisTime = TimeSpan.FromSeconds(60);

/// <summary>
/// If true, only bible users can exorcise this revenant
/// with a bible.
///
/// If false, anyone who tries to exorcise a revenant with
/// a bible will be able to.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool ExorcismRequiresBibleUser = true;

/// <summary>
/// The entity's current max amount of essence. Can be increased
/// through harvesting player souls.
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- type: GhostTakeoverAvailable
- type: Revenant
malfunctionWhitelist:
exorcismRequiresBibleUser: true # Escape hatch, change to false if revenant becomes too OP
components:
# emag lockers open
- EntityStorage
Expand Down

0 comments on commit 6895a5c

Please sign in to comment.