diff --git a/DungeonShooting_Godot/excel/ActivePropBase.xlsx b/DungeonShooting_Godot/excel/ActivePropBase.xlsx index dbd73e7..d050768 100644 --- a/DungeonShooting_Godot/excel/ActivePropBase.xlsx +++ b/DungeonShooting_Godot/excel/ActivePropBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/resource/config/ActivePropBase.json b/DungeonShooting_Godot/resource/config/ActivePropBase.json index 68f18ce..8120b14 100644 --- a/DungeonShooting_Godot/resource/config/ActivePropBase.json +++ b/DungeonShooting_Godot/resource/config/ActivePropBase.json @@ -6,7 +6,7 @@ "Buff": null, "Condition": { "HpFull": [ - 0 + true ] }, "Effect": { @@ -27,7 +27,7 @@ "Buff": null, "Condition": { "AmmoFull": [ - 0 + true ] }, "Effect": { @@ -103,7 +103,7 @@ "Buff": null, "Condition": { "HpFull": [ - 0 + true ], "Gold": [ "\u003E=", diff --git a/DungeonShooting_Godot/src/config/ExcelConfig.cs b/DungeonShooting_Godot/src/config/ExcelConfig.cs index 42d5e0a..df8bd8d 100644 --- a/DungeonShooting_Godot/src/config/ExcelConfig.cs +++ b/DungeonShooting_Godot/src/config/ExcelConfig.cs @@ -8,31 +8,22 @@ public static partial class ExcelConfig { /// - /// BuffPropBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// ActivePropBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// - public static List BuffPropBase_List { get; private set; } + public static List ActivePropBase_List { get; private set; } /// - /// BuffPropBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// ActivePropBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id /// - public static Dictionary BuffPropBase_Map { get; private set; } + public static Dictionary ActivePropBase_Map { get; private set; } /// - /// Sound.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// ActivityBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// - public static List Sound_List { get; private set; } + public static List ActivityBase_List { get; private set; } /// - /// Sound.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// ActivityBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id /// - public static Dictionary Sound_Map { get; private set; } - - /// - /// WeaponBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 - /// - public static List WeaponBase_List { get; private set; } - /// - /// WeaponBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id - /// - public static Dictionary WeaponBase_Map { get; private set; } + public static Dictionary ActivityBase_Map { get; private set; } /// /// ActivityMaterial.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 @@ -53,6 +44,15 @@ public static Dictionary AiAttackAttr_Map { get; private set; } /// + /// BuffPropBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// + public static List BuffPropBase_List { get; private set; } + /// + /// BuffPropBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// + public static Dictionary BuffPropBase_Map { get; private set; } + + /// /// BulletBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// public static List BulletBase_List { get; private set; } @@ -62,15 +62,6 @@ public static Dictionary BulletBase_Map { get; private set; } /// - /// ActivePropBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 - /// - public static List ActivePropBase_List { get; private set; } - /// - /// ActivePropBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id - /// - public static Dictionary ActivePropBase_Map { get; private set; } - - /// /// EnemyBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// public static List EnemyBase_List { get; private set; } @@ -80,15 +71,6 @@ public static Dictionary EnemyBase_Map { get; private set; } /// - /// ActivityBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 - /// - public static List ActivityBase_List { get; private set; } - /// - /// ActivityBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id - /// - public static Dictionary ActivityBase_Map { get; private set; } - - /// /// LiquidMaterial.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 /// public static List LiquidMaterial_List { get; private set; } @@ -97,6 +79,24 @@ /// public static Dictionary LiquidMaterial_Map { get; private set; } + /// + /// Sound.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// + public static List Sound_List { get; private set; } + /// + /// Sound.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// + public static Dictionary Sound_Map { get; private set; } + + /// + /// WeaponBase.xlsx表数据集合, 以 List 形式存储, 数据顺序与 Excel 表相同 + /// + public static List WeaponBase_List { get; private set; } + /// + /// WeaponBase.xlsx表数据集合, 里 Map 形式存储, key 为 Id + /// + public static Dictionary WeaponBase_Map { get; private set; } + private static bool _init = false; /// @@ -107,75 +107,57 @@ if (_init) return; _init = true; - _InitBuffPropBaseConfig(); - _InitSoundConfig(); - _InitWeaponBaseConfig(); + _InitActivePropBaseConfig(); + _InitActivityBaseConfig(); _InitActivityMaterialConfig(); _InitAiAttackAttrConfig(); + _InitBuffPropBaseConfig(); _InitBulletBaseConfig(); - _InitActivePropBaseConfig(); _InitEnemyBaseConfig(); - _InitActivityBaseConfig(); _InitLiquidMaterialConfig(); + _InitSoundConfig(); + _InitWeaponBaseConfig(); - _InitBuffPropBaseRef(); - _InitWeaponBaseRef(); _InitActivePropBaseRef(); - _InitEnemyBaseRef(); _InitActivityBaseRef(); + _InitBuffPropBaseRef(); + _InitEnemyBaseRef(); + _InitWeaponBaseRef(); } - private static void _InitBuffPropBaseConfig() + private static void _InitActivePropBaseConfig() { try { - var text = _ReadConfigAsText("res://resource/config/BuffPropBase.json"); - BuffPropBase_List = new List(JsonSerializer.Deserialize>(text)); - BuffPropBase_Map = new Dictionary(); - foreach (var item in BuffPropBase_List) + var text = _ReadConfigAsText("res://resource/config/ActivePropBase.json"); + ActivePropBase_List = new List(JsonSerializer.Deserialize>(text)); + ActivePropBase_Map = new Dictionary(); + foreach (var item in ActivePropBase_List) { - BuffPropBase_Map.Add(item.Id, item); + ActivePropBase_Map.Add(item.Id, item); } } catch (Exception e) { GD.PrintErr(e.ToString()); - throw new Exception("初始化表'BuffPropBase'失败!"); + throw new Exception("初始化表'ActivePropBase'失败!"); } } - private static void _InitSoundConfig() + private static void _InitActivityBaseConfig() { try { - var text = _ReadConfigAsText("res://resource/config/Sound.json"); - Sound_List = JsonSerializer.Deserialize>(text); - Sound_Map = new Dictionary(); - foreach (var item in Sound_List) + var text = _ReadConfigAsText("res://resource/config/ActivityBase.json"); + ActivityBase_List = new List(JsonSerializer.Deserialize>(text)); + ActivityBase_Map = new Dictionary(); + foreach (var item in ActivityBase_List) { - Sound_Map.Add(item.Id, item); + ActivityBase_Map.Add(item.Id, item); } } catch (Exception e) { GD.PrintErr(e.ToString()); - throw new Exception("初始化表'Sound'失败!"); - } - } - private static void _InitWeaponBaseConfig() - { - try - { - var text = _ReadConfigAsText("res://resource/config/WeaponBase.json"); - WeaponBase_List = new List(JsonSerializer.Deserialize>(text)); - WeaponBase_Map = new Dictionary(); - foreach (var item in WeaponBase_List) - { - WeaponBase_Map.Add(item.Id, item); - } - } - catch (Exception e) - { - GD.PrintErr(e.ToString()); - throw new Exception("初始化表'WeaponBase'失败!"); + throw new Exception("初始化表'ActivityBase'失败!"); } } private static void _InitActivityMaterialConfig() @@ -214,6 +196,24 @@ throw new Exception("初始化表'AiAttackAttr'失败!"); } } + private static void _InitBuffPropBaseConfig() + { + try + { + var text = _ReadConfigAsText("res://resource/config/BuffPropBase.json"); + BuffPropBase_List = new List(JsonSerializer.Deserialize>(text)); + BuffPropBase_Map = new Dictionary(); + foreach (var item in BuffPropBase_List) + { + BuffPropBase_Map.Add(item.Id, item); + } + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化表'BuffPropBase'失败!"); + } + } private static void _InitBulletBaseConfig() { try @@ -232,24 +232,6 @@ throw new Exception("初始化表'BulletBase'失败!"); } } - private static void _InitActivePropBaseConfig() - { - try - { - var text = _ReadConfigAsText("res://resource/config/ActivePropBase.json"); - ActivePropBase_List = new List(JsonSerializer.Deserialize>(text)); - ActivePropBase_Map = new Dictionary(); - foreach (var item in ActivePropBase_List) - { - ActivePropBase_Map.Add(item.Id, item); - } - } - catch (Exception e) - { - GD.PrintErr(e.ToString()); - throw new Exception("初始化表'ActivePropBase'失败!"); - } - } private static void _InitEnemyBaseConfig() { try @@ -268,24 +250,6 @@ throw new Exception("初始化表'EnemyBase'失败!"); } } - private static void _InitActivityBaseConfig() - { - try - { - var text = _ReadConfigAsText("res://resource/config/ActivityBase.json"); - ActivityBase_List = new List(JsonSerializer.Deserialize>(text)); - ActivityBase_Map = new Dictionary(); - foreach (var item in ActivityBase_List) - { - ActivityBase_Map.Add(item.Id, item); - } - } - catch (Exception e) - { - GD.PrintErr(e.ToString()); - throw new Exception("初始化表'ActivityBase'失败!"); - } - } private static void _InitLiquidMaterialConfig() { try @@ -304,7 +268,81 @@ throw new Exception("初始化表'LiquidMaterial'失败!"); } } + private static void _InitSoundConfig() + { + try + { + var text = _ReadConfigAsText("res://resource/config/Sound.json"); + Sound_List = JsonSerializer.Deserialize>(text); + Sound_Map = new Dictionary(); + foreach (var item in Sound_List) + { + Sound_Map.Add(item.Id, item); + } + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化表'Sound'失败!"); + } + } + private static void _InitWeaponBaseConfig() + { + try + { + var text = _ReadConfigAsText("res://resource/config/WeaponBase.json"); + WeaponBase_List = new List(JsonSerializer.Deserialize>(text)); + WeaponBase_Map = new Dictionary(); + foreach (var item in WeaponBase_List) + { + WeaponBase_Map.Add(item.Id, item); + } + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化表'WeaponBase'失败!"); + } + } + private static void _InitActivePropBaseRef() + { + foreach (Ref_ActivePropBase item in ActivePropBase_List) + { + try + { + if (!string.IsNullOrEmpty(item.__Activity)) + { + item.Activity = ActivityBase_Map[item.__Activity]; + } + + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化'ActivePropBase'引用其他表数据失败, 当前行id: " + item.Id); + } + } + } + private static void _InitActivityBaseRef() + { + foreach (Ref_ActivityBase item in ActivityBase_List) + { + try + { + if (!string.IsNullOrEmpty(item.__Material)) + { + item.Material = ActivityMaterial_Map[item.__Material]; + } + + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化'ActivityBase'引用其他表数据失败, 当前行id: " + item.Id); + } + } + } private static void _InitBuffPropBaseRef() { foreach (Ref_BuffPropBase item in BuffPropBase_List) @@ -324,6 +362,25 @@ } } } + private static void _InitEnemyBaseRef() + { + foreach (Ref_EnemyBase item in EnemyBase_List) + { + try + { + if (!string.IsNullOrEmpty(item.__Activity)) + { + item.Activity = ActivityBase_Map[item.__Activity]; + } + + } + catch (Exception e) + { + GD.PrintErr(e.ToString()); + throw new Exception("初始化'EnemyBase'引用其他表数据失败, 当前行id: " + item.Id); + } + } + } private static void _InitWeaponBaseRef() { foreach (Ref_WeaponBase item in WeaponBase_List) @@ -392,63 +449,6 @@ } } } - private static void _InitActivePropBaseRef() - { - foreach (Ref_ActivePropBase item in ActivePropBase_List) - { - try - { - if (!string.IsNullOrEmpty(item.__Activity)) - { - item.Activity = ActivityBase_Map[item.__Activity]; - } - - } - catch (Exception e) - { - GD.PrintErr(e.ToString()); - throw new Exception("初始化'ActivePropBase'引用其他表数据失败, 当前行id: " + item.Id); - } - } - } - private static void _InitEnemyBaseRef() - { - foreach (Ref_EnemyBase item in EnemyBase_List) - { - try - { - if (!string.IsNullOrEmpty(item.__Activity)) - { - item.Activity = ActivityBase_Map[item.__Activity]; - } - - } - catch (Exception e) - { - GD.PrintErr(e.ToString()); - throw new Exception("初始化'EnemyBase'引用其他表数据失败, 当前行id: " + item.Id); - } - } - } - private static void _InitActivityBaseRef() - { - foreach (Ref_ActivityBase item in ActivityBase_List) - { - try - { - if (!string.IsNullOrEmpty(item.__Material)) - { - item.Material = ActivityMaterial_Map[item.__Material]; - } - - } - catch (Exception e) - { - GD.PrintErr(e.ToString()); - throw new Exception("初始化'ActivityBase'引用其他表数据失败, 当前行id: " + item.Id); - } - } - } private static string _ReadConfigAsText(string path) { var file = FileAccess.Open(path, FileAccess.ModeFlags.Read); diff --git a/DungeonShooting_Godot/src/game/buff/BuffFragment.cs b/DungeonShooting_Godot/src/game/buff/BuffFragment.cs index 82dd69d..5b29f99 100644 --- a/DungeonShooting_Godot/src/game/buff/BuffFragment.cs +++ b/DungeonShooting_Godot/src/game/buff/BuffFragment.cs @@ -1,6 +1,4 @@ -using System; - /// /// 被动属性逻辑基类 /// diff --git a/DungeonShooting_Godot/src/game/buff/BuffFragmentAttribute.cs b/DungeonShooting_Godot/src/game/buff/BuffFragmentAttribute.cs index bb12a62..ac3a753 100644 --- a/DungeonShooting_Godot/src/game/buff/BuffFragmentAttribute.cs +++ b/DungeonShooting_Godot/src/game/buff/BuffFragmentAttribute.cs @@ -1,21 +1,12 @@ using System; +/// +/// buff片段 +/// [AttributeUsage(AttributeTargets.Class)] -public class BuffFragmentAttribute : Attribute +public class BuffFragmentAttribute : FragmentAttribute { - /// - /// Buff属性名称 - /// - public string BuffName { get; set; } - - /// - /// 描述 - /// - public string Description { get; set; } - - public BuffFragmentAttribute(string buffName, string description) + public BuffFragmentAttribute(string name, string description) : base(name, description) { - BuffName = buffName; - Description = description; } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/ChargeFragmentAttribute.cs b/DungeonShooting_Godot/src/game/buff/ChargeFragmentAttribute.cs index 4cf3f9c..6bf9b8f 100644 --- a/DungeonShooting_Godot/src/game/buff/ChargeFragmentAttribute.cs +++ b/DungeonShooting_Godot/src/game/buff/ChargeFragmentAttribute.cs @@ -1,21 +1,12 @@ using System; +/// +/// 充能片段 +/// [AttributeUsage(AttributeTargets.Class)] -public class ChargeFragmentAttribute : Attribute +public class ChargeFragmentAttribute : FragmentAttribute { - /// - /// 充能属性名称 - /// - public string ChargeName { get; set; } - - /// - /// 描述 - /// - public string Description { get; set; } - - public ChargeFragmentAttribute(string chargeName, string description) + public ChargeFragmentAttribute(string name, string description) : base(name, description) { - ChargeName = chargeName; - Description = description; } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/ConditionFragmentAttribute.cs b/DungeonShooting_Godot/src/game/buff/ConditionFragmentAttribute.cs index 1d9191e..fd79f64 100644 --- a/DungeonShooting_Godot/src/game/buff/ConditionFragmentAttribute.cs +++ b/DungeonShooting_Godot/src/game/buff/ConditionFragmentAttribute.cs @@ -1,22 +1,13 @@ using System; +/// +/// 条件片段 +/// [AttributeUsage(AttributeTargets.Class)] -public class ConditionFragmentAttribute : Attribute +public class ConditionFragmentAttribute : FragmentAttribute { - /// - /// 条件名称 - /// - public string ConditionName { get; set; } - - /// - /// 描述 - /// - public string Description { get; set; } - - public ConditionFragmentAttribute(string conditionName, string description) + public ConditionFragmentAttribute(string name, string description) : base(name, description) { - ConditionName = conditionName; - Description = description; } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/EffectFragmentAttribute.cs b/DungeonShooting_Godot/src/game/buff/EffectFragmentAttribute.cs index 3a5f9fc..5115b91 100644 --- a/DungeonShooting_Godot/src/game/buff/EffectFragmentAttribute.cs +++ b/DungeonShooting_Godot/src/game/buff/EffectFragmentAttribute.cs @@ -1,21 +1,12 @@ using System; +/// +/// 主动效果片段 +/// [AttributeUsage(AttributeTargets.Class)] -public class EffectFragmentAttribute : Attribute +public class EffectFragmentAttribute : FragmentAttribute { - /// - /// 效果名称 - /// - public string EffectName { get; set; } - - /// - /// 描述 - /// - public string Description { get; set; } - - public EffectFragmentAttribute(string effectName, string description) + public EffectFragmentAttribute(string name, string description) : base(name, description) { - EffectName = effectName; - Description = description; } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/FragmentAttribute.cs b/DungeonShooting_Godot/src/game/buff/FragmentAttribute.cs new file mode 100644 index 0000000..e2100cd --- /dev/null +++ b/DungeonShooting_Godot/src/game/buff/FragmentAttribute.cs @@ -0,0 +1,63 @@ +using System; + +/// +/// 属性逻辑基类 +/// +public abstract class FragmentAttribute : Attribute +{ + /// + /// 属性名称 + /// + public string Name { get; set; } + + /// + /// 描述 + /// + public string Description { get; set; } + + /// + /// 参数1 描述 + /// + public string Arg1 { get; set; } + + /// + /// 参数2 描述 + /// + public string Arg2 { get; set; } + + /// + /// 参数3 描述 + /// + public string Arg3 { get; set; } + + /// + /// 参数4 描述 + /// + public string Arg4 { get; set; } + + /// + /// 参数5 描述 + /// + public string Arg5 { get; set; } + + /// + /// 参数6 描述 + /// + public string Arg6 { get; set; } + + /// + /// 参数7 描述 + /// + public string Arg7 { get; set; } + + /// + /// 参数8 描述 + /// + public string Arg8 { get; set; } + + public FragmentAttribute(string name, string description) + { + Name = name; + Description = description; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_ActivePropsCapacity.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_ActivePropsCapacity.cs index 75ea305..79a09d0 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_ActivePropsCapacity.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_ActivePropsCapacity.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[BuffFragment("ActivePropsCapacity", "主动道具背包容量 buff, 参数‘1’为主动道具背包增加的容量")] +[BuffFragment( + "ActivePropsCapacity", + "主动道具背包容量 buff", + Arg1 = "(int)主动道具背包增加的容量" +)] public class Buff_ActivePropsCapacity : BuffFragment { private int _value; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletBounceCount.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletBounceCount.cs index 950b5df..091849b 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletBounceCount.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletBounceCount.cs @@ -1,7 +1,10 @@ using System.Text.Json; -[BuffFragment("BulletBounceCount", "子弹弹射数量 buff, 参数‘1’为增加的弹射次数")] +[BuffFragment( + "BulletBounceCount", "子弹弹射数量 buff", + Arg1 = "(int)子弹增加的弹射次数" +)] public class Buff_BulletBounceCount : BuffFragment { private int _value; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletCount.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletCount.cs index 686db6d..15944b1 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletCount.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletCount.cs @@ -2,10 +2,12 @@ using System.Text.Json; using Godot; -[BuffFragment("BulletCount", - "子弹数量 buff, " + - "参数‘1’为子弹数量添加类型, 1: 具体数量, 2:百分比(小数), " + - "参数‘2’为增加子弹的数量")] +[BuffFragment( + "BulletCount", + "子弹数量 buff, ", + Arg1 = "(int)子弹数量添加类型, 1: 具体数量, 2:百分比", + Arg2 = "(float)增加子弹的数量" +)] public class Buff_BulletCount : BuffFragment { private int _type; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDamage.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDamage.cs index 20af6be..4498fb4 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDamage.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDamage.cs @@ -2,10 +2,12 @@ using System.Text.Json; using Godot; -[BuffFragment("BulletDamage", - "提升子弹伤害buff, " + - "参数‘1’为伤害增加类型: 1:具体伤害, 2:百分比伤害(小数), " + - "参数‘2’为增益伤害值")] +[BuffFragment( + "BulletDamage", + "提升子弹伤害buff, ", + Arg1 = "(int)伤害增加类型: 1:具体伤害, 2:百分比伤害", + Arg2 = "(float)增益伤害值" +)] public class Buff_BulletDamage : BuffFragment { private int _type; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDeviationAngle.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDeviationAngle.cs index 9928877..a483376 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDeviationAngle.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDeviationAngle.cs @@ -1,10 +1,12 @@ using System.Text.Json; -[BuffFragment("BulletDeviationAngle", - "子弹偏移角度 buff, " + - "参数‘1’为增加子弹偏移角度下限, " + - "参数‘2’为增加子弹偏移角度上限, 单位角度制, 会从上限和下限随机抽取值")] +[BuffFragment( + "BulletDeviationAngle", + "子弹偏移角度 buff, 单位角度制, 会从上限和下限随机抽取值", + Arg1 = "(float)增加子弹偏移角度下限", + Arg2 = "(float)增加子弹偏移角度上限" +)] public class Buff_BulletDeviationAngle : BuffFragment { private float _min; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDistance.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDistance.cs index bf75520..e18f3b4 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDistance.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletDistance.cs @@ -1,10 +1,12 @@ using System.Text.Json; -[BuffFragment("BulletDistance", - "子弹射程 buff, " + - "参数‘1’为射程增加类型: 1:具体射程, 2:百分比射程(小数), " + - "参数‘2’为子弹增加的射程值")] +[BuffFragment( + "BulletDistance", + "子弹射程 buff, ", + Arg1 = "(int)子弹射程增加类型: 1:具体射程, 2:百分比射程", + Arg2 = "(float)子弹增加的射程值" +)] public class Buff_BulletDistance : BuffFragment { private int _type; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletPenetration.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletPenetration.cs index 600c7b6..1b1d70f 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletPenetration.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletPenetration.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[BuffFragment("BulletPenetration", "子弹穿透次数 buff, 参数‘1’为增加的穿透次数")] +[BuffFragment( + "BulletPenetration", + "子弹穿透次数 buff", + Arg1 = "(int)子弹增加的穿透次数" +)] public class Buff_BulletPenetration : BuffFragment { private int _value; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletRepel.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletRepel.cs index e6711c0..6033fbf 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletRepel.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletRepel.cs @@ -2,10 +2,12 @@ using System.Text.Json; using Godot; -[BuffFragment("BulletRepel", - "子弹击退 buff, " + - "参数‘1’为击退增加类型: 1:具体击退值, 2:百分比击退值(小数), " + - "参数‘2’为子弹增加的击退值")] +[BuffFragment( + "BulletRepel", + "子弹击退 buff, ", + Arg1 = "(int)击退增加类型: 1:具体击退值, 2:百分比击退值", + Arg2 = "(float)子弹增加的击退值" +)] public class Buff_BulletRepel : BuffFragment { private int _type; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletSpeed.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletSpeed.cs index 1a4994a..7831ca9 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletSpeed.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_BulletSpeed.cs @@ -1,10 +1,12 @@ using System.Text.Json; -[BuffFragment("BulletSpeed", - "子弹速度 buff, " + - "参数‘1’为射速增加类型: 1:具体射速, 2:百分比射速(小数), " + - "参数‘2’为子弹增加的射速值")] +[BuffFragment( + "BulletSpeed", + "子弹速度 buff, ", + Arg1 = "(int)子弹速度增加类型: 1:具体速度, 2:百分比速度", + Arg2 = "(float)子弹增加的速度值" +)] public class Buff_BulletSpeed : BuffFragment { private int _type; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_GetGold.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_GetGold.cs index a5fe5d0..bb004d2 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_GetGold.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_GetGold.cs @@ -2,9 +2,12 @@ using System.Text.Json; using Godot; -[BuffFragment("GetGold", "计算获取的金币buff, " + - "参数‘1’为金币数量添加类型, 1: 具体数量, 2:百分比(小数), " + - "参数‘2’为增加金币的数量值")] +[BuffFragment( + "GetGold", + "计算获取的金币buff, ", + Arg1 = "(int)金币数量添加类型, 1: 具体数量, 2:百分比", + Arg2 = "(float)增加金币的数量值" +)] public class Buff_GetGold : BuffFragment { private int _type; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxHp.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxHp.cs index 5f0ae1b..292926f 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxHp.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxHp.cs @@ -2,7 +2,11 @@ using System.Collections.Generic; using System.Text.Json; -[BuffFragment("MaxHp", "血量上限 buff, 参数‘1’为血量上限值")] +[BuffFragment( + "MaxHp", + "增加血量上限 buff", + Arg1 = "(int)增加血量上限值" +)] public class Buff_MaxHp : BuffFragment { private List _cacheId = new List(); diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxShield.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxShield.cs index aac29fa..805c140 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxShield.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_MaxShield.cs @@ -2,7 +2,11 @@ using System.Collections.Generic; using System.Text.Json; -[BuffFragment("MaxShield", "护盾上限buff, 参数‘1’为护盾上限")] +[BuffFragment( + "MaxShield", + "增加护盾上限buff", + Arg1 = "(int)增加的护盾上限值" +)] public class Buff_MaxShield : BuffFragment { private List _cacheId = new List(); diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_MoveSpeed.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_MoveSpeed.cs index f4ae7ef..53b0219 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_MoveSpeed.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_MoveSpeed.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[BuffFragment("MoveSpeed", "移速 buff, 参数‘1’为移动速度值")] +[BuffFragment( + "MoveSpeed", + "增加移速 buff", + Arg1 = "(float)增加的移动速度值" +)] public class Buff_MoveSpeed : BuffFragment { private float _moveSpeed; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_OffsetInjury.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_OffsetInjury.cs index 01dcee8..4f5912e 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_OffsetInjury.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_OffsetInjury.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[BuffFragment("OffsetInjury", "受伤时有概率抵消伤害的buff, 参数‘1’为抵消伤害概率百分比(小数)")] +[BuffFragment( + "OffsetInjury", + "受伤时有概率抵消伤害的 buff", + Arg1 = "(float)抵消伤害概率百分比" +)] public class Buff_OffsetInjury : BuffFragment { private float _value; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_RandomBulletSpeed.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_RandomBulletSpeed.cs index 52ab646..c625f0f 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_RandomBulletSpeed.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_RandomBulletSpeed.cs @@ -1,10 +1,12 @@ using System.Text.Json; -[BuffFragment("RandomBulletSpeed", - "子弹增加随机速度 buff, " + - "参数‘1’为增加子弹速度下限, " + - "参数‘2’为增加子弹速度上限, 会从上限和下限随机抽取值")] +[BuffFragment( + "RandomBulletSpeed", + "子弹增加随机速度 buff, 会从上限和下限随机抽取值", + Arg1 = "(float)增加子弹速度下限", + Arg2 = "(float)增加子弹速度上限" +)] public class Buff_RandomBulletSpeed : BuffFragment { private float _min; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_Scattering.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_Scattering.cs index 0149164..dfd6ee8 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_Scattering.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_Scattering.cs @@ -2,7 +2,11 @@ using System.Text.Json; using Godot; -[BuffFragment("Scattering", "提高武器精准度buff, 参数‘1’为提升的精准度百分比值(小数)")] +[BuffFragment( + "Scattering", + "提高武器精准度 buff", + Arg1 = "(float)精准度提升百分比值" +)] public class Buff_Scattering : BuffFragment { private float _value; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_ShieldRecoveryTime.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_ShieldRecoveryTime.cs index ffde492..fd86b85 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_ShieldRecoveryTime.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_ShieldRecoveryTime.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[BuffFragment("ShieldRecoveryTime", "单格护盾减少的恢复时间, 参数‘1’单位: 秒")] +[BuffFragment( + "ShieldRecoveryTime", + "单格护盾减少的恢复时间, 单位: 秒", + Arg1 = "(float)单格护盾减少的恢复时间" +)] public class Buff_ShieldRecoveryTime : BuffFragment { private float _time; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_WeaponCapacity.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_WeaponCapacity.cs index 8e45113..44357fc 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_WeaponCapacity.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_WeaponCapacity.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[BuffFragment("WeaponCapacity", "武器背包容量 buff, 参数‘1’为武器背包增加的容量")] +[BuffFragment( + "WeaponCapacity", + "武器背包容量 buff", + Arg1 = "(int)武器背包增加的容量" +)] public class Buff_WeaponCapacity : BuffFragment { private int _value; diff --git a/DungeonShooting_Godot/src/game/buff/buff/Buff_WoundedInvincibleTime.cs b/DungeonShooting_Godot/src/game/buff/buff/Buff_WoundedInvincibleTime.cs index 07dfe39..bca7e6d 100644 --- a/DungeonShooting_Godot/src/game/buff/buff/Buff_WoundedInvincibleTime.cs +++ b/DungeonShooting_Godot/src/game/buff/buff/Buff_WoundedInvincibleTime.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[BuffFragment("WoundedInvincibleTime", "延长无敌时间buff, 参数‘1’为延长时间, 单位秒")] +[BuffFragment( + "WoundedInvincibleTime", + "延长无敌时间 buff, 单位秒", + Arg1 = "(float)延长时间" +)] public class Buff_WoundedInvincibleTime : BuffFragment { private float _time; diff --git a/DungeonShooting_Godot/src/game/buff/charge/Cha_EnterRoom.cs b/DungeonShooting_Godot/src/game/buff/charge/Cha_EnterRoom.cs index 772cae4..8745443 100644 --- a/DungeonShooting_Godot/src/game/buff/charge/Cha_EnterRoom.cs +++ b/DungeonShooting_Godot/src/game/buff/charge/Cha_EnterRoom.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[ChargeFragment("EnterRoom", "玩家第一次进入某个房间充能, 该条充能件仅对玩家生效, 参数1为进入房间充能量(0-1)")] +[ChargeFragment( + "EnterRoom", + "玩家第一次进入某个房间充能, 该条充能件仅对玩家生效", + Arg1 = "(float)充能量, 范围内0-1" +)] public class Cha_EnterRoom : ChargeFragment { private float _value = 0.2f; diff --git a/DungeonShooting_Godot/src/game/buff/charge/Cha_Hurt.cs b/DungeonShooting_Godot/src/game/buff/charge/Cha_Hurt.cs index 0171883..4f3f874 100644 --- a/DungeonShooting_Godot/src/game/buff/charge/Cha_Hurt.cs +++ b/DungeonShooting_Godot/src/game/buff/charge/Cha_Hurt.cs @@ -1,8 +1,11 @@ using System.Text.Json; -[ChargeFragment("Hurt", - "造成伤害充能, 参数1为充满能量需要造成的伤害值")] +[ChargeFragment( + "Hurt", + "造成伤害充能", + Arg1 = "(int)充满能量需要造成的伤害值" +)] public class Cha_Hurt : ChargeFragment { private int _value = 100; diff --git a/DungeonShooting_Godot/src/game/buff/condition/Cond_AmmoFull.cs b/DungeonShooting_Godot/src/game/buff/condition/Cond_AmmoFull.cs index fea7207..f848878 100644 --- a/DungeonShooting_Godot/src/game/buff/condition/Cond_AmmoFull.cs +++ b/DungeonShooting_Godot/src/game/buff/condition/Cond_AmmoFull.cs @@ -1,16 +1,18 @@ using System.Text.Json; -[ConditionFragment("AmmoFull", - "判断当前武器弹药状态, " + - "参数1可选值: 0:判断非满弹药, 1:判断满弹药")] +[ConditionFragment( + "AmmoFull", + "判断当前武器弹药状态, ", + Arg1 = "(boolean)是否判断满弹药" +)] public class Cond_AmmoFull : ConditionFragment { - private int _type; + private bool _type; public override void InitParam(JsonElement[] arg) { - _type = arg[0].GetInt32(); + _type = arg[0].GetBoolean(); } public override bool OnCheckUse() @@ -19,7 +21,7 @@ { return false; } - if (_type == 0) + if (_type) { return !Role.WeaponPack.ActiveItem.IsAmmoFull(); } diff --git a/DungeonShooting_Godot/src/game/buff/condition/Cond_Gold.cs b/DungeonShooting_Godot/src/game/buff/condition/Cond_Gold.cs index cf1776d..e012c4c 100644 --- a/DungeonShooting_Godot/src/game/buff/condition/Cond_Gold.cs +++ b/DungeonShooting_Godot/src/game/buff/condition/Cond_Gold.cs @@ -1,10 +1,12 @@ using System.Text.Json; -[ConditionFragment("Gold", - "判断金币数量, " + - "参数1为判断条件符号, 分别为: >, <, =, >=, <=; " + - "参数2为比较的值")] +[ConditionFragment( + "Gold", + "判断金币数量, ", + Arg1 = "(string)判断条件符号, 分别为: >, <, =, >=, <=", + Arg2 = "(int)比较的值" +)] public class Cond_Gold : ConditionFragment { private string _symbol; diff --git a/DungeonShooting_Godot/src/game/buff/condition/Cond_Hp.cs b/DungeonShooting_Godot/src/game/buff/condition/Cond_Hp.cs index e6f8e0d..fe93558 100644 --- a/DungeonShooting_Godot/src/game/buff/condition/Cond_Hp.cs +++ b/DungeonShooting_Godot/src/game/buff/condition/Cond_Hp.cs @@ -1,9 +1,11 @@ using System.Text.Json; -[ConditionFragment("Hp", - "判断血量, " + - "参数1为判断条件符号, 分别为: >, <, =, >=, <=; " + - "参数2为比较的值")] +[ConditionFragment( + "Hp", + "判断血量, ", + Arg1 = "(string)判断条件符号, 分别为: >, <, =, >=, <=", + Arg2 = "(int)比较的值" +)] public class Cond_Hp : ConditionFragment { private string _symbol; diff --git a/DungeonShooting_Godot/src/game/buff/condition/Cond_HpFull.cs b/DungeonShooting_Godot/src/game/buff/condition/Cond_HpFull.cs index e386c6e..851940e 100644 --- a/DungeonShooting_Godot/src/game/buff/condition/Cond_HpFull.cs +++ b/DungeonShooting_Godot/src/game/buff/condition/Cond_HpFull.cs @@ -1,21 +1,23 @@ using System.Text.Json; -[ConditionFragment("HpFull", - "判断满血状态, " + - "参数1可选值: 0:判断非满血, 1:判断满血")] +[ConditionFragment( + "HpFull", + "判断满血状态, ", + Arg1 = "(boolean)判断非满血" +)] public class Cond_HpFull : ConditionFragment { - private int _type; + private bool _type; public override void InitParam(JsonElement[] arg) { - _type = arg[0].GetInt32(); + _type = arg[0].GetBoolean(); } public override bool OnCheckUse() { - if (_type == 0) + if (_type) { return !Role.IsHpFull(); } diff --git a/DungeonShooting_Godot/src/game/buff/effect/Eff_AreaTrigger.cs b/DungeonShooting_Godot/src/game/buff/effect/Eff_AreaTrigger.cs index b27a136..f513dc4 100644 --- a/DungeonShooting_Godot/src/game/buff/effect/Eff_AreaTrigger.cs +++ b/DungeonShooting_Godot/src/game/buff/effect/Eff_AreaTrigger.cs @@ -3,9 +3,11 @@ using System.Text.Json; using Godot; -[EffectFragment("AreaTrigger", - "触发附近地上的武器开火, " + - "参数1为最大作用半径, ")] +[EffectFragment( + "AreaTrigger", + "触发附近地上的武器开火, ", + Arg1 = "(int)最大作用半径" +)] public class Eff_AreaTrigger : EffectFragment { private Prop5003Area _areaNode; diff --git a/DungeonShooting_Godot/src/game/buff/effect/Eff_ChangeHp.cs b/DungeonShooting_Godot/src/game/buff/effect/Eff_ChangeHp.cs index d61b6d9..13b84b1 100644 --- a/DungeonShooting_Godot/src/game/buff/effect/Eff_ChangeHp.cs +++ b/DungeonShooting_Godot/src/game/buff/effect/Eff_ChangeHp.cs @@ -1,7 +1,11 @@ using System.Text.Json; -[EffectFragment("ChangeHp", "修改血量, 参数1为血量变化的具体值")] +[EffectFragment( + "ChangeHp", + "修改血量", + Arg1 = "(int)血量变化的具体值" +)] public class Eff_ChangeHp : EffectFragment { private int _value; diff --git a/DungeonShooting_Godot/src/game/buff/effect/Eff_GetGold.cs b/DungeonShooting_Godot/src/game/buff/effect/Eff_GetGold.cs index 6ab2512..11bec51 100644 --- a/DungeonShooting_Godot/src/game/buff/effect/Eff_GetGold.cs +++ b/DungeonShooting_Godot/src/game/buff/effect/Eff_GetGold.cs @@ -3,7 +3,11 @@ using System.Text.Json; using Godot; -[EffectFragment("GetGold", "获得金币, 参数1为金币的值")] +[EffectFragment( + "GetGold", + "获得金币", + Arg1 = "(int)金币的值" +)] public class Eff_GetGold : EffectFragment { private int _value; diff --git a/DungeonShooting_Godot/src/game/buff/effect/Eff_PiggyBank.cs b/DungeonShooting_Godot/src/game/buff/effect/Eff_PiggyBank.cs index cf5c240..c7a7c37 100644 --- a/DungeonShooting_Godot/src/game/buff/effect/Eff_PiggyBank.cs +++ b/DungeonShooting_Godot/src/game/buff/effect/Eff_PiggyBank.cs @@ -2,7 +2,11 @@ using System.Text.Json; using Godot; -[EffectFragment("PiggyBank", "存钱罐, 使用后返还存入的金币, 参数1为返还金币的倍率(小数)")] +[EffectFragment( + "PiggyBank", + "存钱罐, 使用后返还存入的金币", + Arg1 = "(float)返还金币的倍率, 范围0-1" +)] public class Eff_PiggyBank : EffectFragment { private float _value; diff --git a/DungeonShooting_Godot/src/game/buff/effect/Eff_SwapWeapon.cs b/DungeonShooting_Godot/src/game/buff/effect/Eff_SwapWeapon.cs index 08da4c3..d2b95ae 100644 --- a/DungeonShooting_Godot/src/game/buff/effect/Eff_SwapWeapon.cs +++ b/DungeonShooting_Godot/src/game/buff/effect/Eff_SwapWeapon.cs @@ -1,7 +1,10 @@ using System.Collections.Generic; using System.Text.Json; -[EffectFragment("SwapWeapon", "随机选择房间内的一个手持武器的敌人, 交换你们手中的武器, 无参数")] +[EffectFragment( + "SwapWeapon", + "随机选择房间内的一个手持武器的敌人, 交换你们手中的武器" +)] public class Eff_SwapWeapon : EffectFragment { public override void InitParam(JsonElement[] args) diff --git a/DungeonShooting_Godot/src/game/buff/effect/Eff_TotalAmmo.cs b/DungeonShooting_Godot/src/game/buff/effect/Eff_TotalAmmo.cs index 6964de8..66671f7 100644 --- a/DungeonShooting_Godot/src/game/buff/effect/Eff_TotalAmmo.cs +++ b/DungeonShooting_Godot/src/game/buff/effect/Eff_TotalAmmo.cs @@ -1,9 +1,11 @@ using System.Text.Json; -[EffectFragment("TotalAmmo", - "修改武器总弹药量, " + - "参数1(选填)为弹药变化的具体值, 如果不传则表示补满弹药")] +[EffectFragment( + "TotalAmmo", + "修改武器总弹药量, ", + Arg1 = "(int|null)弹药变化的具体值, 如果不传则表示补满弹药" +)] public class Eff_TotalAmmo : EffectFragment { private bool _initParam = false; diff --git a/DungeonShooting_Godot/src/game/buff/effect/Eff_UseGold.cs b/DungeonShooting_Godot/src/game/buff/effect/Eff_UseGold.cs index 8226c3b..70eeda0 100644 --- a/DungeonShooting_Godot/src/game/buff/effect/Eff_UseGold.cs +++ b/DungeonShooting_Godot/src/game/buff/effect/Eff_UseGold.cs @@ -2,7 +2,11 @@ using System.Text.Json; -[EffectFragment("UseGold", "使用金币, 参数1为金币的值")] +[EffectFragment( + "UseGold", + "使用金币", + Arg1 = "(int)消耗金币的值" +)] public class Eff_UseGold : EffectFragment { private int _value; diff --git a/DungeonShooting_Godot/src/game/manager/PropFragmentRegister.cs b/DungeonShooting_Godot/src/game/manager/PropFragmentRegister.cs index f13989b..8dc20b3 100644 --- a/DungeonShooting_Godot/src/game/manager/PropFragmentRegister.cs +++ b/DungeonShooting_Godot/src/game/manager/PropFragmentRegister.cs @@ -47,14 +47,14 @@ var attribute = (BuffFragmentAttribute)type.GetCustomAttribute(typeof(BuffFragmentAttribute), false); if (attribute != null) { - if (BuffFragmentInfos.ContainsKey(attribute.BuffName)) + if (BuffFragmentInfos.ContainsKey(attribute.Name)) { - GD.PrintErr($"Buff '{attribute.BuffName}' 重名!"); + GD.PrintErr($"Buff '{attribute.Name}' 重名!"); continue; } - var buffInfo = new PropFragmentInfo(attribute.BuffName, attribute.Description, type); - BuffFragmentInfos.Add(attribute.BuffName, buffInfo); + var buffInfo = new PropFragmentInfo(attribute.Name, attribute.Description, type); + BuffFragmentInfos.Add(attribute.Name, buffInfo); } } //包含[ConditionAttribute]特性 @@ -65,14 +65,14 @@ var attribute = (ConditionFragmentAttribute)type.GetCustomAttribute(typeof(ConditionFragmentAttribute), false); if (attribute != null) { - if (ConditionFragmentInfos.ContainsKey(attribute.ConditionName)) + if (ConditionFragmentInfos.ContainsKey(attribute.Name)) { - GD.PrintErr($"Condition '{attribute.ConditionName}' 重名!"); + GD.PrintErr($"Condition '{attribute.Name}' 重名!"); continue; } - var conditionInfo = new PropFragmentInfo(attribute.ConditionName, attribute.Description, type); - ConditionFragmentInfos.Add(attribute.ConditionName, conditionInfo); + var conditionInfo = new PropFragmentInfo(attribute.Name, attribute.Description, type); + ConditionFragmentInfos.Add(attribute.Name, conditionInfo); } } //包含[EffectAttribute]特性 @@ -83,14 +83,14 @@ var attribute = (EffectFragmentAttribute)type.GetCustomAttribute(typeof(EffectFragmentAttribute), false); if (attribute != null) { - if (EffectFragmentInfos.ContainsKey(attribute.EffectName)) + if (EffectFragmentInfos.ContainsKey(attribute.Name)) { - GD.PrintErr($"Effect '{attribute.EffectName}' 重名!"); + GD.PrintErr($"Effect '{attribute.Name}' 重名!"); continue; } - var effectInfo = new PropFragmentInfo(attribute.EffectName, attribute.Description, type); - EffectFragmentInfos.Add(attribute.EffectName, effectInfo); + var effectInfo = new PropFragmentInfo(attribute.Name, attribute.Description, type); + EffectFragmentInfos.Add(attribute.Name, effectInfo); } } //包含[ChargeAttribute]特性 @@ -101,14 +101,14 @@ var attribute = (ChargeFragmentAttribute)type.GetCustomAttribute(typeof(ChargeFragmentAttribute), false); if (attribute != null) { - if (ChargeFragmentInfos.ContainsKey(attribute.ChargeName)) + if (ChargeFragmentInfos.ContainsKey(attribute.Name)) { - GD.PrintErr($"Charge '{attribute.ChargeName}' 重名!"); + GD.PrintErr($"Charge '{attribute.Name}' 重名!"); continue; } - var chargeInfo = new PropFragmentInfo(attribute.ChargeName, attribute.Description, type); - ChargeFragmentInfos.Add(attribute.ChargeName, chargeInfo); + var chargeInfo = new PropFragmentInfo(attribute.Name, attribute.Description, type); + ChargeFragmentInfos.Add(attribute.Name, chargeInfo); } } }