Class RaiseRemainsData

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

Raises new units from the bodies the fallen leave behind, baked into a RaiseRemainsDef. Each activation reserves the closest eligible bodies (ties by body order), casts for castDelay, then consumes each body and creates unit there (an enemy continues the body's path; a soldier fights for the player). A moved, stunned or dead caster releases its reservations. Bodies decay after the runner's Remains Lifetime. Use it as an ability action (useRaise).

public sealed class RaiseRemainsData
Inheritance
RaiseRemainsData
Inherited Members

Constructors

RaiseRemainsData()

public RaiseRemainsData()

Fields

bodies

Which side's bodies are eligible (independent of the result's side).

[Tooltip("Whose bodies are eligible. Hostile results need a body that was on a path (an enemy body).")]
public RemainsFaction bodies

Field Value

RemainsFaction

castDelay

Seconds between reserving and raising.

[Tooltip("Seconds of casting between reserving a body and raising it.")]
[Min(0)]
public float castDelay

Field Value

float

chainBudget

Raises the lineage may still make when the body has no budget yet.

[Tooltip("Raises a body's lineage may make (1 = a raised unit's own body cannot be raised again).")]
[Min(0)]
public int chainBudget

Field Value

int

color

Cast line and rise glow colour.

public Color color

Field Value

Color

fromEnemies

Bodies of enemies are eligible.

public bool fromEnemies

Field Value

bool

fromHeroes

Bodies of heroes are eligible.

public bool fromHeroes

Field Value

bool

fromSoldiers

Bodies of soldiers are eligible.

public bool fromSoldiers

Field Value

bool

id

Event key (cast colour and keyed audio cue).

[Tooltip("Event key (cast colour and keyed audio cue).")]
public string id

Field Value

string

invulnerableWhileRising

The raised unit ignores damage while rising.

public bool invulnerableWhileRising

Field Value

bool

maxCount

Bodies raised per activation.

[Min(1)]
public int maxCount

Field Value

int

maximumAge

Maximum body age in seconds (0 = until it decays).

[Tooltip("Maximum body age in seconds (0 = until the body decays).")]
[Min(0)]
public float maximumAge

Field Value

float

minimumAge

Minimum body age in seconds.

[Min(0)]
public float minimumAge

Field Value

float

populationLimit

Raised units of this caster alive or being raised at once (0 = no limit).

[Tooltip("Raised units of this caster alive or being raised at once (0 = no limit).")]
[Min(0)]
public int populationLimit

Field Value

int

range

Body search radius around the caster (range ellipse).

[Tooltip("Body search radius around the caster (range ellipse).")]
[Min(0)]
public float range

Field Value

float

requiredTags

All these tag bits must be on the body (the dead unit's tags).

[Tooltip("All these tag bits must be on the dead unit.")]
public int requiredTags

Field Value

int

reservationTimeout

Reservation time-out (0 = cast delay + 1 s); must exceed the cast delay.

[Tooltip("Reservation time-out; 0 uses the cast delay plus one second. Must be longer than the cast delay.")]
[Min(0)]
public float reservationTimeout

Field Value

float

riseDuration

Seconds the raised unit rises before it acts.

[Tooltip("Seconds the raised unit rises before it moves and attacks.")]
[Min(0)]
public float riseDuration

Field Value

float

skipExecuted

Skips bodies of executed units.

public bool skipExecuted

Field Value

bool

skipSuppressedDeaths

Skips bodies of units killed by hits that suppress death releases.

[Tooltip("Skips bodies of units killed by hits that suppress death releases.")]
public bool skipSuppressedDeaths

Field Value

bool

unit

Unit created from each body: an EnemyAsset (hostile) or a SoldierAsset (friendly).

[Tooltip("Unit created from each body: an Enemy (hostile, continues the body's path) or a Soldier (fights for the player). The body's own stats are not copied.")]
public EntityAssetBase unit

Field Value

EntityAssetBase

untargetableWhileRising

The raised unit cannot be picked by attacks while rising.

public bool untargetableWhileRising

Field Value

bool

vfx

Optional pooled VFX spawned where a body is raised.

public GameObject vfx

Field Value

GameObject

Properties

Id

The resolved event key.

public string Id { get; }

Property Value

string

IsValid

Whether the data can be baked.

public bool IsValid { get; }

Property Value

bool

KindMask

Entity kinds bit mask (bit per EntityKind).

public ulong KindMask { get; }

Property Value

ulong

Methods

ToDef()

Bakes the raise action, or null when no valid unit is assigned.

public RaiseRemainsDef ToDef()

Returns

RaiseRemainsDef