StatAdjustment StructureDelta Engine Documentation
This holds which stat is to be adjusted, how much to adjust by, and which stat is used to resist the adjustment. View code on GitHub

Namespace: CreepyTowers.Stats
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public struct StatAdjustment

The StatAdjustment type exposes the following members.

Constructors

  NameDescription
Public methodStatAdjustment(String)
Initializes a new instance of the StatAdjustment class
Public methodStatAdjustment(String, String, Single)
Initializes a new instance of the StatAdjustment class
Top
Properties

  NameDescription
Public propertyAdjustment
Public propertyAttribute
Public propertyResist
Top
Remarks

Tests: CreepyTowers.Tests.Stats.StatAdjustmentTests
Examples

2 unit tests call CreepyTowers.Stats.StatAdjustment
[Test]
public void Constructor()
{
    var effect = new StatAdjustment("Hp", "Armor", -50);
    Assert.AreEqual("Hp", effect.Attribute);
    Assert.AreEqual("Armor", effect.Resist);
    Assert.AreEqual(-50.0f, effect.Adjustment);
}
[Test]
public void ConstructedFromXml()
{
    var effect = new StatAdjustment("TestAdjustment");
    Assert.AreEqual("Hp", effect.Attribute);
    Assert.AreEqual("", effect.Resist);
    Assert.AreEqual(-100.0f, effect.Adjustment);
}
See Also