Damage Calculation

@u2371 Don’t worry, these things take a while (and I’m also not very fast :wink: )

There’s a good fit for a=25; b=25; k=0.85 for the single tile damage:
grafik

For the adjusted damage (=tripled damage) the formula switches to a=75; b=75; k=0.9
grafik

Around 1.3-1.4 the damage starts to vary much more, so this needs to be checked in more detail.
Also, we’re currently dealing only with the lower linear part of the whole curve:
grafik
The rest should follow as soon as we verify that colour stacking gives the exact same values.
(the highest dot in my diagram is at 31.3137 for a blue stack of 4791 ATK against a Kenjiro with 153 DEF)

Should be possible. I’ll ask one of my alliance members to temporarily put a different tank, so that I can fight it. (Marjana 1-1 with 7%DEF from 1* troop should give 370DEF)

2 Likes

I think we are in the right way that it is step function which is enough to make very accurate approximate function. However, it look like it isn’t easy to find the exact function because of the (variance) and floor. Very accurate approximate function is ok for me. It need a lot more test to find the exact function. So, it will be one of the last thing that I want to know.

After I think again, I think the (variance) factor should be outside floor, is ±integer and have minimum at ±1. I think at 904,1001,1052 attack have (variance) = ±2 but still need some more data to conclude.

In the adjusted damage graph, is the tile data (blue) at about 1.4 correct ? It is a bit outside the linear similar to the two dot at about 0.2

Could you try fit this graph with this function ?

adjusted damage = Floor [ ( a * ADR + IF(ADR >= k1)(b * ( ADR - k ), 0) + IF(ADR >= k2)(c * ( ADR - k2 ), 0) ) ]
a = 75, b=75, k1=0.9
k2 and c are value for the linear at about ADR > 5

About colour stacking, I’m not sure if tile of 5 heros with 200 attack each heros vs defense 744 will give same damage to tile of 1 heros with 1000 attack vs defense 744 or not ? Maybe, there is small different. So, we need to check it as well. I think it is better to check this after check the defense 370 test.

1 Like

I fully agree that a very simple approximate function would be perfectly suitable for calculations. Let’s see, if we can keep it linear all the way. :smiley:

Yes, it is correct. That is a combined green tile attack from Buddy and Jack O’Hare against an Aegir tank, 1348 ATK (=658+690) against 957 DEF, ADR=1.40857.
These green tiles hit with strong elemental bonus for 110, 102, 104, 111, 107 and 109 damage. The corresponding adjusted damage is 165, 153, 156, 166.5, 160.5, 163.5.

Here goes:
adjusted damage = Floor [ ( a * ADR + IF(ADR >= k1)(b * ( ADR - k1), 0) + IF(ADR >= k2)(c * ( ADR - k2 ), 0) ) ]
a = 75, b = 75, k1 = 0.9, c = -67, k2 = 5

grafik

grafik

grafik

That looks really good already :smiley:

Coming back to the data collection. I got a few more points, so now we have the following:
attack / damage range:
159/4-6
208/6-8
277/8-10
346/10-12
417/13-15
500/16-18
611/19-21
623/20-22
658/21-23
678/21-23
703/23-25
744/26-28
797/30-32
904/38-40
911/38-40
1001/44-48
1052/47-51

grafik

I have a few data points for colour stacking now:
346/10-12 (with Tudan1-1 +9% ATK and Sharan1-1 +22% ATK = 182+164 ATK = 364 ATK)
500/16-18 (with Aife1-1 +18% ATK and Gadeirus1-1 +4% ATK = 198+302 ATK = 500 ATK)
1001/44-46 (only 5 data points; Aife+Gadeirus+By-Ulf3-50 +15% ATK = 500+501 ATK = 1001 ATK)
grafik
=> Looks like colour stacking gives the exact same damage as the corresponding ATK value from a single hero

1 Like

:smile:

I think there are some factor that affect the adjusted damage. I’m not sure what cause it. Tile damage against 744 def data have very smaller variation when compare your other data. Maybe, from floor function or cri and strong elemental bonus that cause bigger variation or limitation of using ADR or something else.

Yes, it look very well. It look like at ADR about 2 to 5, the test function give little bit too low value. Maybe, you can adjust the test function by adding more step linear.

