Files
crystall-punk-14/Content.Shared/_CP14/Skill/Effects/AddMaxStamina.cs
Red ecadfb3ea5 Big content update (#1484)
* Add investigator's cloak entity and sprites

Introduced a new investigator's cloak for senior investigators, including its entity definition and associated sprites. Also updated helmet sprites for the guard role.

* Add Investigator job to CP14 roles and assets

Introduces the Investigator job, including English and Russian localization, job prototype, loadout, play time tracker, and status icon. Updates department and role loadout configurations to include the new job. Enables setPreference for Guard and Guard Commander jobs. Adds Investigator job icon and updates related metadata.

* Rebalance mana splitting spell parameters

Reduced mana cost from 15 to 10, adjusted mana change effect, and updated spell event to use a toggleable action with new cast time and distance threshold. Also changed visual effect colors for the spell impact.

* job spawner

* remove mana splitting from mana glove

* Update tools.yml

* reduce memory points to 0.5 for tier magics

* Add CP14 spell to create beams and extend beam system

Introduces CP14SpellCreateBeam, a new spell effect for creating beams using the shared beam system. Adds a virtual TryCreateBeam method to SharedBeamSystem and overrides it in BeamSystem to support shared spell functionality.

* athletic branch refactor

* second wind skill

* minor fixes

* remove skeletons specific spells

* small magic splitting

* Update migration.yml

* clear references

* guidebook species update, -0.5 people memory, innate athletic to carcat, nerf night vision

* disable guards again
2025-06-29 00:02:04 +03:00

40 lines
1.3 KiB
C#

using Content.Shared._CP14.Skill.Prototypes;
using Content.Shared.Damage.Components;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.Skill.Effects;
public sealed partial class AddManaStamina : CP14SkillEffect
{
[DataField]
public float AdditionalStamina = 0;
public override void AddSkill(IEntityManager entManager, EntityUid target)
{
if (!entManager.TryGetComponent<StaminaComponent>(target, out var staminaComp))
return;
staminaComp.CritThreshold += AdditionalStamina;
entManager.Dirty(target, staminaComp);
}
public override void RemoveSkill(IEntityManager entManager, EntityUid target)
{
if (!entManager.TryGetComponent<StaminaComponent>(target, out var staminaComp))
return;
staminaComp.CritThreshold -= AdditionalStamina;
entManager.Dirty(target, staminaComp);
}
public override string? GetName(IEntityManager entMagager, IPrototypeManager protoManager)
{
return null;
}
public override string? GetDescription(IEntityManager entMagager, IPrototypeManager protoManager, ProtoId<CP14SkillPrototype> skill)
{
return Loc.GetString("cp14-skill-desc-add-stamina", ("stamina", AdditionalStamina.ToString()));
}
}