Пример #1
0
        public void LevelTestStatIncrease()
        {
            MockEntity ent      = new MockEntity(Engine);
            double     expected = ent.GetProperty("STR").Value + 1;

            Assert.AreEqual(false, ent.AssignAttributePoint("STR"));

            ent.AddExp(StartExp);
            Assert.AreEqual(1, ent.AttributePoints);
            Assert.AreEqual(true, ent.AssignAttributePoint("STR"));
            Assert.AreEqual(expected, ent.GetProperty("STR").Value);
        }
Пример #2
0
        public void LevelTestStatIncreaseAffectsResource()
        {
            string           stat        = "VIT";
            MockEntity       ent         = new MockEntity(Engine);
            double           expected    = ent.GetProperty(stat).Value + 1;
            ResourceInstance hp          = ((ResourceInstance)ent.GetProperty(Entity.HP_KEY));
            double           expectedRes = hp.MaxAmount + 20;

            ent.AddExp(StartExp);
            ent.AssignAttributePoint(stat);
            Assert.AreEqual(expected, ent.GetProperty(stat).Value);
            Assert.AreEqual(expectedRes, hp.MaxAmount);
        }