Mechanics

The mechanics of Dota 2 describe the inner workings of the game. These are elements that are not required to play or even play well, but will improve a player's understanding of Dota 2 and provide them with more streamlined play. This article and the articles it links to describe more intricate elements of Dota 2 and are written for new and experienced players alike.

Engine


Dota 2 launched on a heavily modified version of the Source Engine. This version built upon features introduced with Portal 2 and the Orange Box versions of the engine, such as flowmaps and advanced particle rendering, by adding features such as improved spectator support and cloth physics.

During the transition period from the old Source Engine to the Source 2 Engine, the beta phase consisted of two game clients, the Dota 2 client as we know it was based on the Source engine, and Dota 2 Reborn was based on the Source 2 engine. Later, the old Dota 2 client was scrapped completely and the Dota 2 Reborn was renamed Dota 2.

On Sep. 1 2015, Valve announced that Dota 2 would be moving to its new Source 2 engine, a major overhaul of many core source components. 10 days later, Dota 2 became the first game to be publicly released using this new engine.

Dota 2 supports a matchmaking system and allows for large numbers of spectators at any given game. Custom games can have up to 24 players in game at one time.

Heroes
Heroes are unique units within Dota 2 that the player controls. At the start of each game, players are split into two teams of up to 5 versus 5 and then select a single hero from the hero pool. Every player controls his or her own hero and any unit that hero comes to control, such as neutral creeps under the effects of Chen's Holy Persuasion or Lone Druid's Spirit Bear.

Heroes will gain experience when enemy units are killed nearby. They start the game at level one after start-up and will eventually level up as they earn experience. Gaining a level will increase a hero's attributes and allow him to spend a skill point on learning new abilities or providing additional statistics, with the possibility of additional effects. For most heroes, at level 6, an ultimate ability is unlocked.

Abilities
Heroes gain abilities providing various effects. They range from simple passive bonuses to powerful, devastating explosions. All heroes have four or more abilities, with one of those abilities being their ultimate. Every time a hero levels up, they earn a point that they can place into leveling up available abilities or an attribute bonus. Not necessarily all abilities can be leveled up after any given level.

The table at the right shows when levels can be earned. For instance, heroes can't take a second level of any regular ability until level 3, and can't take the first level of their ultimate until level 6. The Attribute Bonus functions as an ability like any other, able to be taken at level 1, but not until level 3 will it be able to be leveled again.

When an active ability is used, it usually consumes mana and is placed on cooldown. An active ability cannot be used if a hero does not have enough mana to cast it, is still on cooldown, or if the hero is under the effect of an appropriate disabling effect. Not all abilities, however, consume mana or possess a cooldown timer. Mana will regenerate over time, and its rate of regeneration can be increased with intelligence or other effects. While a spell is on cooldown, it cannot be used for a given duration. For example, Wraith King's stun Wraithfire Blast has a cooldown of 8 seconds. This means Wraith King has to wait 8 seconds after casting Wraithfire Blast before he can do so again, even if he has the mana required. Some effects can affect cooldowns, like the item Refresher Orb which will reset all cooldowns immediately when used, at a high mana cost.

Passive abilities, on the other hand, do not require activation to use: they will be used automatically. Most do not have a cooldown or a mana cost, but operate constantly in the background. This also applies to toggled auto-casts. Auto-casts are types of abilities that are used automatically when conditions are met. The automatic effects can be toggled on or off by pressing +. Regardless of whether they are active or not, pressing the ability key and using the ability manually will still work. A yellow, flashing rim will appear on the ability if it is toggled on while having a dark grey rim in case it is toggled off.

Attributes
In addition to unique abilities, every hero has a different set of attributes which control their initial statistics. These attributes are strength, agility, and intelligence. Each of these affect a different statistic of the hero. However, regardless of the hero, each point of an attribute always adds the same stats. This means one strength point on one hero adds the exact same stats as one strength point on any other hero. Same applies to agility and intelligence. The difference between the heroes is just the amount of attributes they gain per level.

In addition to bonuses earned by each attribute, heroes also have a "primary" attribute. Every point in primary attributes increases the hero's attack damage by 1. Typically, out of the 3 attributes, a hero's primary attribute is the highest at level 1, and also has usually the greatest increase per level.

Besides the base attributes and the bonuses per levels, a hero can also increase its attributes by obtaining certain items. Some abilities are able to increase (or decrease) attributes as well.

Experience
In order to level up, heroes must earn experience. When a unit dies in Dota, it grants an amount of experience based on its level to all hostile heroes in a 1300 radius. Experience is split among all heroes in range and the killing hero. Any kill done outside of this 1300 radius grants experience to the killer.

