Class MultiTargetAttackData

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

One activation that hits several distinct targets at once, baked into MultiTargetAttackDef. Towers pick targets by their current priority; other actors pick the nearest first.

public sealed class MultiTargetAttackData
Inheritance
MultiTargetAttackData
Inherited Members

Constructors

MultiTargetAttackData()

public MultiTargetAttackData()

Fields

chance

Probability per activation; a failed roll still consumes the cooldown.

[Range(0, 1)]
public float chance

Field Value

float

color

Beam colour.

public Color color

Field Value

Color

damage

Independent hit for every chosen target.

public DamageData damage

Field Value

DamageData

healthBudget

The summed current health of the chosen targets cannot exceed this (zero = no budget; requires single-target damage).

[Min(0)]
public float healthBudget

Field Value

float

id

Event key (also selects the beam colour in the view).

public string id

Field Value

string

maxTargets

Maximum targets per activation.

[Min(1)]
public int maxTargets

Field Value

int

range

Targeting range.

[Min(0)]
public float range

Field Value

float

targets

Extra target eligibility.

public MechanicTargetData targets

Field Value

MechanicTargetData

targetsFlying

Allows flying targets.

public bool targetsFlying

Field Value

bool

targetsGround

Allows ground targets.

public bool targetsGround

Field Value

bool

vfx

Optional pooled VFX spawned on each target.

public GameObject vfx

Field Value

GameObject

Properties

Id

The resolved event key.

public string Id { get; }

Property Value

string

Methods

ToDef()

Bakes the multiple-target definition.

public MultiTargetAttackDef ToDef()

Returns

MultiTargetAttackDef