public void UseConsumableItem_2()
{
IEffect insta = new InstantEffect(EffectTarget.Character, StatType.Health, -40f);
Assert.AreEqual(100f, hero.GetStat(StatType.Health).Value);
hero.AddEffect(insta);
IEffect restoreHealth = new TimeEffect(EffectTarget.Character, StatType.Health, +10f, 3, 1);
ConsumableItem potion = new ConsumableItem(99, "Health of Potion", "Get 40hp", restoreHealth);
Assert.AreEqual(60f, hero.GetStat(StatType.Health).Value);
hero.UseItem(potion); //+10hp/stack x3
Assert.AreEqual(70f, hero.GetStat(StatType.Health).Value);
hero.Update();
Assert.AreEqual(80f, hero.GetStat(StatType.Health).Value);
hero.Update();
Assert.AreEqual(90f, hero.GetStat(StatType.Health).Value);
hero.Update();
Assert.AreEqual(90f, hero.GetStat(StatType.Health).Value);
((TimeEffect)potion.Effect).Refill();
hero.UseItem(potion);
Assert.AreEqual(100f, hero.GetStat(StatType.Health).Value);
hero.Update();
Assert.AreEqual(100f, hero.GetStat(StatType.Health).Value);
hero.Update();
Assert.AreEqual(100f, hero.GetStat(StatType.Health).Value);
}