I actually try fitting your 744 def data (include this new data). I get

damage = Floor( a0 + a1 * ADR + IF(ADR >= k1)(a2 * ( ADR - k1), 0) ) ± ( 1 + IF(ADR >= 4/3)(1,0))

a0 = 0.35
a1 = 24.8
a2 = 28.3
k1 = 0.91

(I think use a0,a1,a2… and k1,k2,k3 will be better if there are more linear.)

It give the exact value from 744 def data we have. However, it can give exact value only for 744 def data.

If we want approximate function, I think add some more linear and use non-integer a and k value will be enough.

You might have to test more at 1001 stacking attack that it can do 47 and 48 damage or not.

Yes, it looks like the colour stacking doesn’t cause the larger variation. Could you try attack 1001 vs the lowest defense you can do for both colour stacking and 1 heroes ? I want to make sure that there is no different even at high ADR.

1 Like

@Zack Could you do some small test about “Dead heroes - lower tile damage” ?

There are some people want to know it and I think that we should check it too.

Did that and was surprised at first, but the issue got resolved with some more data today.

For the single hero damage at 1001 ATK I have 18 data points giving the damage range 44-48
44, 48, 47, 48, 45, 48, 47, 47, 47, 48, 47, 47, 44, 46, 45, 47, 48, 46

For the corresponding double hero damage for combined 1001 ATK I had 6 data points, giving the range of 44-47. With today’s data that went to 11 data points and the range 44-48:
45, 47, 45, 47, 45, 46, 45, 47, 48, 46, 44

For the corresponding triple hero damage for combined 1001 ATK I had 26 data points, giving the range 44-47. With today’s data that went to 34 data points and the range 44-48:
44, 46, 46, 44, 44, 44, 47, 44, 44, 46, 46, 45, 45, 46, 47 ,45, 47, 45, 44, 44, 46, 47, 45, 47, 46, 46, 48, 47, 45, 48 ,47 ,48 ,48 ,44

Looks like I got very unlucky with the first 32 data points (=26+6) not giving 48 damage at all.

Another colour stacking test
797/30-32 (with Elena1-1+19% ATK and Kelile1-1+4% ATK = 467+330 ATK = 797 ATK)

I could additionally check for 1052 ATK, but it already seems clear that
=> colour stacking gives the same damage as a single hero with the same ATK
grafik

2 Likes

Yes, the probability that you doesn’t get 48 damage in 26 data points in row is 0.8^26 ≈ 0.3%. That is pretty rare :smile:. I also have experience of something like that as well when I collect data of other game. (Ironically, when the data you want pop out, it pop out as frequent as other data after it pop out in the first time. It like something hold that value and then release.)

The randomness make it harder to find any relation function. It make you need more data. I think some where between 911 and 1001 attack is the point that make (variance) change from ±1 to ±2. However, I doesn’t want to know about the point that change variance much because it is mostly useful for only finding exact function.

From all 63 data at 1001 ATK, it look like that it is a uniform distribution from 44 to 48. This make me more sure that the (variance) is outside floor function (if you aren’t very unlucky :smile:).

I agree that it is clear enough that color stacking gives the same damage as a single hero. Could you check for 1052 ATK against “lowest defense” instead of 744 against ? It is better to check at more different ADR.

With the current data collection I can check for a few ATK values:

alive: 208/6-8 (6 data points - 7, 8, 6, 8, 6, 6)
dead: 208/6-8 (19 data points - 6, 6, 7, 7, 6, 6, 7, 6, 7, 8, 7, 6, 8, 6, 6, 8, 6, 8, 8)

alive: 277/8-10 (10 data points - 9, 9, 9, 10, 10, 9, 8, 10, 10, 9)
dead: 277/8-10 (12 data points - 8, 9, 10, 10, 10, 8, 10, 10, 10, 10, 8, 10)

alive: 417/13-15 (7 data points - 14, 14, 13, 13, 13, 15)
dead: 417/13-15 (9 data points - 15, 15, 13, 13, 13, 13, 15, 13, 15)

alive: 611/19-21 (6 data points - 20, 19, 19, 21, 19, 21)
dead: 611/19-21 (8 data points - 21, 19, 21, 20, 21, 19, 21, 19)

