2025-06-14 14:21:25 +03:00
|
|
|
using Content.Shared._CP14.Skill;
|
2025-07-27 13:47:05 +03:00
|
|
|
using Content.Shared._CP14.Skill.Prototypes;
|
|
|
|
|
using Robust.Shared.Prototypes;
|
2025-06-14 14:21:25 +03:00
|
|
|
|
|
|
|
|
namespace Content.Shared._CP14.MagicSpell.Spells;
|
|
|
|
|
|
|
|
|
|
public sealed partial class CP14SpellAddMemoryPoint : CP14SpellEffect
|
|
|
|
|
{
|
|
|
|
|
[DataField]
|
|
|
|
|
public float AddedPoints = 0.5f;
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public float Limit = 6.5f;
|
|
|
|
|
|
2025-07-27 13:47:05 +03:00
|
|
|
[DataField]
|
|
|
|
|
public ProtoId<CP14SkillPointPrototype> SkillPointType = "Memory";
|
|
|
|
|
|
2025-06-14 14:21:25 +03:00
|
|
|
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (args.Target is null)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var skillSys = entManager.System<CP14SharedSkillSystem>();
|
|
|
|
|
|
2025-07-27 13:47:05 +03:00
|
|
|
skillSys.AddSkillPoints(args.Target.Value, SkillPointType, AddedPoints, Limit);
|
2025-06-14 14:21:25 +03:00
|
|
|
}
|
|
|
|
|
}
|