* Offbrand medical * what if we regrade * zombies are mostly there thats it thats a wrap xd * here's changeling * some bonus gut punches * start working on the guidebook * fix rsi and yaml lints * my agrichem so fits * we stay rejuvenated * my china so laked * debrute * fix suicide * fix the suicide tests * my surgery so requires laying down * the guidebook continues * READ KEB PAGES * keb vascular recoupler * read keb medicine * fix yaml lint * fix the EntityRemoveConstructionGraphStep * fix overlay init * scalpels are not a food tool * return of the programmer art * my line so nieuw * boxes deserve veins too * mrrrp yaml * what if we redid brain damage alerts * bloot pressure * kill mannitol drowsiness * get licensed * my read so me * get feedbacked nerd * fine-tune the heart stoppage conditions * cryostasis adjustments, guidebook adjustments, fix negative strain issues * my surgery so table * fix heart surgery and guidebook * medicine & defibrillator pass * iv bags and stands * prefills * janet gets very sidetracked * mostly finished iv stuff * what if we fixed the guidebook * halve decapoid cryostasis * my medicines so IV * finetune cryostasis * less logspam * metabolism-aware iv stands and cryopods * give people painkillers * yaml lint real * fix blood build * finish rebase * tidy up localization * clean up my yaml beasties... * soft curve after exceeding maximum damage * husks/bonedeaths Grabbag of Offmed fixes & improvements (#3461) * CPR moment * Mob AI fix * Fix brain oxygenation not updating on regeneration * sorry gamers you cannot resist the pull * Troll combat abilities more in softcrit praying rn (#3467) dont have CPR be 50% (#3468) Make offbrand murder easier to contend with (#3473) * e * disrupt people in softcrit when attacking them * ok gamers we're gaming * forgor Hopefully final pass before Offbrand merge (#3475) First pass of Offbrand adjustments (#3477) Swap blood pressure values in health analyzer (#3476) Systolic over diastolic Co-authored-by: Kip <32859367+kipdotnet@users.noreply.github.com> Offbrand pass 2: Mostly bugfixes (#3480) Fix zeds causing PVS reloads (#3482) Offbrand pass 3: I hate surgery I hate surgery I hate surgery I (#3481) * set up surgery ui * test fail real Pain/braingasps (#3487) Offmed bundle 5 - the evil one (#3489) * Evil cavity surgery * les borgues * nicotine moment * epinephrine RNG * legalese * test fail real * ok jamers cope with c4 Pass 6
226 lines
8.1 KiB
C#
226 lines
8.1 KiB
C#
using System.Numerics;
|
|
using Content.Shared.Alert;
|
|
using Content.Shared.FixedPoint;
|
|
using Content.Shared.Store;
|
|
using Content.Shared.Whitelist;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Shared.Revenant.Components;
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
|
[AutoGenerateComponentState]
|
|
public sealed partial class RevenantComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The total amount of Essence the revenant has. Functions
|
|
/// as health and is regenerated.
|
|
/// </summary>
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
[AutoNetworkedField]
|
|
public FixedPoint2 Essence = 75;
|
|
|
|
[DataField("stolenEssenceCurrencyPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<CurrencyPrototype>))]
|
|
public string StolenEssenceCurrencyPrototype = "StolenEssence";
|
|
|
|
/// <summary>
|
|
/// Prototype to spawn when the entity dies.
|
|
/// </summary>
|
|
[DataField("spawnOnDeathPrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
public string SpawnOnDeathPrototype = "Ectoplasm";
|
|
|
|
/// <summary>
|
|
/// The entity's current max amount of essence. Can be increased
|
|
/// through harvesting player souls.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("maxEssence")]
|
|
public FixedPoint2 EssenceRegenCap = 75;
|
|
|
|
/// <summary>
|
|
/// The coefficient of damage taken to actual health lost.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("damageToEssenceCoefficient")]
|
|
public float DamageToEssenceCoefficient = 0.75f;
|
|
|
|
/// <summary>
|
|
/// The amount of essence passively generated per second.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("essencePerSecond")]
|
|
public FixedPoint2 EssencePerSecond = 0.5f;
|
|
|
|
[ViewVariables]
|
|
public float Accumulator = 0;
|
|
|
|
// Here's the gist of the harvest ability:
|
|
// Step 1: The revenant clicks on an entity to "search" for it's soul, which creates a doafter.
|
|
// Step 2: After the doafter is completed, the soul is "found" and can be harvested.
|
|
// Step 3: Clicking the entity again begins to harvest the soul, which causes the revenant to become vulnerable
|
|
// Step 4: The second doafter for the harvest completes, killing the target and granting the revenant essence.
|
|
#region Harvest Ability
|
|
/// <summary>
|
|
/// The duration of the soul search
|
|
/// </summary>
|
|
[DataField("soulSearchDuration")]
|
|
public float SoulSearchDuration = 2.5f;
|
|
|
|
/// <summary>
|
|
/// The status effects applied after the ability
|
|
/// the first float corresponds to amount of time the entity is stunned.
|
|
/// the second corresponds to the amount of time the entity is made solid.
|
|
/// </summary>
|
|
[DataField("harvestDebuffs")]
|
|
public Vector2 HarvestDebuffs = new(5, 5);
|
|
|
|
/// <summary>
|
|
/// The amount that is given to the revenant each time it's max essence is upgraded.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("maxEssenceUpgradeAmount")]
|
|
public float MaxEssenceUpgradeAmount = 10;
|
|
#endregion
|
|
|
|
//In the nearby radius, causes various objects to be thrown, messed with, and containers opened
|
|
//Generally just causes a mess
|
|
#region Defile Ability
|
|
/// <summary>
|
|
/// The amount of essence that is needed to use the ability.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("defileCost")]
|
|
public FixedPoint2 DefileCost = 30;
|
|
|
|
/// <summary>
|
|
/// The status effects applied after the ability
|
|
/// the first float corresponds to amount of time the entity is stunned.
|
|
/// the second corresponds to the amount of time the entity is made solid.
|
|
/// </summary>
|
|
[DataField("defileDebuffs")]
|
|
public Vector2 DefileDebuffs = new(1, 4);
|
|
|
|
/// <summary>
|
|
/// The radius around the user that this ability affects
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("defileRadius")]
|
|
public float DefileRadius = 3.5f;
|
|
|
|
/// <summary>
|
|
/// The amount of tiles that are uprooted by the ability
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("defileTilePryAmount")]
|
|
public int DefileTilePryAmount = 15;
|
|
|
|
/// <summary>
|
|
/// The chance that an individual entity will have any of the effects
|
|
/// happen to it.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("defileEffectChance")]
|
|
public float DefileEffectChance = 0.5f;
|
|
#endregion
|
|
|
|
#region Overload Lights Ability
|
|
/// <summary>
|
|
/// The amount of essence that is needed to use the ability.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("overloadCost")]
|
|
public FixedPoint2 OverloadCost = 40;
|
|
|
|
/// <summary>
|
|
/// The status effects applied after the ability
|
|
/// the first float corresponds to amount of time the entity is stunned.
|
|
/// the second corresponds to the amount of time the entity is made solid.
|
|
/// </summary>
|
|
[DataField("overloadDebuffs")]
|
|
public Vector2 OverloadDebuffs = new(3, 8);
|
|
|
|
/// <summary>
|
|
/// The radius around the user that this ability affects
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("overloadRadius")]
|
|
public float OverloadRadius = 5f;
|
|
|
|
/// <summary>
|
|
/// How close to the light the entity has to be in order to be zapped.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("overloadZapRadius")]
|
|
public float OverloadZapRadius = 2f;
|
|
#endregion
|
|
|
|
#region Blight Ability
|
|
/// <summary>
|
|
/// The amount of essence that is needed to use the ability.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("blightCost")]
|
|
public float BlightCost = 50;
|
|
|
|
/// <summary>
|
|
/// The status effects applied after the ability
|
|
/// the first float corresponds to amount of time the entity is stunned.
|
|
/// the second corresponds to the amount of time the entity is made solid.
|
|
/// </summary>
|
|
[DataField("blightDebuffs")]
|
|
public Vector2 BlightDebuffs = new(2, 5);
|
|
|
|
/// <summary>
|
|
/// The radius around the user that this ability affects
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("blightRadius")]
|
|
public float BlightRadius = 3.5f;
|
|
#endregion
|
|
|
|
#region Malfunction Ability
|
|
/// <summary>
|
|
/// The amount of essence that is needed to use the ability.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("malfunctionCost")]
|
|
public FixedPoint2 MalfunctionCost = 60;
|
|
|
|
/// <summary>
|
|
/// The status effects applied after the ability
|
|
/// the first float corresponds to amount of time the entity is stunned.
|
|
/// the second corresponds to the amount of time the entity is made solid.
|
|
/// </summary>
|
|
[DataField("malfunctionDebuffs")]
|
|
public Vector2 MalfunctionDebuffs = new(2, 8);
|
|
|
|
/// <summary>
|
|
/// The radius around the user that this ability affects
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("malfunctionRadius")]
|
|
public float MalfunctionRadius = 3.5f;
|
|
|
|
/// <summary>
|
|
/// Whitelist for entities that can be emagged by malfunction.
|
|
/// Used to prevent ultra gamer things like ghost emagging chem or instantly launching the shuttle.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntityWhitelist? MalfunctionWhitelist;
|
|
|
|
/// <summary>
|
|
/// Whitelist for entities that can never be emagged by malfunction.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntityWhitelist? MalfunctionBlacklist;
|
|
#endregion
|
|
|
|
[DataField]
|
|
public ProtoId<AlertPrototype> EssenceAlert = "Essence";
|
|
|
|
#region Visualizer
|
|
[DataField("state")]
|
|
public string State = "idle";
|
|
[DataField("corporealState")]
|
|
public string CorporealState = "active";
|
|
[DataField("stunnedState")]
|
|
public string StunnedState = "stunned";
|
|
[DataField("harvestingState")]
|
|
public string HarvestingState = "harvesting";
|
|
#endregion
|
|
|
|
[DataField] public EntityUid? Action;
|
|
|
|
/// <summary>
|
|
/// Offbrand - how much cold damage to deal on harvest
|
|
/// </summary>
|
|
[DataField]
|
|
public FixedPoint2 HarvestColdDamage = 200;
|
|
}
|