In relation to Hero Equipment and Gem Embedding, I wanted to do a piece on how to balance buffs and debuffs. For that of course, we need some understanding of the “Battle formula”. Now for attack and life this is rather straight forward, something like:
Troops killed = (Life*life buff) / (Attack*attack buff)
But the debuffs factor in in some other way, and I would like one of you to fill me in on how, as I cant get my head around it for some odd reason, while my instincts tell me the math cant be that hard. Problem with debuffs of course is that they cannot reduce attack or life of the enemy to zero. So while 100% attack buff doubles your base attack (+100%), a 100% debuff will not reduce base attack or life to zero. So how does it fit in the equation? My guess from the above here is that buff and complementary debuff do not interact directly, like:
Troops killed =
(Life * (life buff(?)life debuff))
(Attack * (attack buff(?)attack debuff))
But more something like:
Troops killed =
((Life * life buff)/(1+life debuff))
((Attack*attack buff)/(1+attack debuff))
So in short, any help on this would be appreciated. Some time ago, someone either commented here or sent me an email with some info on this stuff, but I cannot find it anymore….Thanks in advance!!!
I haven’t spent any time testing in game, but the formulas other had explained had some pretty big problems which would make them not work if used exactly how they describe. The math below works when considering what others have said to be true.
ModifiedAttack=(BaseAttack*(1+(AttackBuffPercent/100)))/(1+(EnemyAttackDebuffPercent/100))
ModifiedLife=(BaseLife*(1+(LifeBuffPercent/100)))/(1+(EnemyLifeDebuffPercent/100))
Let’s assume a BaseAttack of 100 and an AttackBuffPercent of 20% with an EnemyAttackDebuffPercent of 100%.
In this case, the formula would look like this:
(100 * (1 + (20 / 100))) / (1 + (100 / 100)) = 60
Hope that makes a little more sense for you.
LikeLike
Thanks for offering another explanation. I am sure it will help clarify what is going on for some people.
The problem I have explaining this is keeping straight which buffs or debuffs belong to which Player. For instance, you name one debuff as EnemyAttackDebuffPercent, which could mean my debuff of the enemy’s attack, or it could be the enemy’s debuff of my attack. By the formula, I assume you mean the enemy’s debuff of my attack.
There are 4 instances of this in each battle, not just the two you show. The is my life and my enemy’s, my attack and my enemy’s. They all follow the pattern you describe, though there are other ways of putting the information together.
LikeLike
You’re correct in assuming it’s possessive. It’s the Enemy’s debuff attack percentage.
I feel you’re looking too deep, however. What I don’t know is when the hero stats and base gear stats come into play.
Is the BaseAttack/BaseLife that of the gear your hero is wearing? Is it the attack and life of each troop? If it is of each troop, when do the base attack/life of gear factor in? What about the hero stats? Are the hero stats simply the outlined formula using the gear base stats as the BaseAttack/BaseLife and without factoring in the debuffs? How do hero stats come into play if that’s the case?
Do we have the formula all wrong? In the case of PvP are we to take the hero stats and remove the enemies debuff values to determine the heros modified stats? Then do we use the hero stats to come up with modified troop stats? Do the hero stats even directly interact with troop stats?
Lots of questions I don’t have the answer to.
LikeLike
As I have said, terminology can be very confusing. That is the hardest part of understanding this stuff.
There are attack and life values for each hero. These are modified by hero levels, runes, research, guardian, buffs, etc. I’d call these values the base values.
Gear increases the base by a certain %. The % a piece adds is determined by the gear attributes and by what is known unfortunately as the base value of the gear. This is different from the base value of the hero. Luckily, you can get the sum of attribute and base % from the equipment details button. The gear % is applied after all the other buffs have been applied from everything I have seen. So a troop with an attack of 4 is placed under a hero whose buffs increase that troop’s Attack to 21. With gear that adds 33%, Attack becomes 28.
That’s my understanding, which could be wrong. I will defer saying anything about debuffs until Beardmonkey finishes what he wants to say.
LikeLike
Thats kinda how it is, the gear bonus is multiplicative. Writing article on the subject as we speak
LikeLike
The easiest way to think about the debuffs is this:
100% life debuff leaves 50% life left. How? 100% life/(1+100% debuff) = 50% life.
50% life means you’re effectively hitting twice as hard … 100% as hard.
So, 200% life debuff leaves 1/3rd = 1/(1+2), which also means 3x as hard… which is 200% as hard.
So, life debuff is the same as atk buff, they’re simply multiplied together.
So, try it: Take a base damage of 100. Change your atk by +20%. Change your debuff by +10%. ( (1+20%)) * (1+10%) = 1.20*1.10 = 132% — 132 damage from that change. And to your diminishing returns, 15% atk and 15% life debuff would be better: 1.15 * 1.15 = 132.25. (Marginal on small numbers, of course.)
What it’s _not_ doing is subtracting from the foes life buff or anything like that.
It’s simultaneously easier than it seems and more complex.
LikeLike
Buffs and debuffs are all percentage increases/decreases. Life= life*(1+%gain). A debuff is similar, Life=life/(1+%lost) where Life is after % applied, life without cap before % applied)
Attack is handled the same way.
The battle formula is based on having more life than you opponent has attack, and having more Attack than you opponent has life. You win if Life>Attackg and Attack>Lifeg, where the g denotes the enemy. The critical point is when Life=Attackg.
So if you have life buffs and Attack debuffs, the equation becomes
life*(1+buff)= attackg/(1+debuff)
In this simplified version, life*(1+buff)*(1+debuff)=attackg.
There are some other factors involved, like tier and troop type and etc. I am pretty sure the gear buffs are applied after everything else, though I could be wrong, so those factors go into determining the value of life before the % is applied.
LikeLike
I didn’t understand one thing in your explanation what is “life”?
“life without cap before % applied” – Don’t understand what you mean by those words.
But from what I understand it’s usually better to have debuffs than buffs since they apply over the total and not just the bonus. (30% debuff stat might be equivalent to the opponent losing 100% atk bonus if he had 300% bonus attack)
LikeLike
Oops. Life has a capital L, life without cap was supposed to mean life does not have a capital L. Too hurried writing it out. Anyway, Life incorporates the gear percentages, life does not.
Usually debuffs are better, but only because the gears base is added into buffs. What you want is a balance of them
LikeLike
Thanks mate! Really appreciate this!
LikeLike
Divide with buffs that’s my guess. Eg 75% life buff would mean new life is life/(1+0.75)
LikeLike
Debuf not buff
LikeLike
ah…nevermind my previous comment 🙂
LikeLike
that doesnt make sens, life buff should increase life, no make it smaller….or do you mean debuff??
LikeLike
Im not sure of the exact equation, but i believe the debuff will go so far as to bring buffs to zero (negating gems, gear, bc/sw, and 20% runes) essentially leaving your hero with no atk/def bonus. Im not sure if it will go as far as to negate the standard 20% defense bonus but it would be interesting to find out. Hope this helps
LikeLike
yup, thanks!
LikeLike
Kom has become too complicated.
Have a good day.
>
LikeLike
Noted…haha
LikeLike