User blog:DecuGamer/Math in Knights and Dragons: Part 2: Fights

Hi guys!

You remember part one, right? Now you see second part. I'll talk about Arena and Adventure fights here, and about calculating enemy stats with some informations, too. So let's get started!

Arena and Adventure fights
First, the formula:

Our attack ~= (2,4*level) * (A/ED) * ADV


 * A = Our attack
 * ED = Enemy's defence
 * ADV = Advantage factor:
 * no elements advantage = 0.(6)
 * 1 element advantage = 1
 * 2 elements advantage = 1.(3)

As you can notice, formula is the same like on Epic Boss.

Now, let's talk about adventure enemies. I don't know their level, I need to test it, but for now i believe it's 1. I don't know it's changing with time or no, too. I just need to test it.

But, if we have enemy's attack on us, our attack on him, his and our levels, and our stats, we can calculate his stats easily. This is very useful for calculating adventure enemies' stats.

Calculating enemy stats
I'm pretty sure everyone knows this method, as primary schools are teaching it, but if someone doesn't know it, here it is:

Enemy attack
EA = (2,4*EL) * (EAS/D) * ADV


 * EA - Enemy attack (attack)
 * EL - Enemy level (hero)
 * EAS - Enemy attack (stat) (we're calculating this)
 * D - Our defence
 * ADV - Advantage factor (list of them above)

So if we know all above numbers, except of EAS, we can calculate it:

Let's say that he has level 69, he attacked us for 157 without elements advantage, and our defence stat is 1256.

157 = (2,4*69 = 165,6) * (x/1256 = y) * 0,(6)

We calculated 2,4*69 and we said that x/1256 = y. Now, we can write calculation simplier (in multiplication, we can change place of numbers, so we will change y * 0.6 for 0.6 * y).

165,6 * 0.(6) * y = 157

165,6 * 0.(6) results in 110,4, so 110,4 * y must be 157.

110,4 * y = 157

We need to calculate y now. It's done by 157 / 110,4. His y is 1.422. It's not end of our work. We need to calculate correct attack stat by y * D. We assumed that our defence is 1256, so we just need to multiply 1256 by 1.422.

And...

1256 * 1.422 = 1786!

Enemy's attack is 1786.

Enemy defence
Now, defence. We need to change our formula, because we are now attacking.

A = (2,4*L) * (AS/ED) * ADV


 * A - Our attack (attack)
 * L - Our level (hero)
 * AS - Our attack (stat)
 * ED - Enemy's defence (we are calculating it)
 * ADV - Advantage factor (i believe you know them in that moment of blog post).

Calculates are just the same, we're just using different numbers, so I won't write way of calculating it again.

Let's say we have level 85, we attacked him for 467 with one element advantage, and our attack stat is 1673.

467 = (2,4*85 = 204) * (1673/x = y) * 1

equals

204 * y = 467

so y is 2,29

467/204 = 2,29

and his defence is:

1673/x = 2,29; 1673/2,29 = x = 730,5

His defence is 730 or 731.

End of second part!
Thanks for reading! There will be next parts, for example Kaleidoscopic Math and Enhancing, so stay tuned!