卡牌更新
This commit is contained in:
@@ -15,8 +15,7 @@ namespace Continentis.MainGame.Equipment
|
||||
[Header("Base Info")] public Guid equipmentID;
|
||||
public List<string> tags;
|
||||
|
||||
[Header("Submodules")] public AttributeSubmodule coreAttributeSubmodule { get; private set; }
|
||||
public AttributeSubmodule generalAttributeSubmodule { get; private set; }
|
||||
[Header("Submodules")] public AttributeSubmodule generalAttributeSubmodule { get; private set; }
|
||||
public EventSubmodule eventSubmodule { get; private set; }
|
||||
public ContentSubmodule contentSubmodule { get; private set; }
|
||||
|
||||
@@ -24,8 +23,6 @@ namespace Continentis.MainGame.Equipment
|
||||
{
|
||||
this.equipmentID = Guid.NewGuid();
|
||||
this.tags = new List<string>(equipmentData.tags);
|
||||
this.coreAttributeSubmodule = new AttributeSubmodule(this, equipmentData.coreNumericChange,
|
||||
equipmentData.corePercentageChangeOfAccumulation, equipmentData.corePercentageChangeOfMultiplication);
|
||||
this.generalAttributeSubmodule = new AttributeSubmodule(this, equipmentData.generalNumericChange,
|
||||
equipmentData.generalPercentageChangeOfAccumulation,
|
||||
equipmentData.generalPercentageChangeOfMultiplication);
|
||||
@@ -38,26 +35,12 @@ namespace Continentis.MainGame.Equipment
|
||||
if (character != null)
|
||||
{
|
||||
this.character = character;
|
||||
this.character.equipmentSubmodule.currentEquipments.Add(this); //TODO: 后续换成装备函数
|
||||
this.character.equipmentSubmodule.currentEquipments.Add(this);
|
||||
|
||||
List<string> coreNames = coreAttributeSubmodule.GetModifiedAttributeNames();
|
||||
|
||||
if (coreNames.Count > 0)
|
||||
generalAttributeSubmodule.GetModifiedAttributeNames().ForEach(attributeName =>
|
||||
{
|
||||
coreAttributeSubmodule.GetModifiedAttributeNames().ForEach(attributeName =>
|
||||
{
|
||||
this.character.attributeSubmodule.RefreshCoreAttribute(attributeName);
|
||||
});
|
||||
|
||||
this.character.attributeSubmodule.RefreshAllGeneralAttributes();
|
||||
}
|
||||
else
|
||||
{
|
||||
generalAttributeSubmodule.GetModifiedAttributeNames().ForEach(attributeName =>
|
||||
{
|
||||
this.character.attributeSubmodule.RefreshGeneralAttribute(attributeName);
|
||||
});
|
||||
}
|
||||
this.character.attributeSubmodule.RefreshGeneralAttribute(attributeName);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,41 +64,21 @@ namespace Continentis.MainGame.Equipment
|
||||
[LabelText("装备描述 Key")]
|
||||
public string equipmentDescription;
|
||||
|
||||
// ── 核心属性变化 ──────────────────────────────────────────────────────
|
||||
// ── 属性变化 ──────────────────────────────────────────────────────
|
||||
|
||||
[TabGroup("Data", "核心属性"), PropertyOrder(20)]
|
||||
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "数值变化")]
|
||||
[Tooltip("对角色 CoreAttributes 施加固定数值加成")]
|
||||
[LabelText("数值变化 (Numeric)")]
|
||||
public SerializableDictionary<string, float> coreNumericChange = new SerializableDictionary<string, float>();
|
||||
|
||||
[TabGroup("Data", "核心属性"), PropertyOrder(21)]
|
||||
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "百分比(累加)")]
|
||||
[Tooltip("对角色 CoreAttributes 施加百分比累加加成(如 +10% 填写 0.1)")]
|
||||
[LabelText("百分比变化—累加 (Accum%)")]
|
||||
public SerializableDictionary<string, float> corePercentageChangeOfAccumulation = new SerializableDictionary<string, float>();
|
||||
|
||||
[TabGroup("Data", "核心属性"), PropertyOrder(22)]
|
||||
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "百分比(乘法)")]
|
||||
[Tooltip("对角色 CoreAttributes 施加百分比乘法加成")]
|
||||
[LabelText("百分比变化—乘法 (Multi%)")]
|
||||
public SerializableDictionary<string, float> corePercentageChangeOfMultiplication = new SerializableDictionary<string, float>();
|
||||
|
||||
// ── 通用属性变化 ──────────────────────────────────────────────────────
|
||||
|
||||
[TabGroup("Data", "通用属性"), PropertyOrder(30)]
|
||||
[TabGroup("Data", "属性"), PropertyOrder(20)]
|
||||
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "数值变化")]
|
||||
[Tooltip("对角色 GeneralAttributes 施加固定数值加成")]
|
||||
[LabelText("数值变化 (Numeric)")]
|
||||
public SerializableDictionary<string, float> generalNumericChange = new SerializableDictionary<string, float>();
|
||||
|
||||
[TabGroup("Data", "通用属性"), PropertyOrder(31)]
|
||||
[TabGroup("Data", "属性"), PropertyOrder(21)]
|
||||
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "百分比(累加)")]
|
||||
[Tooltip("对角色 GeneralAttributes 施加百分比累加加成(如 +10% 填写 0.1)")]
|
||||
[LabelText("百分比变化—累加 (Accum%)")]
|
||||
public SerializableDictionary<string, float> generalPercentageChangeOfAccumulation = new SerializableDictionary<string, float>();
|
||||
|
||||
[TabGroup("Data", "通用属性"), PropertyOrder(32)]
|
||||
[TabGroup("Data", "属性"), PropertyOrder(22)]
|
||||
[DictionaryDrawerSettings(KeyLabel = "属性名", ValueLabel = "百分比(乘法)")]
|
||||
[Tooltip("对角色 GeneralAttributes 施加百分比乘法加成")]
|
||||
[LabelText("百分比变化—乘法 (Multi%)")]
|
||||
|
||||
Reference in New Issue
Block a user