Class ReviveData

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

Same-unit return on the spot, baked into a ReviveDef (template custom data): a killed unit lies down, then gets returnShare of its health back, rises and walks on with the same identity. Its bounty is paid once, on the first death. Pending returns hold victory.

public sealed class ReviveData
Inheritance
ReviveData
Inherited Members

Constructors

ReviveData()

public ReviveData()

Fields

clearEffects

Removes its status effects when it falls.

[Tooltip("Removes its status effects when it falls (off: they keep running out while it lies down).")]
public bool clearEffects

Field Value

bool

downDelay

Seconds spent lying down (no combat, no movement).

[Tooltip("Seconds lying down before health returns (no movement, no combat).")]
[Min(0)]
public float downDelay

Field Value

float

enabled

Whether the unit returns.

public bool enabled

Field Value

bool

invulnerableWhileRising

Ignores damage while rising.

[Tooltip("Ignores damage while rising.")]
public bool invulnerableWhileRising

Field Value

bool

returnShare

Share of maximum health restored.

[Tooltip("Share of maximum health restored when it rises (above 0).")]
[Range(0.01, 1)]
public float returnShare

Field Value

float

returns

Returns over the unit's lifetime; the next death after the last one is final.

[Tooltip("Returns over the unit's lifetime; the death after the last one is final.")]
[Min(0)]
public int returns

Field Value

int

riseDuration

Seconds of rising after health returns, before it acts again.

[Tooltip("Seconds of rising after health returns, before it moves and attacks again.")]
[Min(0)]
public float riseDuration

Field Value

float

untargetableWhileRising

Cannot be picked by attacks while rising (independent of damage immunity).

[Tooltip("Cannot be picked as a target while rising (independent of the damage immunity).")]
public bool untargetableWhileRising

Field Value

bool

Properties

IsValid

Whether the data bakes to a return.

public bool IsValid { get; }

Property Value

bool

Methods

ToDef()

Bakes the return policy, or null when disabled.

public ReviveDef ToDef()

Returns

ReviveDef