=> tile damage from dead and alive heroes (no buffs/debuffs considered) is the same

edit: removed one incorrect data points from the 208 (dead) damage numbers

2 Likes

Is the target defense 744 ?

In dead: 208, do damage 5 really appear ?

1 Like

Yes, that is my data for the 744 DEF (Cyprian+1 tank with crit troop level25)

Well spotted. I saw that too, checked, and found that this was from a tile attack where Cyprian’s 25% DEF from paladin class was active. I removed that data from my Excel file, but forgot to remove it here in this list as well - only changed the number of data points to 19. Will correct now

1 Like

Finally got to fight a tank with 372 DEF (Marjana1-3 +7%Def from a 1* defense troop)

The damage data is as follows:
173/10-12 (Tudan1-1+4% ATK - with 19 data points - 11, 12, 11, 12, 12, 10, 12, 11 ,10, 11, 10, 12, 10, 10, 11, 12, 10 ,10, 10)

329/21-23 (Nightshade1-1+17%ATK and Nightshade1-1+8%ATK - with 30 data points - 21, 23, 22, 22, 23, 21, 22, 23, 22, 21, 23, 22, 21, 23, 22, 22, 23, 23, 23, 22, 22, 22, 23, 23, 21, 22, 21, 22, 23, 23)

500/38-40 (Arman3-50+1 +5%ATK - with 15 data points - 38, 38, 39, 40, 38, 38, 40, 38, 40, 38, 39, 39, 38, 40, 40)

Since this is against a tank with 372 DEF, these damage values need to be compared to the double ATK values for the 744 DEF tank to get the same ATK/DEF ratio:
346/10-12
658/21-23
1001/44-48 (well, correct double ATK value is 1000, but close enough)

=> 744DEF: 346/10-12 vs 372DEF: 173/10-12 - fits
=> 744DEF: 658/21-23 vs 372DEF: 329/21-23 - fits
=> 744DEF: 1001/44-48 vs 372DEF: 500/38-40 - nope! something is wrong here

I checked the videos again to see, if I made some major mistakes and need new glasses, but the damage values are correct.
grafik

Now I want to see what the 372DEF data looks like at an ADR of 1

1 Like

Interesting :thinking:, as I expect, there is something that cause your adjusted damage graph have larger variance and I think you found it. And as I expect, same ADR isn’t always give same damage. (This will ruin all formula that use only ADR value.)

You might have to check attack 1000 vs 744 def. I’m not sure that it is the point that damage will change or not. I know that it is impossible that attack 1000 vs 744 def will give 38-40 damage and attack 1000 is very close to 1001 but I just want to make sure that there is something at 1000 attack or not.

:slightly_smiling_face: I want to see 372DEF graph. You don’t have to use only attack value that relate to 744 DEF. I really want to know that if the second linear of 372DEF graph start at the same point as of 744 DEF graph or not.

I’ve been reading through this thread for a while, am confused about the theta coefficient, earlier in the thread it says it’s random between 0.6 and 1.6, which in theory is a factor of 0.6^1.35 to 1.6^1.35 of a differential, or 0.5x to 1.88x. When I check my hits they seem more consistent than that wide a range. Is the theta coefficient far more likely to be close to 1, or am I just a biased small scale sample?!

I’ve been doing friendly battles using consistent heroes, troops etc and my Excel rand() generator for theta doesn’t seem to give the consistency of hits that I see when I throw tiles or specials at the enemy.

Should I just use Theta = 1?

In order to do it accurately in excel you would have to nest a couple functions; basically creating “bins” with a binomial distribution around exp(0).

This is how I did it:

image

With forumla’s shown:

