fix: Check revenant ability costs correctly (#32050)

* fix: Check revenant ability costs correctly

* refactor: Idiomatically get negative value
This commit is contained in:
DisposableCrewmember42
2024-09-10 23:07:07 +00:00
committed by GitHub
parent b091640c26
commit ae7e58db5d
2 changed files with 5 additions and 5 deletions

View File

@@ -170,7 +170,7 @@ public sealed partial class RevenantSystem : EntitySystem
} }
} }
ChangeEssenceAmount(uid, abilityCost, component, false); ChangeEssenceAmount(uid, -abilityCost, component, false);
_statusEffects.TryAddStatusEffect<CorporealComponent>(uid, "Corporeal", TimeSpan.FromSeconds(debuffs.Y), false); _statusEffects.TryAddStatusEffect<CorporealComponent>(uid, "Corporeal", TimeSpan.FromSeconds(debuffs.Y), false);
_stun.TryStun(uid, TimeSpan.FromSeconds(debuffs.X), false); _stun.TryStun(uid, TimeSpan.FromSeconds(debuffs.X), false);

View File

@@ -86,7 +86,7 @@ public sealed partial class RevenantComponent : Component
/// The amount of essence that is needed to use the ability. /// The amount of essence that is needed to use the ability.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("defileCost")] [ViewVariables(VVAccess.ReadWrite), DataField("defileCost")]
public FixedPoint2 DefileCost = -30; public FixedPoint2 DefileCost = 30;
/// <summary> /// <summary>
/// The status effects applied after the ability /// The status effects applied after the ability
@@ -121,7 +121,7 @@ public sealed partial class RevenantComponent : Component
/// The amount of essence that is needed to use the ability. /// The amount of essence that is needed to use the ability.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("overloadCost")] [ViewVariables(VVAccess.ReadWrite), DataField("overloadCost")]
public FixedPoint2 OverloadCost = -40; public FixedPoint2 OverloadCost = 40;
/// <summary> /// <summary>
/// The status effects applied after the ability /// The status effects applied after the ability
@@ -149,7 +149,7 @@ public sealed partial class RevenantComponent : Component
/// The amount of essence that is needed to use the ability. /// The amount of essence that is needed to use the ability.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("blightCost")] [ViewVariables(VVAccess.ReadWrite), DataField("blightCost")]
public float BlightCost = -50; public float BlightCost = 50;
/// <summary> /// <summary>
/// The status effects applied after the ability /// The status effects applied after the ability
@@ -171,7 +171,7 @@ public sealed partial class RevenantComponent : Component
/// The amount of essence that is needed to use the ability. /// The amount of essence that is needed to use the ability.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("malfunctionCost")] [ViewVariables(VVAccess.ReadWrite), DataField("malfunctionCost")]
public FixedPoint2 MalfunctionCost = -60; public FixedPoint2 MalfunctionCost = 60;
/// <summary> /// <summary>
/// The status effects applied after the ability /// The status effects applied after the ability