|
tModLoader v2023.01
A mod to make and play Terraria mods
|
Public Member Functions | |
| StatModifier (float additive, float multiplicative, float flat=0f, float @base=0f) | |
| float | ApplyTo (float baseValue) |
| StatModifier | CombineWith (StatModifier m) |
| override bool | Equals (object obj) |
| override int | GetHashCode () |
| StatModifier | Scale (float scale) |
Static Public Member Functions | |
| static bool | operator!= (StatModifier m1, StatModifier m2) |
| static StatModifier | operator* (float mul, StatModifier m) |
| static StatModifier | operator* (StatModifier m, float mul) |
| The multiply operator applies a multiplicative effect to the resulting multiplicative modifier. This effect is very rarely used, typical effects use the add operator. More... | |
| static StatModifier | operator+ (float add, StatModifier m) |
| static StatModifier | operator+ (StatModifier m, float add) |
| By using the add operator, the supplied additive modifier is combined with the existing modifiers. For example, adding 0.12f would be equivalent to a typical 12% damage boost. For 99% of effects used in the game, this approach is used. More... | |
| static StatModifier | operator- (StatModifier m, float sub) |
| By using the subtract operator, the supplied subtractive modifier is combined with the existing modifiers. For example, subtracting 0.12f would be equivalent to a typical 12% damage decrease. For 99% of effects used in the game, this approach is used. More... | |
| static StatModifier | operator/ (StatModifier m, float div) |
| static bool | operator== (StatModifier m1, StatModifier m2) |
Static Public Attributes | |
| static readonly StatModifier | Default = new StatModifier(1f, 1f, 0f, 0f) |
|
static |
The multiply operator applies a multiplicative effect to the resulting multiplicative modifier. This effect is very rarely used, typical effects use the add operator.
| m | |
| mul | The factor by which the multiplicative modifier is scaled |
|
static |
By using the add operator, the supplied additive modifier is combined with the existing modifiers. For example, adding 0.12f would be equivalent to a typical 12% damage boost. For 99% of effects used in the game, this approach is used.
| m | |
| add | The additive modifier to add, where 0.01f is equivalent to 1% |
|
static |
By using the subtract operator, the supplied subtractive modifier is combined with the existing modifiers. For example, subtracting 0.12f would be equivalent to a typical 12% damage decrease. For 99% of effects used in the game, this approach is used.
| m | |
| sub | The additive modifier to subtract, where 0.01f is equivalent to 1% |