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 runs on a heavily modified version of the Source Engine. This version builds 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. Dota 2 supports a matchmaking system and up to 10 players in game at one time, but allows for large numbers of spectators at any given game.

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 a 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 as they earn experience, will eventually level up. Each level a hero earns will increase their attributes and provides a point toward learning new abilities or providing additional statistics, with the possibility of additional effects. For most heroes, at level 6, an ultimate ability is made available.

Abilities
Heroes gain abilities that provide 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. 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, if it is on cooldown, or if they are silenced/stunned/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, Huskar's Inner Vitality has a cooldown of 25 seconds. That means that Huskar must wait 25 seconds after casting Inner Vitality before he can do so again, even if he has the mana required. Some effects can affect cooldowns, like the 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 are toggleable by pressing Alt+. Regardless of whether they are on or off, 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, and will have a dark grey rim while 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. In addition to bonuses earned by each Attribute, Heroes also have a "main" attribute. Every point in their main attribute adds 1 to their physical attack damage. Typically, this will also be the highest attribute at first level, and the one that receives the greatest increase as a Hero levels up.

Every point in Strength will... Every point in Agility will... Every point in Intelligence will...
 * Increase the Hero's maximum Health by 19.
 * Increase the Health regeneration of the Hero by 0.03 Health per second.
 * Increase the damage of Strength based Heroes by 1.
 * Increase the Hero's Armor by 0.14 points. (1 Armor per 7 points of Agility.)
 * Increase the Hero's Attack Speed by 1 point.
 * Increase the damage of Agility based Heroes by 1.
 * Increase the Hero's maximum Mana by 13.
 * Increase the Mana regeneration of the Hero by 0.04 Mana per second.
 * Increase the damage of Intelligence based Heroes by 1.

Heroes will earn additional attributes whenever they level up, but can also receive bonuses and penalties from items and some abilities.

Experience
In order to level up, heroes must earn experience. When a unit dies in Dota, it gives experience to all hostile heroes in a 1300 AoE based on its level. Experience is split among all heroes in the AoE and the killing hero. Any hero kill done outside of this 1300 area 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. It reduces the amount of physical damage a unit takes, but can also increase the amount of damage a unit takes. The amount of damage a unit takes gets reduced if its armor value is positive, and increased if the armor value is negative. Armor is increased by Agility, certain Abilities and also some items like Chainmail and Platemail. Armor value can be changed while playing by various items and abilities. Some increasee the units' armor value (Plate Mail) and some reduce it (Acid Spray). Only damage with Damage type Normal will get reduced by armor value.

Damage reduction given by armor value is calculated by the following formulas:

Positive armor values:

Damage Reduction = ( 0.06 * armor ) / (1 + 0.06 * armor)

Examples: 10 armor: ( 0.06 * 10 ) / ( 1 + 0.06 * 10 ) = 0.6 / 1.6 = 0.375 = 37.5% 20 armor: ( 0.06 * 20 ) / ( 1 + 0.06 * 20 ) = 1.2 / 2.2 = 0.545 = 54.5%

Negative armor values:

Damage Increase = 1 - 0.94 ^ (-armor)

Examples: -5 armor: 1 - 0.94 ^ (--5) = 1 - 0.94 ^ 5 = 0.266 = 26.6% -10 armor: 1 - 0.94 ^ (--10) = 1 - 0.94 ^ 10 = 0.461 = 46.1%

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 25% base Magic Resistance from their Armor type, with the exception of Meepo, who has 35% Magic Resistance, and Visage, who has 10% magic resistance. This resistance is independent of the amount of armor they possess.

Last Hits and Denying
"Last-hitting" is the act of a player timing their attacks so that their hero delivers the killing blow to a unit. Earning a last hit gives 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 point awards for the enemy.

A denied creep gives less experience (only 50% of normal experience) to enemy heroes within experience range.

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 (de)buffs (Doom's Doom, Venomancer's Venomous Gale, Bane's Nightmare or Queen of Pain's Shadow Strike)
 * There is a spell which can be used to deny your teammates even if they are not affected by these buffs: Bane Elemental's Nightmare.
 * There are also spells which allow you to deny yourself: Pudge's Rot, Alchemist's Unstable Concoction, Abaddon's Mist Coil, Techies' Suicide Squad Attack! and Pugna's Life drain.
 * Bloodstone's active ability Pocket Suicide will instantly deny the user.
 * Denied heroes won't give the enemy any experience or gold.

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're 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 that destroying a 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
The Fountains are permanently invulnerable. The Fountains will regenerate friendly Heroes and units (like Spirit Bear and Dominated units) back to their maximum Health and Mana over a very short period of time. Additionally, Fountains will attack enemy units that attempt to enter their range, dealing 190-199 physical damage over 800 range and firing very rapidly. Friendly fountains will fill Bottles back to full, if they are not already.

Cleave Damage
Cleave makes a melee unit's attacks deal a portion of their physical damage to the enemy units in an AOE. The damage dealt by Cleave is reduced by Armor type but not by armor value and is derived from the actual damage of the attacking unit as opposed to the damage that the primary target took from the attack. Also, cleave does not affect the primary target of the attack. Cleave damage does not increase based upon the effects of most unique attack modifiers you may have. If you have a Desolator and a source of Cleave and you attack a unit, only the main target of your attack will receive the Corruption buff from Desolator. The only buff placer that affects Cleave is Critical Strike. If you proc a Critical Strike when you cleave, the damage multiplier will affect all units hit by the Cleave. Multiple sources of Cleave work completely independently from each other. If you have a 500 AoE 50% Cleave, and a 250 AoE 35% Cleave, you will deal 50% of your damage in 500 AoE, and 35% of your damage in 250 AoE. Each Cleave source causes another instance of damage for the affected units. Cleave AoE is a circle with radius equal to the Cleave range, and its center at a distance equal to the Cleave away from the attacking unit, towards the primary target of the attack.

Unique Attack Modifier
Unique attack modifiers (previously known as Orb Effects) refer to attack modifiers that alter your heroes basic attack to provide an additional effect, but do not stack the same effect. An example of this is Helm of the Dominator, which gives heroes lifesteal. For balance and legacy reasons, unique attack modifiers, with a couple exceptions, do not stack. Having more than one non-stacking attack modifier at any time is generally considered useless. Certain hero abilities, such as Broodmother's Incapacitating Bite, also count as unique attack modifiers. Not all attack modifiers are unique attack modifiers.

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