Skip to content

UnitCondition beta ​

Interface of @v12-engine/engine

ts
export interface UnitCondition

What an if asks of a unit, its caster or its target (EffectFields.caster, EffectFields.target): each part it says must hold. Or code (UnitConditionCheck)

Members ​

buff ​

ts
buff?: string;

It carries this buff

healthAbove ​

ts
healthAbove?: number;

Its health is at or over this share of its max (1: unhurt)

healthBelow ​

ts
healthBelow?: number;

Its health is under this share of its max (0.2: below 20%: an execute)

hero ​

ts
hero?: boolean;

It is a hero (true) or not (false)

is ​

ts
is?: 'enemy' | 'ally';

What it is to the caster: an enemy or an ally (the caster itself is one)

noBuff ​

ts
noBuff?: string;

It does not carry this buff

notTags ​

ts
notTags?: string[];

Its type has none of these tags: ['undead'] for the living

structure ​

ts
structure?: boolean;

It is a structure, a building (true), or not (false). { hero: false, structure: false } is a creep: any unit that is neither, a camp's, a lane's, a summon. What a passive that works in every kind of game names

tags ​

ts
tags?: string[];

Its type has one of these tags (UnitTypeDef.tags)