Files
crystall-punk-14/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellAddMemoryPoint.cs
Red 5020be8ec6 Add supports for different skillpoints types (#1581)
* Refactor skill points to support multiple types

Reworked the skill point system to support multiple types (e.g., Memory, Blood) instead of a single experience cap. Added CP14SkillPointPrototype, updated skill storage and UI to handle per-type points, and adjusted related logic and prototypes. Updated localization and assets to reflect these changes.

* oopsie

* Update human.yml

* Update CP14SkillUIController.cs

* Refactor skill storage to use skillPoints config

Replaced 'experienceMaxCap: 0' with 'skillPoints: Memory: max: 0' in Skeletons T1, T2, and undead mob prototypes. This change standardizes skill storage configuration and improves clarity.
2025-07-27 13:47:05 +03:00

28 lines
737 B
C#

using Content.Shared._CP14.Skill;
using Content.Shared._CP14.Skill.Prototypes;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellAddMemoryPoint : CP14SpellEffect
{
[DataField]
public float AddedPoints = 0.5f;
[DataField]
public float Limit = 6.5f;
[DataField]
public ProtoId<CP14SkillPointPrototype> SkillPointType = "Memory";
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Target is null)
return;
var skillSys = entManager.System<CP14SharedSkillSystem>();
skillSys.AddSkillPoints(args.Target.Value, SkillPointType, AddedPoints, Limit);
}
}