# Facebook Heroes of Kung Fu Knights Mathematics

Mathematics of Kung Fu Knights by deathvonduel

1. HP
HP=((baseHP+HPgrowth*(lvl-10))*(1+HP%)*(1+con*.01)+EquipHP)*(1+equiplvlHP)
where HP% include all % boost of HP from equips and stones etc, except the equiplvlHP which is gotten from lvled gears(lvl 9 armor, for example, give 4% boost there)  and of course con boost is calculated elsewhere.  EquipHP means the constant boosts from armor, such as +17 HP on some chest piece etc.

2. MP
MP=(baseMP+MPgrowth*(lvl-10))*(1+MP%)*(1+con*.01)+EquipMP
same as HP, except u don’t have effect from upgraded gears.

info on 2 and 3–baseHP, baseMP, HP growth and MP growth
dest 231 348 9 6
def 249 368 11 6
mys 222 468 8 9
duel 240 348 10 6
assa 231 348 9 6

3. ATK
the max and minimal is calculated seperately.
atk=weaponATK*(1+ATK%)*(1+str*Smodifer+agi*Amodifer)+equipATK+baseATK
very very similiar to HP and MP, same rules and what not.  Only real difference, there is a modifer for str and agi, and they are different from class to class(or rather, weapon category to weapon category) The baseATK is a funny value, it is equal to the minimal atk you have while you are naked, but if u r naked, it is baseATK~2*baseATK for your attack…. but the thing is, it’s always the baseATK(the smaller value) when u use the formula, for both max and min calculation.
There is one thing to note thou, both the +weapon attack stat on weapons AND the stone that +weapon attack, they add… well, weapon attack. So those stats are much more powerful than the equipATK stuff on armors, as they DO enjoy the str/agi/atk% stuff’s boost. With that said, the variable weaponATK is the sum of the base weapon attack and those “+weapon attack” bonuses.
Ok, now info chart: Smodifer,Amodifer
spear: .3%, .1%
sword: .2%, .2%
dagger: .1%, .3%

4. character stats(str, agi, con)
first, the growth for str, agi and con respectively
newbie 1        1        1
dest 1.5     0.5       1
def 1.25    0.5       1.25
mys 0.75    0.75      1.5
duel 1       1.25      0.75
assa 1       1.5       0.5
Note that this is before the free distribution point. you have a total of lvl-1 points at your disposal. (lvl 60 have 59 points)
amazingly, the base stat for all classes are same, that is 19 (at lvl 10) so your stat would be 19+growth*(lvl-10)+freepointspent.  Of course, how much this “freepointspent” is on each of ur stat is completely up to you.
Full agi assassin at lvl 67 for example(me)
19+57*1.0+00=76
19+57*1.5+66=170
19+57*0.5+00=47
Oh yes, always round down.
Now, you might noticed a lot of lvl-10 in section 1,2 and 4. that’s because your class is choosen at that lvl, so that is where base stat is based off of. Therefore, it is always base+growth*(lvl-10) for whatever it is.

5. dmg output.
well…. now that we know atk, what is your dmg output? frankly, different skills etc can have different output, and against different players, the output changes.  But let’s calculate a rough value anyway(you can use some standard number for “enemy” values, for example, you can assume enemy armor to be like 30% or somehting)

Note: this formula is imagining enemys at same lvl, for each lvl difference, reduce hit, crit and break by ~2%(if anyone know the exact level suppression somehow, do tell me)
(DoT+ATK*(1+crit%*critDMGboost)*(1-enemyDEF)*(1+breaking%/(1-enemyDEF))*skillModifer)*min(1+hit%-ENEMYdodge%-5%,100%)/attackCooldown
Notes: normally, critDMGboost is .5, so that part is 1+crit%*.5 but…. assassins and in the future some other classes can modify that… so yeah. What does min(1+hit%-ENEMYdodge%-5%,100%) mean? it means the minimal number between 1+hit%-ENEMYdodge%-5% and 100%…. u can’t really use more than 100%

