Developer's Blog
Old 08-27-2009, 10:17 PM   #1
DonTomaso
Member
 
DonTomaso's Avatar
 
Join Date: May 2009
Location: Sweden
Posts: 395
Send a message via ICQ to DonTomaso Send a message via AIM to DonTomaso Send a message via MSN to DonTomaso Send a message via Skype™ to DonTomaso
DonTomaso is offline

Default Order of Damage Calculations


Order of Damage Calculations


Forewords

This guide mostly contains an ordered list of actions that will take place when a unit is damaged by an attack or ability. Ability names are the original ones from Warcraft III, but I'll include some of the DotA abilities that are based of them.

How To Read

At first this list may seem like gibberish. What it is is in what order certain abilities are calculated. You could see it as the first ability takes whatever damage is dealt, does some calculations to it and then passes it to the next ability.

As can be seen in the list Mana Shield is located higher up than Damage Block. This means that Mana Shield will start by using Medusa's mana to reduce the incoming damage, then the items have their chance of blocking damage further. In other words, Stout Shield will not make your mana last longer.

List

0. Targetability (Ethereal, Mechanical, Ancient, Magic Immune, etc)
0. Defend attack damage modifier (Split Shot).
0. Demolish attack damage modifier (Quelling Blade).

Attack starts
1. Unit is attacked-triggers runs (Backstab, Counter Helix, Return, Craggy Exterior, etc)
2. Target miss chance (Evasion)
3. Attacker miss chance (Blind, Drunken Haze, Smoke Screen, terrain elevation)

