using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VoidwalkerEngine.Framework.Logic;
using VoidwalkerEngine.Framework.Maths;
using VoidwalkerEngine.Framework.Systems.GameProperties;
namespace VoidwalkerEngine.Framework.Systems.Enchanting
{
public class Enchantment
{
public string Identifier { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Family { get; set; }
public Range LevelBracket { get; set; }
public int Frequency { get; set; }
public bool IsLearnable { get; set; }
public bool IsRemovable { get; set; }
public bool IsSpawnable { get; set; }
///
/// The Sorting Priority of this enchantment.
///
public EnchantmentPriority Priority { get; set; }
public List Constraints { get; set; }
public List Properties { get; set; }
public Enchantment()
{
this.Constraints = new List();
this.Properties = new List();
}
public Enchantment MakeCopy()
{
Enchantment copy = new Enchantment();
copy.Copy(this);
return copy;
}
public void Copy(Enchantment other)
{
this.Identifier = other.Identifier;
this.Name = other.Name;
this.Description = other.Description;
this.LevelBracket = other.LevelBracket;
this.Frequency = other.Frequency;
this.IsLearnable = other.IsLearnable;
this.IsSpawnable = other.IsSpawnable;
this.Priority = other.Priority;
this.IsRemovable = other.IsRemovable;
this.Constraints = other.Constraints.ToList();
this.Properties ??= new List();
this.Properties.Clear();
foreach (GameProperty effect in other.Properties)
{
this.Properties.Add(effect.MakeCopy());
}
}
}
}