Class StatusEffectDef
Definition-key based attachment, conflict, and lifetime rules.
public sealed class StatusEffectDef
- Inheritance
-
StatusEffectDef
- Inherited Members
Constructors
StatusEffectDef(string, float, int, string, StatModifierDef, PeriodicDamageDef, bool, bool, bool, ulong, ulong, string[], string[], bool)
Creates an immutable attached-effect definition.
public StatusEffectDef(string id, float duration, int rank = 0, string family = null, StatModifierDef modifier = null, PeriodicDamageDef periodic = null, bool stackEqualRank = false, bool replaceLowerRank = true, bool refreshEqualRank = true, ulong requiredTags = 0, ulong rejectedTags = 0, string[] forbiddenIds = null, string[] forbiddenFamilies = null, bool removeForbidden = false)
Parameters
idstringdurationfloatrankintfamilystringmodifierStatModifierDefperiodicPeriodicDamageDefstackEqualRankboolreplaceLowerRankboolrefreshEqualRankboolrequiredTagsulongrejectedTagsulongforbiddenIdsstring[]forbiddenFamiliesstring[]removeForbiddenbool
Properties
Duration
Lifetime in game seconds.
public float Duration { get; }
Property Value
Family
Optional author-defined family used by immunity and suppression rules.
public string Family { get; }
Property Value
ForbiddenFamilies
Effect families forbidden while this binding is present.
public IReadOnlyList<string> ForbiddenFamilies { get; }
Property Value
ForbiddenIds
Definition identifiers forbidden while this binding is present.
public IReadOnlyList<string> ForbiddenIds { get; }
Property Value
Healing
Optional periodic restoration, independent of periodic damage.
public PeriodicHealingDef Healing { get; }
Property Value
Id
Definition identity used for duplicate checks.
public string Id { get; }
Property Value
Modifier
Reversible changes.
public StatModifierDef Modifier { get; }
Property Value
Periodic
Optional periodic damage.
public PeriodicDamageDef Periodic { get; }
Property Value
Rank
Relative rank for same-definition replacement.
public int Rank { get; }
Property Value
RefreshEqualRank
Refreshes lifetime without resetting periodic timing or reapplying modifiers.
public bool RefreshEqualRank { get; }
Property Value
RejectedTags
No such eligibility bit may be present.
public ulong RejectedTags { get; }
Property Value
RemoveForbidden
Also removes matching existing bindings when attached.
public bool RemoveForbidden { get; }
Property Value
ReplaceLowerRank
Replaces all lower-ranked instances of the same definition.
public bool ReplaceLowerRank { get; }
Property Value
RequiredTags
All these eligibility bits must be present.
public ulong RequiredTags { get; }
Property Value
Shield
Optional per-binding shield.
public ShieldDef Shield { get; }
Property Value
StackEqualRank
Allows separate instances at equal rank.
public bool StackEqualRank { get; }
Property Value
Methods
WithHealing(PeriodicHealingDef)
Copies all attachment rules and adds a healing cadence.
public StatusEffectDef WithHealing(PeriodicHealingDef healing)
Parameters
healingPeriodicHealingDef
Returns
WithShield(ShieldDef)
Copies all attachment rules and adds a shield.
public StatusEffectDef WithShield(ShieldDef shield)
Parameters
shieldShieldDef