Essentially:

  • I split it up into 9 bins (the more you do, the more accurate the binomial distribution & representation of “theta”

  • Then each bin I calculated the “theta” value (which is column 2)

  • Then assigned a “weight” to each bin, using binomial distribution

  • then finally calculated the cumulative probability of that particular bin.

  • Then finally, to determine what Theta actually gets “randomly” used, I used the index/match function in the last cell which randomises between 0-1, finds it in the “cumulative probabiltiy” column then matches to the relevant theta column.

thanks, that makes sense

We’ll have to check with a higher defense and even lower defense as well. I hope my alliance member will keep cooperating with all this testing :laughing:

Will be one of the next tests. :slight_smile:

Here’s more data on the 372DEF:
ATK/damage range
173/10-12
273/17-19 (13 data points - 17, 17, 17, 17, 118, 19, 19, 17, 18, 17, 18, 18, 19)
329/21-23
350/22-24 (11 data points - 22, 24, 22, 23, 23, 22, 22, 24, 22, 23, 24)
372/25-27 (13 data points - 25, 26, 25, 25, 25, 27, 26, 25, 26, 27, 25, 26, 27)
418/29-31 (11 data points - 29, 30, 31, 30, 31, 29, 30, 29, 29, 31, 31)
450/33-35 (15 data points - 35, 33, 34, 33, 34, 33, 34, 34, 33, 34, 33, 34, 35, 33, 34)
500/38-40
524/40-44 (19 data points - 43, 42, 40, 43, 41, 41, 40,41, 44 44, 41, 44, 44, 42, 41, 40, 42, 42, 44)
grafik

I get a good fit for the single tile damage for our initial test function with
a = 25; k = 0.95; b = 0.043 x DEF
grafik

Now we need to extend this with
route A: similar data for 186 DEF and 1116 DEF (= 1.5 x 744)
for confirming the DEF-dependent b value

route B: data for higher ADR
to see how these curves continue

1 Like

I actually suspect that b increase when def increase as well. In fact, if you think in different way, the slope of second linear actually uneffected by DEF because b x ( ADR - k1) = 0.043 x DEF x ( ADR - k1) = 0.043 x ATK - 0.043 x DEF x k1. The DEF do only effect the start point of second linear. Anyway, both way give equal value.

Could you test at 508 attack vs 372 def ? I want to know if at 40 average will have ±1 or ±2 variance.

1 Like

Just tested 508 ATK gainst 372 DEF:
508/38-42 (An-Windr3-50+20% ATK - 14 data points - 38, 41, 40, 38, 41, 40, 38, 40, 40, 42, 40, 39, 42, 38)

Okay, I think we may be nearly finished for the basic function!

I got 3 more data points as follows:
372 DEF: 3973 ATK/392-422 (combined from 4 heroes - 10 data points [probably not enough to get the variance right] - 408, 419, 392, 419, 422, 401, 413, 400, 421, 413)
372 DEF: 911 ATK/79-80 (Marjana with a bit of costume bonus - only 3 data points [not enough to get the variance right] - 79, 80, 80)
744 DEF: 4929 ATK/316-344 (combined from 5 heroes - 30 data points - 331, 318, 318, 335, 332, 337, 317, 320, 316, 333, 344, 343, 342, 322, 331, 337, 322, 317, 328, 341, 328, 329, 341, 328, 337, 331, 339, 323, 336, 328)

Look at this:
grafik

If we apply our initial test function again with
a = 25; k = 0.95; b = 0.043 x DEF
we get
grafik
This looks like we just need to fine-tune a, b and k :grinning:

1 Like

Thank you. It look like at 40 average damage is the change point of variance from ±1 to ±2.

I hope it is enough to get variance right at 330±14 damage. There is a probability about 13.52% that the actual damage is 330±15 but 315 and 345 damage don’t come out in 30 data.

I also think that it isn’t enough to get the variance right too. There is a probability about 53.52% that the actual damage is 407±16 but 391 and 423 damage don’t come out in 10 data.

I look really good :slightly_smiling_face: I think we need the third linear that start about ADR = 5 but still need more data as well.

Here are these data points (damage is tripled, of course, for comparison) in my tile damage curve:
grafik

In view of this data I think there is no third linear and this simple function can explain my complete tile damage curve, but this still needs some work to check.

So if I add the corresponding curves for a minimum DEF of 146 (Fletcher1-1+4%DEF) and a maximum DEF of approx. 1271 (Richard cb+20 +25% DEF), using a combined max ATK of approx. 5000 they should basically enclose all of the data points.

If my assumption is correct, the curve for 146DEF will be confirmed, and especially the damage in the range of ADR=5 would then be the last nail in the coffin for my Gompertz curve…