Example #1
0
		private void ReduceStat(Stat stat, string resistance, float adjustment)
		{
			float resistValue = GetResistValue(resistance);
			var netAdjustment = adjustment + resistValue;
			if (netAdjustment < 0)
				stat.Adjust(netAdjustment);
		}
Example #2
0
		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);
		}
Example #3
0
		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);
		}
Example #4
0
		public void SetUp()
		{
			stat = new Stat(100.0f);
		}
Example #5
0
		private static void BoostStat(Stat stat, float adjustment)
		{
			stat.Adjust(adjustment);
		}