Class EffectService

Namespace
TDMaker.Core.Effects
Assembly
TDMaker.Core.dll

Fixed-capacity attachment and region lifecycle, including same-tick pending duplicate checks.

public sealed class EffectService
Inheritance
EffectService
Inherited Members

Properties

Areas

Live region records in emission order.

public IReadOnlyList<AreaBinding> Areas { get; }

Property Value

IReadOnlyList<AreaBinding>

Bindings

Accepted effects in attachment order, including pending and removal-marked entries.

public IReadOnlyList<EffectBinding> Bindings { get; }

Property Value

IReadOnlyList<EffectBinding>

Methods

DispelTarget(int)

Queues all bindings on a target for stable-order removal.

public void DispelTarget(int targetId)

Parameters

targetId int

EmitArea(AreaEffectDef, Vec2, int)

Emits a region, returning zero when its fixed pool is exhausted or a required living source is unavailable.

public long EmitArea(AreaEffectDef definition, Vec2 position, int sourceId = 0)

Parameters

definition AreaEffectDef
position Vec2
sourceId int

Returns

long

Remove(long)

Queues removal by identifier; numeric modifiers are restored once.

public bool Remove(long bindingId)

Parameters

bindingId long

Returns

bool

TryAttach(StatusEffectDef, int, int)

Validates and queues an attachment. A refresh succeeds without creating another binding.

public bool TryAttach(StatusEffectDef definition, int sourceId, int targetId)

Parameters

definition StatusEffectDef
sourceId int
targetId int

Returns

bool