Class StatusEffectDef

Namespace
TDMaker.Core.Defs
Assembly
TDMaker.Core.dll

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

id string
duration float
rank int
family string
modifier StatModifierDef
periodic PeriodicDamageDef
stackEqualRank bool
replaceLowerRank bool
refreshEqualRank bool
requiredTags ulong
rejectedTags ulong
forbiddenIds string[]
forbiddenFamilies string[]
removeForbidden bool

Properties

Duration

Lifetime in game seconds.

public float Duration { get; }

Property Value

float

Family

Optional author-defined family used by immunity and suppression rules.

public string Family { get; }

Property Value

string

ForbiddenFamilies

Effect families forbidden while this binding is present.

public IReadOnlyList<string> ForbiddenFamilies { get; }

Property Value

IReadOnlyList<string>

ForbiddenIds

Definition identifiers forbidden while this binding is present.

public IReadOnlyList<string> ForbiddenIds { get; }

Property Value

IReadOnlyList<string>

Healing

Optional periodic restoration, independent of periodic damage.

public PeriodicHealingDef Healing { get; }

Property Value

PeriodicHealingDef

Id

Definition identity used for duplicate checks.

public string Id { get; }

Property Value

string

Modifier

Reversible changes.

public StatModifierDef Modifier { get; }

Property Value

StatModifierDef

Periodic

Optional periodic damage.

public PeriodicDamageDef Periodic { get; }

Property Value

PeriodicDamageDef

Rank

Relative rank for same-definition replacement.

public int Rank { get; }

Property Value

int

RefreshEqualRank

Refreshes lifetime without resetting periodic timing or reapplying modifiers.

public bool RefreshEqualRank { get; }

Property Value

bool

RejectedTags

No such eligibility bit may be present.

public ulong RejectedTags { get; }

Property Value

ulong

RemoveForbidden

Also removes matching existing bindings when attached.

public bool RemoveForbidden { get; }

Property Value

bool

ReplaceLowerRank

Replaces all lower-ranked instances of the same definition.

public bool ReplaceLowerRank { get; }

Property Value

bool

RequiredTags

All these eligibility bits must be present.

public ulong RequiredTags { get; }

Property Value

ulong

Shield

Optional per-binding shield.

public ShieldDef Shield { get; }

Property Value

ShieldDef

StackEqualRank

Allows separate instances at equal rank.

public bool StackEqualRank { get; }

Property Value

bool

Methods

WithHealing(PeriodicHealingDef)

Copies all attachment rules and adds a healing cadence.

public StatusEffectDef WithHealing(PeriodicHealingDef healing)

Parameters

healing PeriodicHealingDef

Returns

StatusEffectDef

WithShield(ShieldDef)

Copies all attachment rules and adds a shield.

public StatusEffectDef WithShield(ShieldDef shield)

Parameters

shield ShieldDef

Returns

StatusEffectDef