|
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) |
|
float StatModifier.ApplyTo |
( |
float |
baseValue | ) |
|
Use this to apply the modifiers of this StatModifier to the baseValue . You should assign the value passed in to the return result. For example:
damage = CritDamage.ApplyTo(damage)
could be used to apply a crit damage modifier to a base damage value
For help understanding the meanings of the applied values please make note of documentation for:
The order of operations of the modifiers are as follows:
-
The baseValue is added to Base
-
That result is multiplied by Additive
-
The previous result is then multiplied by Multiplicative
-
Finally, Flat as added to the result of all previous calculations
- Parameters
-
baseValue | The starting value to apply modifiers to |
- Returns
- The result of baseValue after all modifiers are applied