Class RangedAttackDef

Namespace
TDMaker.Core.Defs
Assembly
TDMaker.Core.dll

An independently timed ranged attack.

public sealed class RangedAttackDef
Inheritance
RangedAttackDef
Inherited Members

Constructors

RangedAttackDef(float, float, DamageDef, ProjectileDef, bool, bool, float)

Creates ranged attack data.

public RangedAttackDef(float range, float cooldown, DamageDef damage, ProjectileDef projectile, bool targetsFlying = true, bool targetsGround = true, float minimumRange = 0)

Parameters

range float
cooldown float
damage DamageDef
projectile ProjectileDef
targetsFlying bool
targetsGround bool
minimumRange float

Properties

Cooldown

Seconds between attacks.

public float Cooldown { get; }

Property Value

float

Cycle

Projectile release timing within one attack cycle.

public AttackCycleDef Cycle { get; }

Property Value

AttackCycleDef

Damage

Attack damage.

public DamageDef Damage { get; }

Property Value

DamageDef

IgnoreFlyingMinimumRange

Optional friendly-search policy bypassing only the inner range check for flying recipients. Maximum range and flight permission still apply.

public bool IgnoreFlyingMinimumRange { get; }

Property Value

bool

MinimumRange

Inner exclusion radius, including its boundary when positive. Zero allows the center.

public float MinimumRange { get; }

Property Value

float

Projectile

Projectile travel settings.

public ProjectileDef Projectile { get; }

Property Value

ProjectileDef

Range

Attack range in horizontally measured world units.

public float Range { get; }

Property Value

float

TargetsFlying

Whether this attack can target flying enemies.

public bool TargetsFlying { get; }

Property Value

bool

TargetsGround

Whether this attack can target ground enemies.

public bool TargetsGround { get; }

Property Value

bool

Methods

WithCycle(AttackCycleDef)

Copies a ranged attack with explicit multi-release timing.

public RangedAttackDef WithCycle(AttackCycleDef cycle)

Parameters

cycle AttackCycleDef

Returns

RangedAttackDef

WithFlyingMinimumRangeBypass(bool)

Copies the attack with an explicitly authored flying minimum-range exception.

public RangedAttackDef WithFlyingMinimumRangeBypass(bool enabled = true)

Parameters

enabled bool

Returns

RangedAttackDef