Skip to content

TargetFlags Enum ​

The TargetFlags enum defines additional conditions and filters that can be applied when determining valid targets for abilities or effects in Dota 2.

Enum Values ​

NameValueDescription
DOTA_UNIT_TARGET_FLAG_NONE0No additional targeting restrictions.
DOTA_UNIT_TARGET_FLAG_RANGED_ONLY2Targets ranged units only.
DOTA_UNIT_TARGET_FLAG_MELEE_ONLY4Targets melee units only.
DOTA_UNIT_TARGET_FLAG_DEAD8Targets dead units.
DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES16Includes magic-immune enemy units as valid targets.
DOTA_UNIT_TARGET_FLAG_NOT_MAGIC_IMMUNE_ALLIES32Excludes magic-immune allies from being valid targets.
DOTA_UNIT_TARGET_FLAG_INVULNERABLE64Includes invulnerable units as valid targets.
DOTA_UNIT_TARGET_FLAG_FOW_VISIBLE128Targets units visible in the fog of war.
DOTA_UNIT_TARGET_FLAG_NO_INVIS256Excludes invisible units from being valid targets.
DOTA_UNIT_TARGET_FLAG_NOT_ANCIENTS512Excludes ancient units from being valid targets.
DOTA_UNIT_TARGET_FLAG_PLAYER_CONTROLLED1024Includes only player-controlled units.
DOTA_UNIT_TARGET_FLAG_NOT_DOMINATED2048Excludes dominated units from being valid targets.
DOTA_UNIT_TARGET_FLAG_NOT_SUMMONED4096Excludes summoned units from being valid targets.
DOTA_UNIT_TARGET_FLAG_NOT_ILLUSIONS8192Excludes illusion units from being valid targets.
DOTA_UNIT_TARGET_FLAG_NOT_ATTACK_IMMUNE16384Excludes attack-immune units from being valid targets.
DOTA_UNIT_TARGET_FLAG_MANA_ONLY32768Targets only units that have mana.
DOTA_UNIT_TARGET_FLAG_CHECK_DISABLE_HELP65536Respects "disable help" settings for allies.
DOTA_UNIT_TARGET_FLAG_NOT_CREEP_HERO131072Excludes creep heroes from being valid targets.
DOTA_UNIT_TARGET_FLAG_OUT_OF_WORLD262144Includes units that are out of the game world.
DOTA_UNIT_TARGET_FLAG_NOT_NIGHTMARED524288Excludes units under the effects of Nightmare.
DOTA_UNIT_TARGET_FLAG_PREFER_ENEMIES1048576Prioritizes enemy units when targeting.
DOTA_UNIT_TARGET_FLAG_RESPECT_OBSTRUCTIONS2097152Respects obstructions (e.g., cliffs, trees) when determining valid targets.