Damage output is calculated
If melee
4. Critical Strikes are calculated in order of acquisition. Critical Strikes overrides previous Critical Strikes.
5. Bashes are calculated, and applied as they were a seperate spell (identical to storm bolt). Unsure about this.
6. Cleave.
If ranged
4. Critical Strikes and Bashes are calculated in order of acquisition. Critical Strike overrides previous Critical Strikes and Bashes.
5. It seems like bashes are applied as a 0 damage Storm Bolt, or equivalent. Unsure about this.
6. Splash.
Damage received by target is calculated
7. Spell Block (Linken's Sphere).
8. Feedback (Diffusal Blade).
9. Damage return (Spiked Carapace, NOT Blade Mail). Bonus damage from Critical Strike is not taken into account when returning the damage.
10. Spirit Link (One (removed as of 6.60), not used in DotA at the moment), converted and shared damage is applied afterwards in seperate events.
11. Mana Shield. If Damage Block is aquired after Mana Shield is activated, then a damage block proc (#12 below) will stop Mana Shield from blocking.
12. Damage Block (Poor Man's Shield, Stout Shield, Vanguard, Kraken Shell), in reverse order of acquisition. Only the first one to activate will be used.
13. Defend piercing damage reduction (not used in DotA).

Buffs, they are calculated in reverse order of application
*. Incinerate (Fury Swipes, Caustic Finale), works only if current damage is over 0.
*. Berserker (Sprint).
15. Armor Type and Armor Value (can't reduce below 1. If damage is 0.5 here, and you got 50% reduction, it will stay at 0.5. If you have -50% reduction the damage will be increased to 0.75).
16. Phase Shift
17. Unit takes damage-triggers runs (triggered heals like Backtrack, Dispersion, Gravekeeper's Cloak, and various other abilities/items like Blade Mail)
18. Life Steal drain. Leeches a % from min(current damage, current hp). Note that the amount leeched is calculated of the real damage dealt to the unit, so neither mana used by Mana Shield or "blocked" damage from triggered heals counts. However, since triggered heals increase the hp of the unit you will still be able to lifesteal from a unit with 1 hp (like Shallow Grave) even though he just got 1 hp (considering that you usually can't lifesteal more than the targets current hp).

Errors and Additions

Some of these events are kinda hard to track, and because of that some smaller errors might occur. If you see that some ability that alter damage that exist either in DotA or Warcraft III which doesn't appear in this list, please notify me so I can include it.
__________________
Profile-ish thread
Feel free to contact me about anything (be it PM, ICQ, MSN, AIM or Skype), whether you have a question or not.
  Reply With Quote
Last edited by DonTomaso; 03-13-2010 at 11:43 AM.
Old 08-28-2009, 11:22 AM   #2
Cáno
Member
 
Cáno's Avatar
 
Join Date: Jul 2009
Location: Kraków, Poland
Posts: 4,126
Cáno is offline
Default Re: Order of Damage Calculations

Finally, it's even better than DA one .
Great job.
  Reply With Quote
Last edited by Cáno; 02-07-2010 at 10:30 AM.
Old 08-30-2009, 03:55 AM   #3
Foede
Forum Staff
 
Foede's Avatar
 
Join Date: Jun 2009
Location: Argentina
Posts: 10,241
Awesome 
Send a message via MSN to Foede Send a message via Skype™ to Foede
Foede is offline
Default Re: Order of Damage Calculations

Where is Viper's nethertoxin? When attack starts, no?
  Reply With Quote
Old 08-30-2009, 11:14 AM   #4
Cáno
Member
 
Cáno's Avatar
 
Join Date: Jul 2009
Location: Kraków, Poland
Posts: 4,126
Cáno is offline
Default Re: Order of Damage Calculations

Quote:
Originally Posted by Foede View Post
Where is Viper's nethertoxin? When attack starts, no?
It could be placed here:
Quote:
1. Unit is attacked-triggers runs (Backstab, Counter Helix, Return, Craggy Exterior, etc)
Also note that it triggers when you cast Poison Attack.
  Reply With Quote
Last edited by Cáno; 02-07-2010 at 10:30 AM.
Old 08-30-2009, 04:54 PM   #5
Unnamed_
Banned
 
Join Date: Jul 2009
Posts: 5,655
Unnamed_ is offline
Default Re: Order of Damage Calculations

No matter when Nethertoxin triggers, it's effect is adding damage to your normal attack, so, we can say it could fall to Qelling Blade, as all reductions come after it.
  Reply With Quote
Old 09-02-2009, 01:12 PM   #6
mDREAMm
Member
 
mDREAMm's Avatar
 
Join Date: May 2009
Location: Bulgaria
Posts: 599
Send a message via ICQ to mDREAMm Send a message via Skype™ to mDREAMm
mDREAMm is offline
Default Re: Order of Damage Calculations

Great job done here.But why are you unsure about "Damage output is calculated"5(melee) and 5(ranged).

Salute for the effort you have put into it.
__________________
Even the lone warrior is still a warrior.
  Reply With Quote
Last edited by mDREAMm; 09-02-2009 at 03:25 PM.
Old 09-02-2009, 02:01 PM   #7
DonTomaso
Member
 
DonTomaso's Avatar
 
Join Date: May 2009
Location: Sweden
Posts: 395
Send a message via ICQ to DonTomaso Send a message via AIM to DonTomaso Send a message via MSN to DonTomaso Send a message via Skype™ to DonTomaso
DonTomaso is offline
Default Re: Order of Damage Calculations

Quote:
Originally Posted by mDREAMm View Post
Great job done here.But why are you unsure about "Damage output is calculated"5(melee) and 5(ranged).
I'm not sure how the stun is applied exactly. As I've written it seems to work just like a targeted spell.
Quote:
Originally Posted by mDREAMm View Post
*Small tipo in "Damage recieved by target is calculated".
Salute for the effort you have put into it.
Fixed and thanks.
__________________
Profile-ish thread
Feel free to contact me about anything (be it PM, ICQ, MSN, AIM or Skype), whether you have a question or not.
  Reply With Quote
Old 09-02-2009, 03:25 PM   #8
mDREAMm
Member
 
mDREAMm's Avatar
 
Join Date: May 2009
Location: Bulgaria
Posts: 599
Send a message via ICQ to mDREAMm Send a message via Skype™ to mDREAMm
mDREAMm is offline
Default Re: Order of Damage Calculations

Quote:
Originally Posted by DonTomaso View Post
I'm not sure how the stun is applied exactly. As I've written it seems to work just like a targeted spell.

Fixed and thanks.
I see,again nice job here o/
__________________
Even the lone warrior is still a warrior.
  Reply With Quote
Old 09-27-2009, 07:03 PM   #9
SNOW37
Member
 
SNOW37's Avatar
 
Join Date: Jun 2009
Location: Canada
Posts: 999
Blog Entries: 2
SNOW37 is offline
Default Re: Order of Damage Calculations

Just to clarify the last point, you can lifesteal the life healed by a pseudo evasion even if they only have one health because, they are really healed and then damage, right?
__________________
You can call me LEMONS
  Reply With Quote
Old 09-27-2009, 08:19 PM   #10
Foede
Forum Staff
 
Foede's Avatar
 
Join Date: Jun 2009
Location: Argentina
Posts: 10,241
Awesome 
Send a message via MSN to Foede Send a message via Skype™ to Foede
Foede is offline
Default Re: Order of Damage Calculations

Correct. The damage is done and recorded by the W3 engine (even if it got healed back), and because of that, it will be considered for lifesteal.
__________________

Quick Help Mod // Mech fag wannabe Mod // Sugg lurker Mod // Spanish translator



My suggs:
  Reply With Quote
Old 09-27-2009, 08:36 PM   #11
SNOW37
Member
 
SNOW37's Avatar
 
Join Date: Jun 2009
Location: Canada
Posts: 999
Blog Entries: 2
SNOW37 is offline
Default Re: Order of Damage Calculations

k i thought so but somehow reading point 18 made me think otherwise...
thanks foede
__________________
You can call me LEMONS
  Reply With Quote
Old 09-28-2009, 11:45 PM   #12
Akiyo
Member
 
Akiyo's Avatar
 
Join Date: Sep 2009
Location: The crack between dimensions.
Posts: 235
Akiyo is offline
Default Re: Order of Damage Calculations

Nice guide!

Quick question, thou, when is lifesteal calculated then?

If lifestealing is evaded but still stealable because its a prehealed hp, what about creeps which have less HP then the amount that should be lifestealed?
__________________


Abandoned due to studying =/

What,cant female play DotA?
  Reply With Quote
Old 09-28-2009, 11:49 PM   #13
Foede
Forum Staff
 
Foede's Avatar
 
Join Date: Jun 2009
Location: Argentina
Posts: 10,241
Awesome 
Send a message via MSN to Foede Send a message via Skype™ to Foede
Foede is offline
Default Re: Order of Damage Calculations

Lifesteal comes at the end, and it's calculated on the final damage dealt to the unit.

I'm not sure I understand your 2nd question. Do you mean, if you deal 50 damage to a 25 HP unit, you want to know if you will lifesteal 50 or 25?
__________________

Quick Help Mod // Mech fag wannabe Mod // Sugg lurker Mod // Spanish translator



My suggs:
  Reply With Quote
Old 10-12-2009, 06:45 AM   #14
Clogon
Member
 
Join Date: Jun 2009
Posts: 425
Clogon is offline
Default Re: Order of Damage Calculations

Nice Guide!!!

4) No mention of how Range Bashes stack?

14) Isn't Viper's Frenzy also based on Berserk with 20% damage amplification?

16) and 17) I would prefer it if you swap these 2 and place damage triggers before Phase shift (PS). There are 2 reasons for this: 1) Triggers activate before hardcoded stuff and 2) for non mech people, they might think that, since you are invulnerable from PS, the triggered heals won't activate.
__________________
I don't like moving...
  Reply With Quote
