Namespace: CreepyTowers
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Tests: CreepyTowers.Tests.AgentTests
4 unit tests call CreepyTowers.Agent.ApplyBuff(CreepyTowers.Stats.BuffEffect)
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- effect
- Type: CreepyTowers.Stats BuffEffect
Remarks
Examples
[Test] public void ApplyBuff() { creep.ApplyBuff(new BuffEffect("TestHpBuff")); Assert.AreEqual(304.0, creep.GetStatValue("Hp")); Assert.AreEqual(100.0, creep.GetStatBaseValue("Hp")); Assert.AreEqual(1.0, creep.GetStatPercentage("Hp")); }
[Test] public void ReceiveBuffOnAttributeItDoesNotHave() { Assert.DoesNotThrow(() => creep.ApplyBuff(new BuffEffect("DragonRangeMultiplier"))); }
[Test, CloseAfterFirstFrame, Ignore] public void NotElapsedBuffDoesNotExpire() { creep.ApplyBuff(new BuffEffect("TestGoldBuff")); AdvanceTimeAndUpdateEntities(1.0f); Assert.AreEqual(23.0f, creep.GetStatValue("Gold")); }
See Also