多轮审查和修复
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using BaseGames.Skills;
|
||||
|
||||
namespace BaseGames.Equipment
|
||||
{
|
||||
/// <summary>
|
||||
/// 技能数值修改护符效果(架构 09_ProgressionModule §5)。
|
||||
/// 通过 SkillModifierRegistry 对指定技能的数值加成。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class SkillNumericModifierEffect : ICharmEffect
|
||||
{
|
||||
public string TargetSkillId;
|
||||
public SkillStat Stat;
|
||||
public float Delta;
|
||||
public bool IsPercent;
|
||||
|
||||
public void OnEquip(EquipmentContext ctx)
|
||||
=> ctx.SkillMods?.Register(TargetSkillId, Stat, Delta, IsPercent);
|
||||
|
||||
public void OnUnequip(EquipmentContext ctx)
|
||||
=> ctx.SkillMods?.Unregister(TargetSkillId, Stat, Delta, IsPercent);
|
||||
|
||||
public string GetEffectDescription()
|
||||
=> $"{TargetSkillId}.{Stat} {(Delta >= 0 ? "+" : "")}{Delta}{(IsPercent ? "%" : "")}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user