Old 10-12-2009, 08:46 AM   #15
Robzor
Member
 
Robzor's Avatar
 
Join Date: Jun 2009
Location: Stockholm, Sweden
Posts: 861
Robzor is offline
Default Re: Order of Damage Calculations

Quote:
Originally Posted by Clogon View Post
14) Isn't Viper's Frenzy also based on Berserk with 20% damage amplification?
That ability was replaced with Nethertoxin ('-´)
  Reply With Quote
Old 10-12-2009, 03:43 PM   #16
Clogon
Member
 
Join Date: Jun 2009
Posts: 425
Clogon is offline
Default Re: Order of Damage Calculations

O yeah lol I totally forgot about it. =P
__________________
I don't like moving...
  Reply With Quote
Old 11-01-2009, 10:25 PM   #17
Cáno
Member
 
Cáno's Avatar
 
Join Date: Jul 2009
Location: Kraków, Poland
Posts: 4,126
Cáno is offline
Default Re: Order of Damage Calculations

If Damage Block was acquired after Mana Shield then if Damage Block procs Mana Shield will have no effect at all.

Edit: What I've written is wrong. Still there is some strange interaction.

Edit 2: OK, here's how it works: If the Damage Block procs then Mana Shield will not reduce the damage. Mana will be taken only if you acquire Mana Shield after Damage Block.

Edit 3: Tested again with no Minimum Damage on Hardened Skin.
If Hardened Skin was acquired first then they will work as they should (damage reduced by Mana Shield will be further reduced by Hardened Skin). If Hardened Skin was acquired after Mana Shield then it will disable it on proc.
That's the final version. :P

Edit: 4: (._. )
  Reply With Quote
Last edited by Cáno; 02-07-2010 at 10:32 AM.
Old 11-02-2009, 05:31 AM   #18
Entlee
Member
 
Join Date: Nov 2009
Posts: 142
Entlee is offline
Default Re: Order of Damage Calculations

What about naix feast and open wound? Feast add dmg to your normal att or it work like fury swipes and backstab?
When will skill like open wound increase your dmg deal? Before the dmg reduction or after?
  Reply With Quote
Old 11-02-2009, 03:22 PM   #19
DonTomaso
Member
 
DonTomaso's Avatar
 
Join Date: May 2009
Location: Sweden
Posts: 395
Send a message via ICQ to DonTomaso Send a message via AIM to DonTomaso Send a message via MSN to DonTomaso Send a message via Skype™ to DonTomaso
DonTomaso is offline
Default Re: Order of Damage Calculations

Feast and Open Wound are both triggered, so they are applied at the current step 17: Unit takes damage-triggers runs (triggered heals like Backtrack, Dispersion, Gravekeeper's Cloak, and various other abilities/items like Blade Mail)
__________________
Profile-ish thread
Feel free to contact me about anything (be it PM, ICQ, MSN, AIM or Skype), whether you have a question or not.
  Reply With Quote
Old 11-02-2009, 05:54 PM   #20
Cáno
Member
 
Cáno's Avatar
 
Join Date: Jul 2009
Location: Kraków, Poland
Posts: 4,126
Cáno is offline
Default Re: Order of Damage Calculations

What I've written makes that part not always actual:
Quote:
11. Mana Shield.
12. Damage Block (Poor Man's Shield, Stout Shield, Vanguard, Kraken Shell), in reverse order of acquisition. Only the first one to activate will be used.
  Reply With Quote
Last edited by Cáno; 02-07-2010 at 10:32 AM.
Reply


Forum Jump

Thread Tools