public void TestInitialize()
        {
            //Attribute werden nicht getestet, dazu exestieren andere Klasen
            var attributedic = Generator.GenerateCharakterAttributDictionary();

            Attribute = new CharakterAttribute(attributedic.Keys.ToList());
            foreach (var item in attributedic.Keys)
            {
                Attribute.SetAttributAKTValue(item, attributedic[item], out Error error);
                Assert.AreEqual(error, null);
            }
            Value = GenerateValue();
        }
        public void BasisAttributAKTTest()
        {
            var value = 5;
            var list  = new List <CharakterAttribut> {
                CharakterAttribut.Charisma, CharakterAttribut.Fingerfertigkeit, CharakterAttribut.Gewandheit
            };
            CharakterAttribute attribute = new CharakterAttribute(list);

            attribute.SetAttributAKTValue(CharakterAttribut.Charisma, value, out Error error);
            ErrorHelper.ExpectErrorNull(error);

            var x = attribute.GetAttributAKTValue(CharakterAttribut.Charisma, out error);

            ErrorHelper.ExpectErrorNull(error);

            Assert.AreEqual(value, x);
        }
        public void RandomGeneratetTest()
        {
            var dic       = Generator.GenerateCharakterAttributDictionary();
            var attribute = new CharakterAttribute(dic.Keys.ToList());

            foreach (var key in dic.Keys)
            {
                attribute.SetAttributAKTValue(key, dic[key], out Error error);
                ErrorHelper.ExpectErrorNull(error);
            }

            foreach (var key in dic.Keys)
            {
                var x = attribute.GetAttributAKTValue(key, out Error error);

                ErrorHelper.ExpectErrorNull(error);
                Assert.AreEqual(dic[key], x);
            }
        }
Example #4
0
        public AbstractAttributeResources(CharakterAttribute attribute)
        {
            if (attribute == null)
            {
                throw new ArgumentNullException(nameof(attribute));
            }

            Attribute             = attribute;
            Value                 = (int)Math.Ceiling(Calculate());
            Attribute.ChangedMAX += (object sender, CharakterAttribut args) =>
            {
                var oldValue   = Value;
                var calculateV = Calculate();
                Value = (int)Math.Ceiling(calculateV);;
                if (Value != oldValue)
                {
                    ValueChanged?.Invoke(this, null);
                }
            };
        }
Example #5
0
 public WoundSwell(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #6
0
 public KarmaEnergyNeutral(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #7
0
 public BaseAttack(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #8
0
 public BaseRange(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #9
0
 public Vitality(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #10
0
 public Endurance(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #11
0
 public AstralEnergy(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #12
0
 public BaseParade(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #13
0
 public MagicResistance(CharakterAttribute attribute) : base(attribute)
 {
 }
Example #14
0
 public BaseInitiative(CharakterAttribute attribute) : base(attribute)
 {
 }