Hidden wall damage reduction + chance to kill things.
Sept 2, 2020 16:36:44 GMT
kanue, Iron Duke, and 3 more like this
Post by SolidLight on Sept 2, 2020 16:36:44 GMT
So one of the issues I'm having on my CavCom run is actually understanding the damage formula so that I can try to waste less actions. Action economy is the name of CavCom. If you're not using mobility to its fullest potential on a CavCom run, then you're playing wrong. However it's pretty hard for me to actually know when I can attack without leaving an enemy at like 20 HP and then lose all my momentum. So I'm going to try to calculate a little on that. Skip to the end if you want to just see my conclusions.
So according to Erich von Manstein in this post, the damage formula from what I can understand is:
Attackers atk^2/(Attackers atk + Defenders def), with a fluctuation of 100% to 75% of that value. The number will always be an integer.
Which seems simple enough, but I seriously doubt that after doing some testing. I just tried to attack a wall with 228 def with my 875 attack Saladin in Expedition to Moscow (and later a 211 gate with Attila in the same mission since that's better for one of my experiments). He doesn't have anything that boosts wall damage or anything. According to that formula, his maximum damage SHOULD be 694, and his minimum should be 520. (ET always erases decimals from what I can understand). HOWEVER he somehow managed to low roll WAY under the expected minimum. 419! And no, there wasn't an enemy general with armor master nearby.
And complicating stuff even further. I also tested a little with attacking a 70 def archer with a 868 atk Attila, which DID actually yield results that should be expected from that formula, well, except that I low rolled one time under the minimum by a tiny bit. I rolled 594 when the expected minimum should have been 602, but only one time, and I haven't been able to do it again.
And just to make sure that it's not just the difference in defense that's causing that I tested it against a landslip in Calgary with similar defense to that wall. 212. I got numbers within the expected damage range.
I believe that walls must have a hidden innate -25% damage taken from everything except from artillery from my tests. So it actually seems like artillery does about 400% damage, not 300% against walls compared to other units without a damage multiplier. And that formula might be mostly correct since attack and defense act as expected, but the minimum value might be even lower. If I expect that the average damage I got while attacking that archer was the true average damage. Then the fluctuation should be 68% to 100%, but I doubt that. ET likes clean numbers when it comes to their formulae from what I can see, more likely is it that I got slightly unlucky and that the fluctuation is 70% to 100%.
Or...... the formula is 100% wrong. Hope that's not the case since I really don't want to do a million tests to find that out. I might try it if I feel like it since I don't fully trust the formula.
That hidden damage reduction on walls was just a peculiarity I stumbled across when I was testing the formula to verify it. If you seriously want to check it yourself, then there's a Landslip early on in Calgary that has 212 defense, and a gate in Expedition to Moscow that has 211. There's likely other places you can compare that, but those are the ones I decided to use in this experiment. You will hit the wall for less damage than the landship when you don't have any modifiers against either unit type.
Anyway, what I actually wanted to find out is the chance of killing something in one attack and whether or not there's an easy rule to live by so that I don't have to calculate every single time time I'm unsure.
So what are the things that can affect the damage? Well, three things: Attack and defense, the crit modifier, and damage modifiers against certain units. There’s also hit and evasion, but I have absolutely no clue how evasion works. I think I’ll just ignore it since I think that you should be able to hit nearly any enemy guaranteed as long as you have a crown on your general at the very least.
Let’s theorycraft a little bit. If I’m hitting an enemy for 800 atk and they have 50 def and 700 HP. No damage modifiers against it. What’s the odds of me killing it in one hit? Well, the max-value you can get is 752, and the minimum value would be 526. We need to roll higher than or 700. What’s the odds of that? Well, there’s 53 possible integers we want to roll, and 227 in total. Divide like that and you’ll get about 23% odds to kill the enemy. However, if you crit, you’ll do +20% damage (if you don’t have any items). When you crit, you’ll suddenly roll any integer from 632 to 903. We want to roll an integer higher than or 700. There’s 204 desireable integers, and 272 in total. Roughly 75% to kill if you crit. The total chance to kill the enemy is (5%*75%)+(95%*23%) = roughly 26%. So yeah, not good odds to kill that unit. You can kill it guaranteed if he had 526 HP.
What would be a formula for the odds of killing an enemy in one hit?
Well, here you go, just plug in the formula for damage now that you know how it is:
(MaximumDamageNonCrit-EnemyHP+1)/(MaximumDamageNonCrit-MinimumDamageNonCrit+1)*Chance to not crit*other damage multipliers+ (MaximumDamageCrit-EnemyHP+1)/(MaximumDamageCrit-MinimumDamageCrit+1)*CritChance* = Odds to kill the enemy.
Tell me if I screwed up it or anything. I’m not that good at math afterall. And no one is going to use that formula in practice. In fact, I’d say just ignore that entire portion about crit damage unless you actually have really high crit chance, like 20% or higher. But I’ve still learned a little from this endeavor:
1. Walls and Towers have a hidden -25% damage taken from everything except artillery. And no, Mahout and Phalanx does not seem to ignore this damage reduction. This finally explains why I’ve always seemed to hit walls less hard than units.
2. Calculating the individual impact of each point of defense is quite tough since it goes hand in hand with attack. What you CAN actually do to find out whether or not you can kill something is to divide your minimum damage with your attack. Then divide the enemy HP with your result. What you should have is the required attack to have a 100% chance at killing the enemy. A good rule to live by if you don’t want to calculate things that you want atleast an attack stat that is higher than the enemy HP + 2x their defense if their defense is 300. If they have less than that, you want an attack that is higher than their HP + 2x their defense. If they have higher than that, you can get away with slightly less than that.
3. Oh and if you have a damage multiplier against a certain unit type, you just multiply your max damage with your multiplier and then work from there.
4. + Crit damage sucks. This is because even if it can allow you to kill things you otherwise wouldn’t have; it’s still limited by the crit chance being so low. Attack and + crit chance is superior. And +crit chance is a bit iffy since you usually get so low + crit chance from items or set bonuses.
5. All this isn’t that important for most players, but for CavCom players, it’s very important to know whether or not you have a good chance at killing enemies since leaving an enemy at 20 HP can be devastating. You can also use this to judge whether or not it’s worth trying to reset the first turn to roll favorably against a certain enemy if you can kill it but isn’t guaranteed to.
6. Don’t fully trust this. I don’t know 100% about how things work, this was done with my limited knowledge about the game and through a bunch of experiments. And I'm no math genius. I like working with it, but I'm not terribly good at it, so tell me if there's a bunch of mistakes I've made.
So according to Erich von Manstein in this post, the damage formula from what I can understand is:
Attackers atk^2/(Attackers atk + Defenders def), with a fluctuation of 100% to 75% of that value. The number will always be an integer.
Which seems simple enough, but I seriously doubt that after doing some testing. I just tried to attack a wall with 228 def with my 875 attack Saladin in Expedition to Moscow (and later a 211 gate with Attila in the same mission since that's better for one of my experiments). He doesn't have anything that boosts wall damage or anything. According to that formula, his maximum damage SHOULD be 694, and his minimum should be 520. (ET always erases decimals from what I can understand). HOWEVER he somehow managed to low roll WAY under the expected minimum. 419! And no, there wasn't an enemy general with armor master nearby.
And complicating stuff even further. I also tested a little with attacking a 70 def archer with a 868 atk Attila, which DID actually yield results that should be expected from that formula, well, except that I low rolled one time under the minimum by a tiny bit. I rolled 594 when the expected minimum should have been 602, but only one time, and I haven't been able to do it again.
And just to make sure that it's not just the difference in defense that's causing that I tested it against a landslip in Calgary with similar defense to that wall. 212. I got numbers within the expected damage range.
I believe that walls must have a hidden innate -25% damage taken from everything except from artillery from my tests. So it actually seems like artillery does about 400% damage, not 300% against walls compared to other units without a damage multiplier. And that formula might be mostly correct since attack and defense act as expected, but the minimum value might be even lower. If I expect that the average damage I got while attacking that archer was the true average damage. Then the fluctuation should be 68% to 100%, but I doubt that. ET likes clean numbers when it comes to their formulae from what I can see, more likely is it that I got slightly unlucky and that the fluctuation is 70% to 100%.
Or...... the formula is 100% wrong. Hope that's not the case since I really don't want to do a million tests to find that out. I might try it if I feel like it since I don't fully trust the formula.
That hidden damage reduction on walls was just a peculiarity I stumbled across when I was testing the formula to verify it. If you seriously want to check it yourself, then there's a Landslip early on in Calgary that has 212 defense, and a gate in Expedition to Moscow that has 211. There's likely other places you can compare that, but those are the ones I decided to use in this experiment. You will hit the wall for less damage than the landship when you don't have any modifiers against either unit type.
Anyway, what I actually wanted to find out is the chance of killing something in one attack and whether or not there's an easy rule to live by so that I don't have to calculate every single time time I'm unsure.
So what are the things that can affect the damage? Well, three things: Attack and defense, the crit modifier, and damage modifiers against certain units. There’s also hit and evasion, but I have absolutely no clue how evasion works. I think I’ll just ignore it since I think that you should be able to hit nearly any enemy guaranteed as long as you have a crown on your general at the very least.
Let’s theorycraft a little bit. If I’m hitting an enemy for 800 atk and they have 50 def and 700 HP. No damage modifiers against it. What’s the odds of me killing it in one hit? Well, the max-value you can get is 752, and the minimum value would be 526. We need to roll higher than or 700. What’s the odds of that? Well, there’s 53 possible integers we want to roll, and 227 in total. Divide like that and you’ll get about 23% odds to kill the enemy. However, if you crit, you’ll do +20% damage (if you don’t have any items). When you crit, you’ll suddenly roll any integer from 632 to 903. We want to roll an integer higher than or 700. There’s 204 desireable integers, and 272 in total. Roughly 75% to kill if you crit. The total chance to kill the enemy is (5%*75%)+(95%*23%) = roughly 26%. So yeah, not good odds to kill that unit. You can kill it guaranteed if he had 526 HP.
What would be a formula for the odds of killing an enemy in one hit?
Well, here you go, just plug in the formula for damage now that you know how it is:
(MaximumDamageNonCrit-EnemyHP+1)/(MaximumDamageNonCrit-MinimumDamageNonCrit+1)*Chance to not crit*other damage multipliers+ (MaximumDamageCrit-EnemyHP+1)/(MaximumDamageCrit-MinimumDamageCrit+1)*CritChance* = Odds to kill the enemy.
Tell me if I screwed up it or anything. I’m not that good at math afterall. And no one is going to use that formula in practice. In fact, I’d say just ignore that entire portion about crit damage unless you actually have really high crit chance, like 20% or higher. But I’ve still learned a little from this endeavor:
1. Walls and Towers have a hidden -25% damage taken from everything except artillery. And no, Mahout and Phalanx does not seem to ignore this damage reduction. This finally explains why I’ve always seemed to hit walls less hard than units.
2. Calculating the individual impact of each point of defense is quite tough since it goes hand in hand with attack. What you CAN actually do to find out whether or not you can kill something is to divide your minimum damage with your attack. Then divide the enemy HP with your result. What you should have is the required attack to have a 100% chance at killing the enemy. A good rule to live by if you don’t want to calculate things that you want atleast an attack stat that is higher than the enemy HP + 2x their defense if their defense is 300. If they have less than that, you want an attack that is higher than their HP + 2x their defense. If they have higher than that, you can get away with slightly less than that.
3. Oh and if you have a damage multiplier against a certain unit type, you just multiply your max damage with your multiplier and then work from there.
4. + Crit damage sucks. This is because even if it can allow you to kill things you otherwise wouldn’t have; it’s still limited by the crit chance being so low. Attack and + crit chance is superior. And +crit chance is a bit iffy since you usually get so low + crit chance from items or set bonuses.
5. All this isn’t that important for most players, but for CavCom players, it’s very important to know whether or not you have a good chance at killing enemies since leaving an enemy at 20 HP can be devastating. You can also use this to judge whether or not it’s worth trying to reset the first turn to roll favorably against a certain enemy if you can kill it but isn’t guaranteed to.
6. Don’t fully trust this. I don’t know 100% about how things work, this was done with my limited knowledge about the game and through a bunch of experiments. And I'm no math genius. I like working with it, but I'm not terribly good at it, so tell me if there's a bunch of mistakes I've made.