private void ReduceStat(Stat stat, string resistance, float adjustment) { float resistValue = GetResistValue(resistance); var netAdjustment = adjustment + resistValue; if (netAdjustment < 0) stat.Adjust(netAdjustment); }
public void Constructor() { var stat = new Stat(100.0f); var effect = new BuffEffect("TestGoldBuff"); var buff = new Buff(stat, effect); Assert.AreEqual(stat, buff.Stat); Assert.AreEqual(effect, buff.Effect); Assert.AreEqual(0, buff.Elapsed); }
public void Properties() { var stat = new Stat(100.0f); const float Elapsed = 4.0f; var effect = new BuffEffect("TestGoldBuff"); var buff = new Buff(new Stat(0.0f), new BuffEffect("TestHpBuff")) { Stat = stat, Effect = effect, Elapsed = Elapsed }; Assert.AreEqual(stat, buff.Stat); Assert.AreEqual(effect, buff.Effect); Assert.AreEqual(Elapsed, buff.Elapsed); }
public void SetUp() { stat = new Stat(100.0f); }
private static void BoostStat(Stat stat, float adjustment) { stat.Adjust(adjustment); }