From ae7e58db5d355acda095c84113cac71177b39533 Mon Sep 17 00:00:00 2001 From: DisposableCrewmember42 Date: Tue, 10 Sep 2024 23:07:07 +0000 Subject: [PATCH] fix: Check revenant ability costs correctly (#32050) * fix: Check revenant ability costs correctly * refactor: Idiomatically get negative value --- Content.Server/Revenant/EntitySystems/RevenantSystem.cs | 2 +- Content.Shared/Revenant/Components/RevenantComponent.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Content.Server/Revenant/EntitySystems/RevenantSystem.cs b/Content.Server/Revenant/EntitySystems/RevenantSystem.cs index fa4f6db240..4cfceaf297 100644 --- a/Content.Server/Revenant/EntitySystems/RevenantSystem.cs +++ b/Content.Server/Revenant/EntitySystems/RevenantSystem.cs @@ -170,7 +170,7 @@ public sealed partial class RevenantSystem : EntitySystem } } - ChangeEssenceAmount(uid, abilityCost, component, false); + ChangeEssenceAmount(uid, -abilityCost, component, false); _statusEffects.TryAddStatusEffect(uid, "Corporeal", TimeSpan.FromSeconds(debuffs.Y), false); _stun.TryStun(uid, TimeSpan.FromSeconds(debuffs.X), false); diff --git a/Content.Shared/Revenant/Components/RevenantComponent.cs b/Content.Shared/Revenant/Components/RevenantComponent.cs index d7fb28ef13..e6543f1906 100644 --- a/Content.Shared/Revenant/Components/RevenantComponent.cs +++ b/Content.Shared/Revenant/Components/RevenantComponent.cs @@ -86,7 +86,7 @@ public sealed partial class RevenantComponent : Component /// The amount of essence that is needed to use the ability. /// [ViewVariables(VVAccess.ReadWrite), DataField("defileCost")] - public FixedPoint2 DefileCost = -30; + public FixedPoint2 DefileCost = 30; /// /// 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. /// [ViewVariables(VVAccess.ReadWrite), DataField("overloadCost")] - public FixedPoint2 OverloadCost = -40; + public FixedPoint2 OverloadCost = 40; /// /// 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. /// [ViewVariables(VVAccess.ReadWrite), DataField("blightCost")] - public float BlightCost = -50; + public float BlightCost = 50; /// /// 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. /// [ViewVariables(VVAccess.ReadWrite), DataField("malfunctionCost")] - public FixedPoint2 MalfunctionCost = -60; + public FixedPoint2 MalfunctionCost = 60; /// /// The status effects applied after the ability -- 2.51.2