Table of Contents

Interface IEffectTarget<TTarget>

Namespace
AshesOfVelsingrad.Systems
Assembly
Ashes of Velsingrad.dll

Represents any entity that can receive and manage StatusEffect<TTarget>s.

public interface IEffectTarget<TTarget>

Type Parameters

TTarget

The concrete type of the target, such as UnitSystem or MapSystem.

Remarks

Implementing this interface allows an object to have status effects applied, removed, queried, and iterated over. It is used by StatusEffectSystem to manage effects for multiple types of targets in a generic way.

Methods

ApplyEffect(StatusEffect<TTarget>)

Applies a status effect to this target.

void ApplyEffect(StatusEffect<TTarget> statusEffect)

Parameters

statusEffect StatusEffect<TTarget>

The StatusEffect<TTarget> instance to apply.

GetActiveEffects()

Retrieves all status effects currently active on this target.

List<StatusEffect<TTarget>> GetActiveEffects()

Returns

List<StatusEffect<TTarget>>

A list of StatusEffect<TTarget> representing all active effects.

HasEffect<T>()

Checks whether this target currently has an active status effect of the specified type.

bool HasEffect<T>() where T : StatusEffect<TTarget>

Returns

bool

true if the effect is present on this target; otherwise, false.

Type Parameters

T

The type of StatusEffect<TTarget> to check for.

RemoveEffect(StatusEffect<TTarget>)

Removes a status effect from this target.

void RemoveEffect(StatusEffect<TTarget> statusEffect)

Parameters

statusEffect StatusEffect<TTarget>

The StatusEffect<TTarget> instance to remove.