EffectDefinitionApplication
A class in Root.Township, Alta.Alchemy.
An effect with a strength multiplier and optional duration, as carried by liquids, food and potions. Applies at once or spread over time.
- Listed in Stats, effects, heat and liquid
- Inherits or implements
IEffectDefinition - Documented in Effects
Constructors
| Member | What it is |
|---|---|
EffectDefinitionApplication(EffectDefinition effectToModify, float strengthMultiplier, int durationInSeconds = 0) | Creates an EffectDefinitionApplication with default values. |
EffectDefinitionApplication() | Creates an EffectDefinitionApplication with default values. |
Fields
3 private and internal fields
| Member | What it is |
|---|---|
private int durationInSeconds | Seconds to spread the effect over. 0 applies it at once. Not included in Serialize, so it is not synced. |
private EffectDefinition effectToModify | Backing field for EffectToModify, the effect this entry applies. |
private float strengthMultiplier | Backing field for StrengthMultiplier. Multiplies the strength passed to the effect. 1 by default. |
Properties
| Member | What it is |
|---|---|
EffectDefinition EffectToModify { get; } | The effect definition this applies. |
float StrengthMultiplier { get; set; } | Multiplier on the strength passed in. Settable. |
Methods
| Member | What it is |
|---|---|
virtual void CheckApply(EffectHandler target, float strength) | Applies the effect now, or over its duration in seconds when that is above 0. |
EffectDefinitionApplication Copy() | Returns a copy. |
override bool Equals(object obj) | True when effect, multiplier and duration all match. |
override int GetHashCode() | Hash from effect, multiplier and duration. |
void Serialize(Stream stream) | Writes or reads the effect and multiplier. The duration is not sent. |
protected void Apply(EffectHandler target, float strength) | Applies the effect to a handler at the given strength times the multiplier. |
Used in
Members of other types that take, return or hold a EffectDefinitionApplication:
CookableItem.effects, CookableItem.Effects, CookingGarnish.effectMultipliers, CookingGarnish.EffectMultipliers, CookingSettings.globalStewEffects, CookingSettings.GlobalStewEffects, StewManager.GetStewEffects, StewRecipe.CheckForDuplicates, StewRecipe.effectModifiers, StewRecipe.EffectModifiers, StewRecipe.extraEffects, StewRecipe.ExtraEffects, StewRecipe.GetStewEffects, StewRecipe.HandleEffectApplication, LiquidData.effects, LiquidData.Effects, LiquidData.LiquidData, ConsumptionManager.AreValidEffects, ConsumptionManager.HandleConsumptionEffects, EdibleObject.consumptionEffects, EdibleObject.ConsumptionEffects.