# Upgrade mechanics in depth analysis

Member
edited August 30

@Treisk said:
Damage reduction is calculated as such:

x = Resist; Reduction% = x / (x + 100)

For example, if you have 100 resist, this creates 100/200, or 50% reduction in damage taken from that source!

Is this for both, magical and physical defense?
It's good to know the formula, but can you tell us if units actually have base resist and if that base resist is always the same or different per unit type?

Also, this makes is seem like defense upgrade is just straight up worse than attack upgrade. For simplicity lets say we have a unit that deals 100 damage and another one that has 0 resist (since I don't know what the actual base resist is if it even exists) and 1000 HP (or hips as once called in the dev steam :P ):

Lvl 1: 10 / (10+100) = 9.09 % reduction
Lvl 2: 20 / (20+100) = 16.67 % reduction
Lvl 3: 30 / (30+100) = 23.08 % reduction
Lvl 4: 40 / (40+100) = 28.57 % reduction

The effect this reduction has on the effective HP (EHP) is as follows:
No upgrade: 0% reduction = 1000 EHP
Lvl 1: 9.09 % reduction = 1091 EHP (+9.09% EHP gain when compared to no upgrade)
Lvl 2: 16.67 % reduction = 1167 EHP (+6.97% EHP gain when compared to lvl 1)
Lvl 3: 23.08 % reduction = 1231 EHP (+5.48% EHP gain when compared to lvl 2)
Lvl 4: 28.57 % reduction = 1286 EHP (+4.47% EHP gain when compared to lvl 3)
(Numbers have been rounded according to the usual rules of mathematics. If for some reason the game always rounds up or always rounds down, numbers might be slightly different but it won't have much or an impact.)

So according to this the EHP gain for each level is as follows:
Lvl 1: +91 EHP (total gain of 91 EHP)
Lvl 2: +76 EHP (total gain of 167 EHP)
Lvl 3: +64 EHP (total gain of 231 EHP)
Lvl 4: +55 EHP (total gain of 286 EHP)

As you can see, defense upgrade keep getting worse the more often you get them. While the first one might be worth it, adding 9.09% EHP to you units, the 4th defense upgrade only adds 5.49% EHP compared to the 1000 starting HP (or 4.47% compared to the 1231 HP or the lvl 3 Upgrade). That makes defense upgrade level 4 39.6% less effective than defense upgrade level 1 while costing 250% of the level 1 upgrade.
Thats 75.84% less effective per shard for level 4 than for level 1.

Alright, now lets compare that to attack upgrades:

Lvl 1: 100 dmg +15% = 115 dmg
Lvl 2: 100 dmg +30% = 130 dmg
Lvl 3: 100 dmg +45% = 145 dmg
Lvl 4: 100 dmg +60% = 160 dmg

Lets see how the percentage damage gain for each level on top of the levels before is:
Lvl 1: +15% dmg (+15% increase compared to no upgrade)
Lvl 2: +15% dmg (+13.04% increase compared to lvl 1)
Lvl 3: +15% dmg (+11.54% increase compared to lvl 2)
Lvl 4: +15% dmg (+10.34% increase compared to lvl 3)

As we can see, both, attack and defense upgrades, become less effective with higher upgrades when compared to the level before. However, for attack upgrades the actual value, by which the damage is increased, stays the same (in this case 15 damage per level), while for the defense upgrade, the effective HP gained becomes less with higher upgrade levels.

Now let's see how the upgrades interact:
No Upgrades: 1000 EHP / 100 dmg / hit = 10 hits needed
Lvl 1: 1091 EHP / 115 dmg / hit = 9.49 hits needed
Lvl 2: 1167 EHP / 130 dmg / hit = 8.98 hits needed
Lvl 3: 1231 EHP / 145 dmg / hit = 8.49 hits needed
Lvl 4: 1286 EHP / 160 dmg / hit = 8.04 hits needed

Now before someone comes in saying you can only do full hits so fractions are always rounded up: Yes, but thats assuming the unit has 100 base damage. if its 10 base damage instead, we have 100/95/90/85/81 hits needed for attack and defense upgrades at the same level.

As we can see, defense upgrades are a lot worse than attack upgrades. You need 5.1% / 10.2% / 15.1% / 19.6% less hits for levels 1/2/3/4 for both sides respectively.

Now let's look at the extremes (attack 4 versus defense 0 and attack 0 vs defense 4):

1000 EHP / 160 dmg / hit = 6.25 hits needed

1286 EHP / 100 dmg / hit = 12.86 hits needed

Thats interesting. In case 1 (Attack 4 - Defense 0) we need 37.5% less hits for the kill while in case 2 (Attack 0 - Defense 4) we only need 28.6% more hits for the kill. However, these are extreme cases and it's more likely that people have at least some upgrades if the enemy has a lvl 4 upgrade.

Now all that is true if units do not have any base resist. If a unit has base resist, the discrepancy becomes even higher. Let's assume out 1000 HP unit has 50 base resist. Thats makes is have a base damage reduction of 50/150 = 33.34% or 1333 EHP.

Let's see what it's base HP are with the upgrade levels (I'll spare you the calculations here and just put in the numbers):
lvl 1: 1375 (+42) EHP
lvl 2: 1412 (+37) EHP
lvl 3: 1444 (+32) EHP
lvl 4: 1474 (+30) EHP

Now the comparison between same level upgrades (attack and defense) for both sides:

No upgrades: 1333 EHP / 100 dmg / hit = 13.33 hits needed
Lvl 1: 1375 EHP / 115 dmg / hit = 11.96 hits needed
Lvl 2: 1412 EHP / 130 dmg / hit = 10.86 hits needed
Lvl 3: 1444 EHP / 145 dmg / hit = 9.96 hits needed
Lvl 4: 1474 EHP / 160 dmg / hit = 9.21 hits needed

Thats 10.4% / 18.5% / 25.3% / 30.9% less hits needed for the same levels of upgrades of 1-4 respectively just because the base resist was set to 50. To remind you, with a base resist of 0 the values were 5.1% / 10.2% / 15.1% / 19.6% less hits needed.

Conclusion:

• Attack upgrades are, other circumstances ignored, straight up better than defense upgrades.
• The first defense upgrade is the most valuable and it costs the least. Higher defense upgrades not only cost more, they also have a lot less impact than attack upgrades of higher levels.
• With upgrades getting higher as the game progresses, damage oriented units get more and more of edge over defense oriented units.
• The higher a units base resist, the less it benefits from defense upgrades. This seems counter intuitive, as units that are designed to be tanky do not benefit as much from tanky-upgrades.

I don't know if this is intended or not and it would be nice if a dev could reply and answer that question.
Furthermore, regardless of this being intended or not, I think it causes some problems. With white and red being more of the damage oriented races and therefore eventually getting an edge over the other 2 races, especially blue, when upgrades start to really kick in in the later stages of the game, I think blue should have an edge over at least white and red in the early stages of the game to compensate for that and to be able to take and attempt to keep the lead while red/white can attempt a comeback with their eventually stronger armies due to upgrades. However, it currently does not feel like this is the case. It feels like all races are pretty evenly balanced in the early game which makes defensive deck setups straight up worse than offensive ones due to no disadvantage without and an advantage with upgrades.

I am looking forward to how this will play out and really wanna know if this is intended or if it was intended to actually have upgrades cancel each other out, which was my initial impression.
Additionally I'd like to request that we get information about resist base values of units. Do they even have base resist? If yes, what is the base resist for every unit?
Also, I really but some work into this and I hope I can actually get a dev reply. I have already opened 2 Threads without a single reply and while for one thread it doesn't matter as it was just feedback, the other one was a straight up question to the devs about a specific mechanic which I have already posted on Saturday.

• Member

i wonder how this affects retreating

• Member
edited August 30

@Aswan said:
Is this for both, magical and physical defense?

Yes.

@Aswan said:
It's good to know the formula, but can you tell us if units actually have base resist and if that base resist is always the same or different per unit type?

Base resist is always 0 for everything.*

@Aswan said:
Also, this makes is seem like defense upgrade is just straight up worse than attack upgrade. For simplicity lets say we have a unit that deals 100 damage and another one that has 0 resist (since I don't know what the actual base resist is if it even exists) and 1000 HP (or hips as once called in the dev steam :P ):

That's a misconception coming from comparing positive percentages to negative percentages. To add X% to something is not the same as to substract X% from something. If something is on a sale of 50% it costs 2 times less. If something has gone 50% up in price, it costs 1.5 times more. You are looking at EHP as damage reduction, a negative, while looking at the damage upgrades as a damage increase, a positive.

The trick is to look at EHP not as a damage reduction, but as a survivability increase, that is, what is the extra effort required to kill it, which is what actually matters.

The damage done to a unit with resist gets multiplied by 1 - Reduction%:

Damage * (1 - Reduction%) = Damage received by the unit

So the formula to find out how much damage you need to kill a unit would be:

Damage = HP / (1 - Reduction%)

Let's say you have a unit with 1000 HP and 0 resists. The damage required to kill the unit is:

Damage = HP / (1 - Reduction%) = 1000 / (1 + (0 / (0 + 100))) = 1000 damage

As expected. Now, let's say that unit has 10 resist, or equivalently, 10% damage reduction.

Damage' = HP / (1 - Reduction%') = 1000 / (1 + (10 / (10 + 100))) = 1100 damage

If the unit has 20 resist, or equivalently, 20% damage reduction, the damage needed to kill it would be:

Damage'' = HP / (1 - Reduction%'') = 1000 / (1 + (20 / (20 + 100))) = 1200 damage

See what I'm getting at?

Damage needed to kill a unit, which is all we care about, scales linearly, same as damage increase (which you got right). Each point of resist increases the damage needed to kill a unit by 1%. Each point of damage increase increases the damage done by 1%. That's relative to the base damage and health, respectively. They both nullify each other. If you have 20% damage increase you need 1000 damage to kill a unit with 20 Reduction%.

@Aswan said:
As we can see, both, attack and defense upgrades, become less effective with higher upgrades when compared to the level before. However, for attack upgrades the actual value, by which the damage is increased, stays the same (in this case 15 damage per level), while for the defense upgrade, the effective HP gained becomes less with higher upgrade levels.
...
The first defense upgrade is the most valuable and it costs the least. Higher defense upgrades not only cost more, they also have a lot less impact than attack upgrades of higher levels.
With upgrades getting higher as the game progresses, damage oriented units get more and more of edge over defense oriented units.

They don't actually have diminishing returns, they just scale linearly. You are conflating absolute numbers with percentages. If you go from 100 damage to 101 damage, by adding 1 damage, you get a 1% damage increase. If you go from 200 to 201 damage, again by adding 1 damage, you get 0.5% damage increase. Obviously, 1 extra damage when you have 200 base damage is less impactful, relatively speaking, i.e., speaking in percentages, than when you have 100 base damage. In absolute numbers, you are still getting 1 damage either way.

What matters here is how many hits you need to kill a unit. If you have a unit with 10 damage per attack and are against a unit with 1000 HP, you need 10 hits to kill it. If you get a 100% damage increase, you will need half the hits, 5, because you will be dealing double the damage: 20 damage.

Equivalently, if that same unit of 1000 HP got 100 Resist (or 100% Reduction%), you would need twice as many hits to kill. You shouldn't take my word for it, so here's the math:

Damage = HP / (1 - Reduction%) = 1000 / (1 - (100 / (100 + 100))) = 1000 / (1 - 0.5) = 1000 / 0.5 = 2000 damage needed

Since the attacker has 10 damage per hit, you need 2000 / 10 = 20 hits to kill the unit, twice as many hits as before.

Does that make sense? If it's still not clear, let's see how it would work with what intuitively feels right when comparing percentages. Let's say that percentages themselves increase linearly, so that the absolute numbers increase multiplicatively.

As a thought experiment, let's imagine that we change how it works now, which is the right way:

@Arwen said:
Lvl 1: +15% dmg (+15% increase compared to no upgrade)
Lvl 2: +15% dmg (+13.04% increase compared to lvl 1)
Lvl 3: +15% dmg (+11.54% increase compared to lvl 2)
Lvl 4: +15% dmg (+10.34% increase compared to lvl 3)

to those hypothetical linear percentages:

Lvl 1: +15% dmg (+15% increase compared to no upgrade), that would be No Upgrade * 1.15 = 100 * 1.15 = > 115 damage
Lvl 2: +15% dmg (+15% increase compared to lvl 1), that would be 115 * 1.15 = 132.25
Lvl 3: +15% dmg (+15% increase compared to lvl 2), that would be 132.25 * 1.15 = 152.0875
Lvl 4: +15% dmg (+15% increase compared to lvl 3), that would be 152.0875 * 1.15 = 174.900625

With a 60% increase in damage (15% * 4 upgrades), we would be getting a 74.9% increase in damage. Would that make sense? As it is right now, with a 60% increase in damage we get an actual 60% increase in damage, so all is well.

You can't either compare percentages with absolute numbers, nor positive percentages with negative percentages.

@Aswan said:
Attack upgrades are, other circumstances ignored, straight up better than defense upgrades.

That's true, as attack upgrades give 15% increase in damage and defense upgrades give 10% increase in EHP, but they are only better because of that reason.

Summing up, the damage and resist formulas are perfectly fine and standard (every game with resists uses that). The fact that the attack upgrades give 15% increase while resist upgrades give 10% EHP makes them better by design, which is what you may want to discuss.

Btw, this is a common error when people look at damage increase vs damage reduction for the first time, or any kind of comparing positive percentages with negative percentages, so don't feel bad .

*dev citation required, but it should definitely be consistent across units

• Member

@Sir said:
Btw, this is a common error when people look at damage increase vs damage reduction for the first time, or any kind of comparing positive percentages with negative percentages, so don't feel bad .

Aww I feel dumb now..... yet I learned something: I have to pay more attention when doing stuff like this.

Seems like you are right and I did it all for nothing T_T

Yet it still stands, defense upgrades are a lot less valuable than attack upgrades. Also, you often have to only focus on one kind of attack upgrade (ability or physical) and can then choose your targets accordingly, so the enemies have to get both defense upgrades, otherwise the offensive player can just pick on the guy who doesn't have the appropriate defensive upgrade.

• Member

@Sir said:
Lvl 1: +15% dmg (+15% increase compared to no upgrade), that would be No Upgrade * 1.15 = 100 * 1.15 = 115 damage
Lvl 2: +15% dmg (+15% increase compared to lvl 1), that would be 115 * 1.15 = 132.25
Lvl 3: +15% dmg (+15% increase compared to lvl 2), that would be 132.25 * 1.15 = 152.0875
Lvl 4: +15% dmg (+15% increase compared to lvl 3), that would be 152.0875 * 1.15 = 174.900625

Dev verification needed, but my understanding is that's not how the upgrades work. My understanding is that the attack upgrades work as @Aswan said:

Lvl 1: +15% dmg (+15% increase compared to no upgrade)
Lvl 2: +15% dmg (+13.04% increase compared to lvl 1)
Lvl 3: +15% dmg (+11.54% increase compared to lvl 2)
Lvl 4: +15% dmg (+10.34% increase compared to lvl 3)

• Member

I think your conclusion that attack is mathematically better than defense is correct, but I think the fact that if you think that surviving longer may lead to more attacks dealt by a unit while having more dmg but dying quicker, the practical impact of the upgrades might favour defense.

It used to be 10% per dmg upgrade and they generally wanted the pace and volatility of the game to increase, which is why the upgrades got buffed per level.

• Member

@TokOwa said:
I think your conclusion that attack is mathematically better than defense is correct, but I think the fact that if you think that surviving longer may lead to more attacks dealt by a unit while having more dmg but dying quicker, the practical impact of the upgrades might favour defense.

This argument doesnt really hold because of the counter "killing them faster makes them deal less damage to you"

Upgrades pretty much have to be even to be balanced

• Member
edited August 30

Oh, yeah, you're totally right. But I have another argument!

Game is very situational, some units will get to attack more than others and some units will get attacked more than others. Even with balanced upgrades it might not even be truly balanced because utilization of the upgrades might be different for different units. Rather than aiming towards a perfect balance, I think stat upgrades help change the general composition of stats in games as the game progresses, and they generally wanted more damage, which is what motivated the change from 10% dmg per level to 15% dmg per level (I think).

• Member
edited August 30

@cdiss said:
Dev verification needed, but my understanding is that's not how the upgrades work. My understanding is that the attack upgrades work as @Aswan said:

If you read the whole post you will see that I'm not saying that's how attack works, I'm explaining that right now it works how it should, and why it can't work any other way.

Going to edit my post to make it clearer.

• Member

@TokOwa said:
Oh, yeah, you're totally right. But I have another argument!

Game is very situational, some units will get to attack more than others and some units will get attacked more than others. Even with balanced upgrades it might not even be truly balanced because utilization of the upgrades might be different for different units. Rather than aiming towards a perfect balance, I think stat upgrades help change the general composition of stats in games as the game progresses, and they generally wanted more damage, which is what motivated the change from 10% dmg per level to 15% dmg per level (I think).

Well don't forget the fast that you usually only need one type of damage upgrade and can then choose the targets that do not have the corresponding defense upgrade.
So if one player plays heavy magic damage and the other one heavy physical, while one enemy plays heavy physical defense and the other one heavy magical defense, the magic damage guy can just choose to attack the units belonging to the physical defense guy and the physical damage guy can attack the units belonging to the magical defense guy. That way, defense upgrades are nullifier while attack upgrades are in full effect.

However, if all enemies go physical defense, then it's even easier because now target choice doesn't matter anymore. The physical attack guy always has to go up against phys def regardless of target choice and the magical attack guys always gets full effect from his attack upgrades without facing the corresponding defense upgrade.

So because the one who actually does an attack can choose who to attack, defense upgrades are already a lot worse than attack upgrades by nature, even if they would cancel each other out statistically.
In my example, the team who goes for defense upgrades would actually have to evenly upgrade both defenses (magical and physical) in order to get any effect at all.
Of course sometimes positioning etc. affect your target choice as well, but especially with units like the apocalyte, that already does a lot of damage and therefore benefits even more from the discrepancy of attack and defense upgrades, this is, at least in my opinion, a little bit of a balance issue.

Because of that, I think attack and defense upgrades have to cancel each other out, but even if they do, attack upgrades will still be better because you have to still get both defense upgrades in order to not get destroyed by good target choice.

• Member

I think because the game focusses on last hitting creeps the attack upgrades will always be preferred.

The argument makes me think of Dota2 though, especially with the different damage types, of which 2 is nothing. There are situations where just changing the damage type of a characters ability can completely change the meta. I haven't seen anything broken about upgrades yet and if it ain't broke. Play testing should show if there are obvious problems

• Member
edited September 1

I feel like the defense upgrades are king for tanks as that means they can block off people and shield their teammates for a longer period of time, which means more damage made by your damage focused team mates.

For non-tank heroes like whites and reds they probably want at least tier 1 defense upgrades at some point simply because it makes your tier 1 units be able to take on creeps way easier and if the enemy casters don't have the shards to upgrade physical damage it lowers the auto attack damage (I am looking at you raptors).