Ok, a few notes on different skills. Dot skills, you just add the bleed, burn etc amount in, it is not affected by def, break, crit, but by hit and stuff. For evascriate, use 40%*(max+min)  Don’t ask how I got that, it’s not exact, but close to correct.  Deathwish works in similiar ways, 40%*(max+min) as an attack boost constant.  For skills that do not boost a % atk but a constant, just add that to ATK count and just out 1 as skillModifer.  Now, for skill that modify your attackspeed or count, you need to put that into either attackCooldown or as skillModifer(for example, attack twice at 60% dmg each time is 120% total as modifer)   There are other painful stuff, for example, paralyze skill, although technically you could just reduce emeny therotical dodge, but…. it’s possible that they dodge twice in a row and the skill is not applied at somepoint. Usually, apply 100% of the dodge reduction if enemy dodge is below 20%, 90% if their dodge is below 35%, 80% if below 50%, apply 70% if below 60% dodge.(note this dodge I mean w/o considering the skill) berserker is so much nicer as it just adds to hit~~~ now, more stuff, for example, the dismantle skill. For this, you will have to consider the enemy’s shield %, the extra boost is to multiply a 2nd skill modifer that is 1/(1-shield%) after the whole equation.  Now, next order of business, damage reflect.  That, you can just add the % times your HP*.9 as extra overall dmg, not dps…. just extra overall. Note that the .9 is used because the last .1 is probably killed off in last hit(if they beat u) and well…. that don’t cause reflect.  at same time, the exact amount don’t matter that much if u win within 90% hp loss anyway.  Note, apply the hit formula to this dmg reflect dmg IF your skill require hit to cause effect. but errr….. that one is a +constant reflect…. just errr think of the battle as 160 second and do ur work~~~ meh….  Rest of the skills, use ur imagination.

6. growth powers
certain effect get more/less powerful as you get more.  For example, constitution. at 0 con, each gives of course 1% boost. but if you have 100 con already, it becomes 201/200 which is .5% of a boost. and if ur con is 200, 300,400 etc, it is .33%, .25%, .2% and so on and so forth.  With that said, con effect is less powerful at higher amount(and 300 is quite possible for high lvl mys or def class)  This is kinda true for other boosts such as str’s atk boost, and HP% etc.   However, those usually are kept under 100% extra, so the boost reduction per point is slower.   A interesting thing related to this is crit and break. it is better to have a balance of both(if break is about same extra damage the crit, if one is lot higher than other, then have a lot of the higher one is better of course) because for example, 10% crit and break compared to 20% crit, the latter gives 10% extra dmg where the former gives 1.8%+.225%(in crit break)  The exact calculation is simple, you can try it out.

Now, on another note, something quite different: dodge.  Dodge becomes stronger as it builds up, as opposed to con. At 0% dodge, each % dodge reduce dmg taken by 1%.  At 50% dodge, howerver, each % will give you 2% dmg reduction as 49/50 is same as 98/100.  DEF works in same way, the higher it is, the more powerful each bit becomes.

Others:
I will add as new topic arise, but here is one right now.

The Emerald trap.

Emerald, while upgrading gears at high lvl, is very very important of course. However, it is not needed at 6 to 7 upgrade!! This is kinda of a trap as this is the first lvl where there is a lvl drop if fail. Now, here is anaylsis.

First of all, what is the cost of 5 to 6?  It is 12/.8=15 This is gotten from the series sum of 12+12*.2+12*.2^2+12*.2^3…. which is 12*(1-.2^9999999)/(1-.2)=15
Ok, now that we got that, we can know this fact, on avarge, if you fail on 6 to 7 and did NOT use an emerald, you would have to pay(again, on avarage) 15 points/gold to get back to 6, which is essentially same effect as using an emerald, same cost too.  However, if you do not fail, it only cost 12 to upgrade as opposed to the emeralded 12+15=27!!! so on fail, same cost. On success, you save 15 points/gold.  Therefore, you are saving if you DO NOT use emerald on 6 to 7
of course, because the drop is to lvl 1 if you fail on 7 to 8 or 8 to 9, those ones will HAVE TO use emerald or you will cry in a little corner.