TargetFacts beta
Interface of @v12-engine/engine
export interface TargetFactsWhat there is to know about a target, for whether an ability may be used on it
Members
hero
hero: boolean;Whether the target is a hero
invulnerable
invulnerable: boolean;Whether the target cannot be hurt: its type (UnitTypeDef.invulnerable) or a buff on it (BuffDef.invulnerable)
kind
kind: EntityKind;The target's entity kind, such as unit or structure
layer
layer: Layer;The layer the target is on (ground, air, water), which an ability's targets may name
relation
relation: Relation;What the target is to the caster: self, ally, enemy or neutral
spellImmune
spellImmune?: boolean;Immune to spells (see UnitTypeDef.spellImmune): no ability touches it but its own, and those that get through
tags
tags?: readonly string[];The tags of its type (UnitTypeDef.tags), for an ability that targets only some (targets.tags)
targetableBy
targetableBy?: readonly string[];The abilities that alone may target it (UnitTypeDef.targetableBy)
untargetable
untargetable?: boolean;A buff puts it out of everyone else's reach (BuffDef.untargetable): nothing but its own abilities is cast on it