Skip to content

TargetFacts beta ​

Interface of @v12-engine/engine

ts
export interface TargetFacts

What there is to know about a target, for whether an ability may be used on it

Members ​

hero ​

ts
hero: boolean;

Whether the target is a hero

invulnerable ​

ts
invulnerable: boolean;

Whether the target cannot be hurt: its type (UnitTypeDef.invulnerable) or a buff on it (BuffDef.invulnerable)

kind ​

ts
kind: EntityKind;

The target's entity kind, such as unit or structure

layer ​

ts
layer: Layer;

The layer the target is on (ground, air, water), which an ability's targets may name

relation ​

ts
relation: Relation;

What the target is to the caster: self, ally, enemy or neutral

spellImmune ​

ts
spellImmune?: boolean;

Immune to spells (see UnitTypeDef.spellImmune): no ability touches it but its own, and those that get through

tags ​

ts
tags?: readonly string[];

The tags of its type (UnitTypeDef.tags), for an ability that targets only some (targets.tags)

targetableBy ​

ts
targetableBy?: readonly string[];

The abilities that alone may target it (UnitTypeDef.targetableBy)

untargetable ​

ts
untargetable?: boolean;

A buff puts it out of everyone else's reach (BuffDef.untargetable): nothing but its own abilities is cast on it