mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 21:48:58 +03:00
<!-- 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>
57 lines
1.7 KiB
C#
57 lines
1.7 KiB
C#
using Content.Shared._EE.Shadowling;
|
|
using Content.Shared.Damage;
|
|
using Content.Shared.EntityEffects;
|
|
using Content.Shared.FixedPoint;
|
|
using Content.Shared._Shitmed.Targeting;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server._EE.EntityEffects;
|
|
|
|
|
|
/// <summary>
|
|
/// HealthChange but unique to Shadowlings and Thralls
|
|
/// </summary>
|
|
[UsedImplicitly]
|
|
public sealed partial class HealShadowling : EntityEffect
|
|
{
|
|
/// <inheritdoc/>
|
|
[DataField]
|
|
public DamageSpecifier Damage = default!;
|
|
|
|
[DataField]
|
|
public bool IgnoreResistances = true;
|
|
|
|
[DataField]
|
|
public bool ScaleByQuantity;
|
|
protected override string ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
|
|
Loc.GetString("reagent-effect-guidebook-heal-sling", ("chance", Probability));
|
|
|
|
public override void Effect(EntityEffectBaseArgs args)
|
|
{
|
|
// If slings get custom organs, I will remove all of this code tbf
|
|
if (!args.EntityManager.HasComponent<ShadowlingComponent>(args.TargetEntity) &&
|
|
!args.EntityManager.HasComponent<ThrallComponent>(args.TargetEntity))
|
|
{
|
|
return;
|
|
}
|
|
|
|
var scale = FixedPoint2.New(1);
|
|
|
|
if (args is EntityEffectReagentArgs reagentArgs)
|
|
{
|
|
scale = ScaleByQuantity ? reagentArgs.Quantity * reagentArgs.Scale : reagentArgs.Scale;
|
|
}
|
|
|
|
args.EntityManager.System<DamageableSystem>()
|
|
.TryChangeDamage(
|
|
args.TargetEntity,
|
|
Damage * scale,
|
|
IgnoreResistances,
|
|
interruptsDoAfters: false,
|
|
targetPart: TargetBodyPart.All,
|
|
partMultiplier: 0.5f,
|
|
canSever: false);
|
|
}
|
|
}
|