Class AreaEffectData

Namespace
TDMaker.Unity.Authoring
Assembly
TDMaker.Unity.dll

A timed region that attaches an effect to occupants and/or pulses damage or healing, baked into AreaEffectDef. Leave effect empty and enable pulse for a pulse-only region.

public sealed class AreaEffectData
Inheritance
AreaEffectData
Inherited Members

Constructors

AreaEffectData()

public AreaEffectData()

Fields

duration

Region lifetime (ignored when untilSourceLost is on).

[Min(0.01)]
public float duration

Field Value

float

effect

Effect attached to each eligible occupant.

public StatusEffectAsset effect

Field Value

StatusEffectAsset

enabled

Whether the region is emitted.

public bool enabled

Field Value

bool

followSource

Follows its source while the source exists.

public bool followSource

Field Value

bool

includeTowers

Also affects friendly towers when targeting friendly units (attached effects only).

public bool includeTowers

Field Value

bool

interval

Seconds between occupancy scans.

[Min(0.01)]
public float interval

Field Value

float

maxTargets

Recipients per scan; zero is unlimited.

[Min(0)]
public int maxTargets

Field Value

int

pulse

Optional direct damage/healing pulse on every occupant at each scan.

public AreaPulseData pulse

Field Value

AreaPulseData

radius

Region radius (range ellipse).

[Min(0)]
public float radius

Field Value

float

removeOnEnd

Removes the attached effects when the region ends.

public bool removeOnEnd

Field Value

bool

targetsEnemies

Targets enemies (otherwise friendly units).

public bool targetsEnemies

Field Value

bool

targetsFlying

Allows flying recipients.

public bool targetsFlying

Field Value

bool

targetsGround

Allows ground recipients.

public bool targetsGround

Field Value

bool

untilSourceLost

Permanent region: no timed expiry, it lasts while its source is alive and is removed (with the effects it attached) when the source dies or is removed. Meant for auras; emitting it without a living source (spell, impact) emits nothing.

[Tooltip("Permanent aura: lasts while the source lives, then removes itself and the effects it attached. Needs a living source (not for spells or impacts).")]
public bool untilSourceLost

Field Value

bool

Properties

IsValid

Whether the data can be baked.

public bool IsValid { get; }

Property Value

bool

Methods

ToDef()

Bakes the region, or null when disabled.

public AreaEffectDef ToDef()

Returns

AreaEffectDef