Home › Forums › Angry Birds Epic Forum › How stun works › Reply To: How stun works
@kerravon “I presume the game actually processes each attack and calculates whether each attack causes a stun?” Yes, and the mathematical representation of this is that you multiply the probabilities.
Think of it this way. On a single attack, you have two abilities that give a chance to stun – one is a 15% chance, the other is 8%. The abilities trigger independently of each other, so it doesn’t matter which one is calculated first, but we’ll start with the bigger one. A 15% chance means that 15 times out of 100, the first ability stuns the target, and it doesn’t matter whether the second ability triggers or not (because stunning something is binary, i.e. there are only two outcomes: either you stun the target or you don’t). The other 85 times, the first ability doesn’t trigger, but now the second ability comes into play. In 8% of those 85, or 6.8 times, the second ability will trigger. Adding those together, you have 15 + 6.8 = 21.8% chance overall to stun the target.
(Proof that order doesn’t matter: starting with the 8% ability, you have 92 times that the other ability matters, and 15% of 92 is 13.8, and 13.8 + 8 = 21.8% again.)
Going back to my point about this being a binary outcome, the actual math behind this is more complicated. You have to start with a matrix of all possible combinations of outcome. Then, you multiply the A and B probabilities together to find the chance of each of those combinations occurring.
A triggers B triggers A% B% Chance
---------- ---------- --- --- ------
Yes Yes .15 .08 1.2%
Yes No .15 .92 13.8%
No Yes .85 .08 6.8%
No No .85 .92 78.2%
------
Total 100.0%Here we see that there is a 78.2% chance for nothing to happen, and a 1.2 + 13.8 + 6.8 = 21.8% chance to stun the target. The same number we got above, just from a more thorough examination of the problem.
This thorough examination becomes important when you are working with a non-binary outcome, i.e. when the combination of A and B triggering together does make a difference. Instead of stunning, let’s imagine the abilities deal 100 bonus damage, and they can stack with each other. When either triggers alone, you deal 100 bonus damage, and this would happen 13.8 + 6.2 = 20.6% of the time. However, in the 1.2% of the time when both trigger, you would deal 200 bonus damage.