Class UpgradeEffectData

Namespace
TDMaker.Unity.Campaign
Assembly
TDMaker.Unity.dll

One effect of an upgrade rank. Maps one to one to a core UpgradeEffectDef.

public sealed class UpgradeEffectData
Inheritance
UpgradeEffectData
Inherited Members

Constructors

UpgradeEffectData()

public UpgradeEffectData()

Fields

field

Changed number (Stat only).

[Tooltip("The number to change (Stat effects). Every matching value inside the selected templates is changed (all attacks, ability ranks ...).")]
public UpgradeField field

Field Value

UpgradeField

kind

What the effect does.

public UpgradeEffectKind kind

Field Value

UpgradeEffectKind

mechanic

The added behavior action (AddMechanic only): the same timed action the unit and tower behavior lists use.

public AbilityActionData mechanic

Field Value

AbilityActionData

mechanicKey

Text key stem of mechanicName (blank: no translation lookup).

public string mechanicKey

Field Value

string

mechanicName

English name of the added mechanic shown in the shop (AddMechanic only; translated through shop.mechanic.<name key>).

[Tooltip("Name of the added mechanic in the shop tooltip (AddMechanic). Translate it with the key shop.mechanic.<Mechanic Key>.")]
public string mechanicName

Field Value

string

operation

Arithmetic (Stat only). Each effect is applied on its own, in order; rounding happens per effect.

[Tooltip("Multiply Ceil rounds up right after multiplying (use it for damage and health). Multiply keeps fractions (ranges, cooldowns). Add / Subtract / Set change the current value. Effects apply one after another, in order.")]
public UpgradeOperation operation

Field Value

UpgradeOperation

swapFrom

Replaced unit (SwapTemplate only).

[Tooltip("Unit reference to replace (SwapTemplate), for example the soldier a spell or a barracks calls.")]
public EntityAssetBase swapFrom

Field Value

EntityAssetBase

swapTo

Replacement unit (SwapTemplate only). It is added to the battle's templates automatically.

[Tooltip("Replacement unit (SwapTemplate). It is registered for the battle automatically.")]
public EntityAssetBase swapTo

Field Value

EntityAssetBase

target

Which templates or spells it changes.

public UpgradeTargetData target

Field Value

UpgradeTargetData

value

Operand (Stat only): the factor for the multiply operations, the amount otherwise.

[Tooltip("Factor for Multiply / Multiply Ceil (1.1 = +10%), amount for Add / Subtract / Set. Defenses are fractions (0.1 = 10%).")]
public float value

Field Value

float

Methods

ToDef()

Bakes the core effect.

public UpgradeEffectDef ToDef()

Returns

UpgradeEffectDef