using System;
namespace BaseGames.Equipment
{
///
/// 法术资源类型。
///
public enum SpellType
{
SoulAttack,
HealingWave
}
///
/// 灵魂法术强化护符效果(架构 09_ProgressionModule §5)。
/// 装备时减少灵力消耗,卸下时还原。SpellManager 消耗时查询 PlayerStats.SoulCostReduction。
///
[Serializable]
public class SoulSpellEffect : ICharmEffect
{
public SpellType spellType;
public int soulCostReduction; // 减少消耗的灵力点数
public void OnEquip(EquipmentContext ctx)
{
ctx.Stats?.AddSoulCostReduction(soulCostReduction);
}
public void OnUnequip(EquipmentContext ctx)
{
ctx.Stats?.RemoveSoulCostReduction(soulCostReduction);
}
public string GetEffectDescription() => $"{spellType} 消耗减少 {soulCostReduction} 灵力";
}
}