Reference › Condition browser › Combat

Hostile

Classic EraTBC AnniversaryClassic progressionForeverRetail
  • Not available on that edition (the reason is in the tooltip)
  • Depends on the setting, your class or another addon (details in the tooltip)

What it does

Checks if the unit specified is an enemy of yours, as the game reports it.

Why you might use it

Check that a unit is hostile to you before suggesting an attack on it, or that it is not before suggesting a heal or buff. It is handy for spells that work both ways, such as a Paladin's Holy Shock (damage on an enemy, a heal on a friend), and for mouseover rotations that should only offer damage spells on hostile mouseover targets. Works on every edition, and the game never hides it. See also Is Friendly and Attackable.

Example

your target is an enemy

Settings

What each setting in the condition editor means, from the game's own help.

Unit - The unit this condition uses as the target of comparison.

Helpers its code uses

Identifier
ENEMY
Category
Combat

Back to Condition browser