Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions Content.Server/Psionics/PsionicsSystem.Events.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@

namespace Content.Server.Psionics
{
/// <summary>
/// Raised on an entity about to roll for a Psionic Power, after their baseline chances of success are calculated.
/// </summary>
[ByRefEvent]
public struct OnRollPsionicsEvent
{
public readonly EntityUid Roller;
public float BaselineChance;
public OnRollPsionicsEvent(EntityUid roller, float baselineChance)
{
Roller = roller;
BaselineChance = baselineChance;
}
}
}
namespace Content.Server.Psionics;

/// <summary>
/// Raised on an entity about to roll for a Psionic Power, after their baseline chances of success are calculated.
/// </summary>
[ByRefEvent]
public record struct OnRollPsionicsEvent(EntityUid Roller, float BaselineChance);
20 changes: 20 additions & 0 deletions Content.Server/Traits/Assorted/PotentiaModifierComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace Content.Server.Traits.Assorted;

/// <summary>
/// This is used for traits that modify the outcome of Potentia Rolls
/// </summary>
[RegisterComponent]
public sealed partial class PotentiaModifierComponent : Component
{
/// <summary>
/// When rolling for psionic powers, increase the potentia gains by a flat amount.
/// </summary>
[DataField]
public float PotentiaFlatModifier = 0;

/// <summary>
/// When rolling for psionic powers, multiply the potentia gains by a specific factor.
/// </summary>
[DataField]
public float PotentiaMultiplier = 1;
}
19 changes: 19 additions & 0 deletions Content.Server/Traits/Assorted/PotentiaModifierSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Content.Server.Psionics;

namespace Content.Server.Traits.Assorted;
public sealed partial class PotentiaModifierSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<PotentiaModifierComponent, OnRollPsionicsEvent>(OnRollPsionics);
}

private void OnRollPsionics(EntityUid uid, PotentiaModifierComponent component, ref OnRollPsionicsEvent args)
{
if (uid != args.Roller)
return;

args.BaselineChance = args.BaselineChance * component.PotentiaMultiplier + component.PotentiaFlatModifier;
}
}
2 changes: 1 addition & 1 deletion Content.Shared/Psionics/PsionicPowerPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public sealed partial class PsionicPowerPrototype : IPrototype
/// <summary>
/// What message will this power generate when scanned by a Metempsionic Focused Pulse.
/// </summary>
[DataField(required: true)]
[DataField]
public string MetapsionicFeedback = "psionic-metapsionic-feedback-default";

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions Resources/Locale/en-US/psionics/psionic-powers.ftl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
generic-power-initialization-feedback = I Awaken.
arleady-casting = I cannot channel more than one power at a time.
already-casting = I cannot channel more than one power at a time.

# Dispel
dispel-power-description = Dispel summoned entities such as familiars or forcewalls.
Expand Down Expand Up @@ -127,4 +127,5 @@ mindbreaking-feedback = The light of life vanishes from {CAPITALIZE($entity)}'s
examine-mindbroken-message =
Eyes unblinking, staring deep into the horizon. {CAPITALIZE($entity)} is a sack of meat pretending it has a soul.
There is nothing behind its gaze, no evidence there can be found of the divine light of creation.
psionic-roll-failed = For a moment, my consciousness expands, yet I feel that it is not enough.
psionic-roll-failed = For a moment, my consciousness expands, yet I feel that it is not enough.
power-overwhelming-power-feedback = {CAPITALIZE($entity)} wields a vast connection to the noösphere
28 changes: 28 additions & 0 deletions Resources/Locale/en-US/traits/traits.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,31 @@ trait-description-ValyrianStandard =
A language descended from eastern european languages of old earth - Valyrian Standard is the commonly spoken tongue of Harpies brought up on their homeworld of Valyrian 4b
It is rarely spoken outside of the worlds of its native speakers, and has in modern times been supplanted by the 'Conlangs of the Sol Alliance.
Its speakers are those who wish to uphold the traditions and beliefs of ancient peoples from before the colonial era.

trait-name-LowPotential = Low Psi-Potential
trait-description-LowPotential =
You possess an unusually weak connection to the noösphere, which makes it more difficult to obtain new psionic powers.

trait-name-HighPotential = High Psi-Potential
trait-description-HighPotential =
Your connection to the noösphere is greater than average, making it easier to obtain new psionic powers.

trait-name-LowAmplification = kα Deficiency
trait-description-LowAmplifiction =
Your psionic abilities are noticeably weaker than ones used by other psions.

trait-name-HighAmplification = kα Abundance
trait-description-HighAmplification =
Your psionic abilities are stronger than those of other psions.

trait-name-PowerOverwhelming = Power Overwhelming
trait-description-PowerOverwhelming =
WITNESS MY HATE MORTALS, COWER BEFORE MY PSIONIC MIGHT! REALITY IS AS I DEEM IT.

trait-name-LowDampening = kδ Defect
trait-description-LowDampening =
Your skill in manipulating the noösphere is weaker than others. You may experience unintended effects from using your abilities.

trait-name-HighDampening = kδ Proficient
trait-description-HighDampening =
You are skilled in the art of subtly manipulating the noösphere. Your powers are less likely to show unintended effects.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
understands:
- TauCetiBasic
- Nekomimetic
- type: PotentiaModifier
potentiaMultiplier: 0.5

- type: entity
save: false
Expand Down
38 changes: 37 additions & 1 deletion Resources/Prototypes/Psionics/psionics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,42 @@
amplificationModifier: 2.5 # An extremely rare and dangerous power
powerSlotCost: 2

- type: psionicPower
id: LowAmplification
name: LowAmplification
description: low-amplification-power-description
amplificationModifier: -0.25
powerSlotCost: 0

- type: psionicPower
id: HighAmplification
name: HighAmplification
description: high-amplification-power-description
amplificationModifier: 0.25
powerSlotCost: 0

- type: psionicPower
id: PowerOverwhelming
name: PowerOverwhelming
description: power-overwhelming-power-description
metapsionicFeedback: power-overwhelming-power-feedback
amplificationModifier: 2
powerSlotCost: 2

- type: psionicPower
id: LowDampening
name: LowDampening
description: low-dampening-power-description
dampeningModifier: -0.25
powerSlotCost: 0

- type: psionicPower
id: HighDampening
name: HighDampening
description: high-dampening-power-description
dampeningModifier: 0.25
powerSlotCost: 0

- type: psionicPower
id: ShadeskipPower
name: Shadeskip
Expand All @@ -171,4 +207,4 @@
- ActionShadeskip
initializationFeedback: shadeskip-power-initialization-feedback
metapsionicFeedback: shadeskip-power-metapsionic-feedback
amplificationModifier: 1
amplificationModifier: 1
Loading