38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Game
|
|
{
|
|
public interface IEquipment
|
|
{
|
|
string Name { get; }
|
|
string Description { get; }
|
|
EquipmentType Type { get; }
|
|
List<StatModifier> Stats { get; }
|
|
List<Effect> Effects { get; }
|
|
}
|
|
|
|
public class Equipment : IEquipment
|
|
{
|
|
private string _name;
|
|
private string _description;
|
|
private EquipmentType _type;
|
|
private List<StatModifier> _stats;
|
|
private List<Effect> _effects;
|
|
|
|
public string Name => _name; // 装备名称
|
|
public string Description => _description; // 装备描述
|
|
public EquipmentType Type => _type; // 装备类型(基础装备、合成装备)
|
|
public List<StatModifier> Stats => _stats; // 装备的属性加成(攻击力、生命值等)
|
|
public List<Effect> Effects => _effects; // 装备附带的技能效果
|
|
|
|
public Equipment(string name, string description, EquipmentType type, List<StatModifier> stats,
|
|
List<Effect> effects)
|
|
{
|
|
_name = name;
|
|
_description = description;
|
|
_type = type;
|
|
_stats = stats;
|
|
_effects = effects;
|
|
}
|
|
}
|
|
} |