AgentTests ApplyBuff Method Delta Engine Documentation

Namespace: CreepyTowers.Tests
Assembly: CreepyTowers.Tests (in CreepyTowers.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void ApplyBuff()
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