Files
wwdpublic/Content.Shared/_EE/Shadowling/Components/ShadowlingComponent.cs
Lumminal 16ea61f52f Shadowling Antagonist (SS13 Port and Remake) (#2207)
<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

Ports Shadowlings from SS13 to SS14 with a remake to make them fun to
play.

Minimal Design Doc (not up-to-date, read comments in this repo for
updates):

https://github.com/Lumminal/SS14-Design-Docs-Lumminal/blob/main/Shadowling.md

---

- Abilities
  - [X] Hatch
  - [x] Glare
  - [X] Enthrall
  - [x] Veil
  - [x] Shadow Walk
  - [x] Icy Veins
  - [x] Collective Mind
  - [x] Rapid Re-Hatch
  - [x] Destroy Engines
  - [x] Sonic Screech
  - [x] Blindness Smoke
  - [x] Null Charge
  - [x] Black Recuperation
  - [x] Empowered Enthrall
  - [x] Nox Imperii
  - [x] Ascension
  - [x] Annihilate
  - [x] Hypnosis
  - [x] Plane-Shift
  - [x] Lighting Storm
  - [x] Ascendant Broadcast
- Antags
  - [X] Thrall
      - [x] Guise
      - [x] Thrall Darksight
  - [x] Lesser Shadowling
- Passive
  - [x] Light Resistance Scaling
  - [x] Shadowmind
  - [x] Damage on Light
- Other
  - [x] Sounds
  - [x] Sprites
  - [x] Psionic Interactions
  - [x] Handle Edge Cases
---

<details><summary><h1>Media</h1></summary>
<p>

https://www.youtube.com/watch?v=H-Ee5wuRINc

</p>
</details>

---

🆑
- add: The shadows have awakened, and their ascendance is soon to
follow. Do not enter maints.

---------

Signed-off-by: Lumminal <81829924+Lumminal@users.noreply.github.com>
2025-07-20 12:05:11 +10:00

145 lines
4.1 KiB
C#

using Content.Shared.Alert;
using Content.Shared.Damage;
using Content.Shared.Language;
using Content.Shared.Polymorph;
using Content.Shared.StatusIcon;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared._EE.Shadowling;
// <summary>
// Handles the main actions of a Shadowling
// </summary>
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState]
public sealed partial class ShadowlingComponent : Component
{
// The round-start Shadowling Actions
public string ActionHatch = "ActionHatch";
public EntityUid? ActionHatchEntity;
#region PostHatch Actions
public string ActionEnthrall = "ActionEnthrall";
public string ActionGlare = "ActionGlare";
public string ActionVeil = "ActionVeil";
public string ActionRapidRehatch = "ActionRapidRehatch";
public string ActionShadowWalk = "ActionShadowWalk";
public string ActionIcyVeins = "ActionIcyVeins";
public string ActionDestroyEngines = "ActionDestroyEngines";
public string ActionCollectiveMind = "ActionCollectiveMind";
public string ActionAscendance = "ActionAscendance"; // remove once debugged
public EntityUid? ActionEnthrallEntity;
public EntityUid? ActionGlareEntity;
public EntityUid? ActionVeilEntity;
public EntityUid? ActionRapidRehatchEntity;
public EntityUid? ActionShadowWalkEntity;
public EntityUid? ActionIcyVeinsEntity;
public EntityUid? ActionDestroyEnginesEntity;
public EntityUid? ActionCollectiveMindEntity;
public EntityUid? ActionAscendanceEntity; // remove once debugged
#endregion
#region Ascension Actions
public string ActionAnnihilate = "ActionAnnihilate";
public string ActionHypnosis = "ActionHypnosis";
public string ActionPlaneShift = "ActionPlaneShift";
public string ActionLightningStorm = "ActionLightningStorm";
public string ActionBroadcast = "ActionAscendantBroadcast";
public EntityUid? ActionAnnihilateEntity;
public EntityUid? ActionHypnosisEntity;
public EntityUid? ActionPlaneShiftEntity;
public EntityUid? ActionLightningStormEntity;
public EntityUid? ActionBroadcastEntity;
#endregion
// The status icon for Shadowlings
[DataField, ViewVariables(VVAccess.ReadOnly)]
public ProtoId<FactionIconPrototype> StatusIcon { get; set; } = "ShadowlingFaction";
// Phase Indicator
[DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
public ShadowlingPhases CurrentPhase = ShadowlingPhases.PreHatch;
[DataField]
public bool IsHatching;
[DataField]
public ProtoId<PolymorphPrototype> ShadowlingPolymorphId = "ShadowlingPolymorph";
[DataField]
public bool IsPolymorphed;
[DataField]
public string Egg = "SlingEggHatch";
// Thrall Indicator
[DataField]
public List<EntityUid> Thralls = new();
[DataField]
public ProtoId<AlertPrototype> AlertProto = "ShadowlingLight";
[DataField]
public float LightResistanceModifier = 0.12f;
[DataField]
public DamageSpecifier HeatDamage = new()
{
DamageDict = new()
{
["Heat"] = 20,
}
};
[DataField]
public DamageSpecifier HeatDamageProjectileModifier = new()
{
DamageDict = new()
{
["Heat"] = 10,
}
};
[DataField]
public DamageSpecifier GunShootFailDamage = new()
{
DamageDict = new()
{
["Blunt"] = 5,
["Piercing"] = 4,
}
};
[DataField]
public TimeSpan GunShootFailStunTime = TimeSpan.FromSeconds(3);
[DataField]
public float NormalDamage;
[DataField]
public float ModifiedDamage;
[DataField]
public ProtoId<LanguagePrototype> SlingLanguageId { get; set; } = "Shadowmind";
[DataField]
public bool IsAscending;
[DataField]
public string ObjectiveAscend = "ShadowlingAscendObjective";
}
[NetSerializable, Serializable]
public enum ShadowlingPhases : byte
{
PreHatch,
PostHatch,
Ascension,
FailedAscension,
}