Denied units will grant only 50% of their normal experience. This experience is still split among all heroes in the area. Additionally, summoned units will only give half of their normal experience when killed.

Armor
Armor is an attribute shared by all units. Depending on it's value it can reduce or increase the amount of physical damage taken by a unit. The amount of damage a unit takes is reduced if its armor value is positive, and increased if the armor value is negative. Armor is increased by agility, certain abilities, and some items like Ring of Protection and Platemail.

Damage multiplier of damage taken as a function of armor is calculated by the following formula:


 * Damage multiplier  = 1 - 0.06 armor  (1 + 0.06  |armor|)

Magic resistance
Magic Resistance (sometimes called Spell Resistance) is an attribute of heroes (and some other units) that reduces magical damage similar to Armor. All heroes possess a 25% base magic resistance from their armor type, with the exception of Meepo (35% base magic resistance) and Visage (10% base magic resistance). This resistance is independent of the amount of armor they possess.

Basic attacks
Most units in the game have the ability to damage other units with a basic attack, also known as physical attack or auto attack. When an attack command is issued by right-clicking, attack-clicking or auto-attacking the commanded unit will attack the unit selected or, in case of an auto attack, attack the closest enemy unit.

Attack damage
The damage dealt by basic attacks consisting of main attack damage and bonus damage. Differs for every hero and can be increased by acquiring additional attribute points or bonus damage.

Attack speed
Attack speed is the rate at which a unit attacks, and is determined by its base attack time (BAT) and increased attack speed (IAS). BAT is a constant, and is 1.7 seconds for most heroes. IAS is the sum of agility and bonus attack speed.

Attack range
The range from which a hero can attack another unit. It varies between 150 and 300 units for melee heroes and 140-700 for ranged.

Attack animation
The animation that has to be triggered in order for a hero to deal attack damage. Ranged heroes deal damage via projectiles that have to hit the enemy and can be disjointed. The speed of these missiles vary depending on the hero.

Attack modifier
An attack modifier is an effect granted by items or abilities, which alter a hero's attacks to apply an additional effect to the target, other units or to itself. They usually fully stack with any other attack modifier, even with unique attack modifiers.

The most common examples of attack modifiers are cleave, critical strike, bash. There are multiple heroes which have one of these modifiers as a skill and several items which grant the hero one of these modifiers.

Usually, attack modifiers fully stack with other modifiers, but there are some restrictions. Multiple sources of critical strikes increase the chance of getting a critical hit but only at diminishing returns since multiple crits cannot affect a target when they occur at the same time. In such a case higher value crit will always be applied.

Besides these general mechanics there are number of unique attack modifiers that do not share the rules of Unique Attack Modifiers like Fury Swipes, Burning Spears or the splash from Elder Dragon Form. These are modifiers granted to certain heroes through their spells and cannot be acquired by other heroes. They usually fully stack with any other attack modifier.

Unique Attack Modifier
Unique attack modifiers (previously known as Orb Effects) refer to certain attack modifiers that alter your hero's basic attack just like regular attack modifiers, but have many stacking restrictions. They do stack with regular attack modifiers like the ones mentioned earlier, but do not stack (with a few exceptions) with other unique attack modifiers.

The most common unique attack modifier is lifesteal, which causes the hero's attacks to heal it based on a percentage of the dealt damage (note though that not all sources of lifesteal are unique attack modifiers). Lifesteal as a unique attack modifier is granted by several items. Other unique attack modifiers granted by items is the armor reducing modifier from Desolator. Besides this, some heroes have a unique attack modifier as an ability, like Anti-Mage's Mana Break, Drow Ranger's Frost Arrows or Outworld Devourer's Arcane Orb.

All unique attack modifiers do not stack with each other or with multiple instances of the same unique attack modifier. For items, the priority is, the newest acquired unique attack modifier overrides the older ones. If a hero has a unique attack modifier ability, it will always override the ones from items.

Last hits and denying
"Last-hitting" is the act of a player timing their attacks in order to deliver the killing blow to a unit. Earning a last hit grants a bounty in gold (which is much higher for heroes and towers than for creeps). "Denying" means last-hitting (and thus killing) friendly units so that enemies get fewer or no gold bounty for these units. Denying will also reduce or completely remove experience points awarded to the enemy.

A denied creep grants less experience (only 50% of normal experience) to enemy heroes within the experience radius.

