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
| Name | Value | Description |
|---|---|---|
DOTA_UNIT_TARGET_FLAG_NONE | 0 | No additional targeting restrictions. |
DOTA_UNIT_TARGET_FLAG_RANGED_ONLY | 2 | Targets ranged units only. |
DOTA_UNIT_TARGET_FLAG_MELEE_ONLY | 4 | Targets melee units only. |
DOTA_UNIT_TARGET_FLAG_DEAD | 8 | Targets dead units. |
DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES | 16 | Includes magic-immune enemy units as valid targets. |
DOTA_UNIT_TARGET_FLAG_NOT_MAGIC_IMMUNE_ALLIES | 32 | Excludes magic-immune allies from being valid targets. |
DOTA_UNIT_TARGET_FLAG_INVULNERABLE | 64 | Includes invulnerable units as valid targets. |
DOTA_UNIT_TARGET_FLAG_FOW_VISIBLE | 128 | Targets units visible in the fog of war. |
DOTA_UNIT_TARGET_FLAG_NO_INVIS | 256 | Excludes invisible units from being valid targets. |
DOTA_UNIT_TARGET_FLAG_NOT_ANCIENTS | 512 | Excludes ancient units from being valid targets. |
DOTA_UNIT_TARGET_FLAG_PLAYER_CONTROLLED | 1024 | Includes only player-controlled units. |
DOTA_UNIT_TARGET_FLAG_NOT_DOMINATED | 2048 | Excludes dominated units from being valid targets. |
DOTA_UNIT_TARGET_FLAG_NOT_SUMMONED | 4096 | Excludes summoned units from being valid targets. |
DOTA_UNIT_TARGET_FLAG_NOT_ILLUSIONS | 8192 | Excludes illusion units from being valid targets. |
DOTA_UNIT_TARGET_FLAG_NOT_ATTACK_IMMUNE | 16384 | Excludes attack-immune units from being valid targets. |
DOTA_UNIT_TARGET_FLAG_MANA_ONLY | 32768 | Targets only units that have mana. |
DOTA_UNIT_TARGET_FLAG_CHECK_DISABLE_HELP | 65536 | Respects "disable help" settings for allies. |
DOTA_UNIT_TARGET_FLAG_NOT_CREEP_HERO | 131072 | Excludes creep heroes from being valid targets. |
DOTA_UNIT_TARGET_FLAG_OUT_OF_WORLD | 262144 | Includes units that are out of the game world. |
DOTA_UNIT_TARGET_FLAG_NOT_NIGHTMARED | 524288 | Excludes units under the effects of Nightmare. |
DOTA_UNIT_TARGET_FLAG_PREFER_ENEMIES | 1048576 | Prioritizes enemy units when targeting. |
DOTA_UNIT_TARGET_FLAG_RESPECT_OBSTRUCTIONS | 2097152 | Respects obstructions (e.g., cliffs, trees) when determining valid targets. |