Units can only be denied under certain HP thresholds (i.e. the unit has fewer than the indicated HP remaining):
 * Creeps: 50% HP
 * Towers: 10% HP (a denied tower will still provide some gold to the enemy team).
 * Heroes: 25% HP, only if they are under the effect of certain debuffs (,, or )
 * There is a spell which can be used to deny your teammates even if they are not affected by these buffs:.
 * There are also spells which allow you to deny yourself:, , , , and.
 * Denying the Phoenix Sun from will also deny the Heroes inside it (needs 50% HP to be denied).
 * Denied heroes won't give the enemy any experience or gold.
 * Heroes killed by neutral creeps is technically not considered a deny, but it works in a similar way in that it does not give experience or gold to nearby enemy Heroes.

Buildings
Buildings are special units in the game. There are several types of buildings. They are immune to almost all spells, which makes them very strong earlier in the game.

Ancients
Ancients are powerful structures. The goal of each game is to destroy the enemy's Ancient. Ancients have 4250 Health and 15 Armor. They are guarded by 2 towers that must be destroyed before the Ancient can be damaged.

Towers
Towers are stationary, defensive structures that guard the lanes and subsequent main bases of each faction. They fire high damage projectiles at nearby enemies and possess significant levels of armor and health points, but provide large amounts of gold when destroyed by the opposing team. Both factions have 3 tiers of towers in each lane. Each tower tier becomes progressively stronger the closer they are to the main base. To attack towers further in the lane, the outermost ones must be destroyed first. Both must be destroyed before damage can be done to the main structure. The Ancient is protected by two powerful tier 4 towers that only become vulnerable when all three towers in a lane have been destroyed. Towers have a passive True Sight built in. Towers can be denied, just like creeps, once they have 10% health or less. This means that tier 1 towers (1300 total HP) can be denied at 130 health or lower, and tier 2-4 towers (1600 total HP) can be denied at 160 health or lower.

Towers have a specific targeting priority that determines which enemy it will attack. This list represents that priority in ascending order:
 * 1) Closest enemy unit or hero attacking a friendly hero with auto attack
 * 2) Closest enemy unit or hero attacking the tower itself with auto attack
 * 3) Closest enemy unit or hero attacking any friendly unit with auto attack
 * 4) Closest enemy unit
 * 5) Closest enemy hero
 * 6) Closest enemy catapult

The tower will only switch targets under four circumstances:
 * If the targeted enemy unit or hero dies
 * If an enemy unit or hero targets a friendly hero
 * If an enemy hero being attacked by the tower manually attacks another enemy unit or hero (in which case, the tower will select a new target based on the above priority order).
 * If the targeted enemy unit or hero leaves the range of the tower.

Barracks
Barracks are structures inside each faction's base, near the ramps. When a barracks is destroyed, the creeps of the opposite faction receive a health and damage boost, and provide less experience and gold when killed. This means the destruction of the opposing barracks will ensure that your creeps will continue to push a lane without the intervention of heroes.

There are two separate barracks at each entrance, the melee creep barracks, and the Ranged Creep barracks. The melee creep barracks will power up melee creeps, while the ranged barracks will improve ranged and siege creeps. When all barracks at each entrance are destroyed, the opposing team will receive mega creeps, which are far more powerful than their normal counterparts.

Fountains
Fountains are permanently invulnerable buildings located at the furthest south-west (for radiant) and north-east (for dire) corners of the map, right at each team's elevated spawn area. The fountains have both a strong regeneration aura, which quickly heals allied heroes and units health and mana. The heal rate is partially percentage based, so it scales with the heroes' health and mana pool, but is overall more effective early on, due to the bit of flat amount it restores. This restoring aura is also responsible for re-filling Bottles. Additionally, fountains are also very powerful defensive structures, being able to attack at a very high rate and dealing lots of damage per attack. Their attack reaches up to the spawn area entrance. They also provide True Sight, revealing enemies within the area. The team's couriers also turn invulnerable when within range of the fountain.

Damage types
There are three different types of damage that can be caused by abilities and spells. Each type varies in how it affects enemy units. These types are Physical, Magical and Pure
 * Physical damage ignores magic resistance and goes through spell immunity, if the physical damage dealing spell has the spell immunity piercing status, but is reduced by armor and blocked by ethereal state.
 * Magical damage ignores armor and goes through ethereal state, but is reduced by magic resistance and blocked by spell immunity, even when the magical damage dealing spell has spell immunity piercing status.
 * Pure damage ignores armor and magic resistance, goes through ethereal state and pierces spell immunity, if the pure damage dealing spell has the spell immunity piercing status.
 * All 3 damage types are subject to forms of damage manipulation other than armor and magic resistance.
 * Besides damage types, there are also damage flags, which cause abilities to behave differently. For example, the HP Removal damage flag causes flagged damage to ignore damage manipulation. Then there is the no reflection flag which causes the flagged damage to not be reflected by e.g. Blade Mail.