MHB How to factor in critical chance to calculate damage per second?

  • Thread starter Thread starter Tomecide
  • Start date Start date
  • Tags Tags
    Damage Per
AI Thread Summary
To factor in critical chance for calculating damage per second in the video game, the expected damage formula incorporates both regular and critical hits. The expected damage is calculated as the sum of the base damage multiplied by the probability of a regular hit and double the base damage multiplied by the probability of a critical hit. This results in the formula: Damage Per Second equals Attack Animations multiplied by (1 plus Critical Chance) times Base Damage, divided by the total time to perform all attack animations. This adjustment accurately reflects the impact of critical hits on overall damage output. Implementing this formula will provide a more comprehensive understanding of sword effectiveness in the game.
Tomecide
Messages
1
Reaction score
0
Ok so essentially in this video game I have there are certain stats on swords. The stats are the amount of Attack animations, amount of time to compleate all of the attack animations, sword dammage and critical chance. All of the animations deal the same amount of dammage and the time to compleate all of the animations always stays the same (Dammage is done when you attack and attacking causes an animation to happen). Critical Chance has a fixed percentage of chance to occour and if a critical hit is landed, the attack will deal double damage. Sword dammage is fixed and I've figured out a formula to find the amount of dammage a sword can deal a second: Attack Animations * Base dammage / Time to preform all of the attack animations. I'm confident that this formula is correct, because I have tested it. Anyways my question is how can I factor in critical chance to my equation to reresent the stat properly. Thanks!
 
Mathematics news on Phys.org
Tomecide said:
Ok so essentially in this video game I have there are certain stats on swords. The stats are the amount of Attack animations, amount of time to compleate all of the attack animations, sword dammage and critical chance. All of the animations deal the same amount of dammage and the time to compleate all of the animations always stays the same (Dammage is done when you attack and attacking causes an animation to happen). Critical Chance has a fixed percentage of chance to occour and if a critical hit is landed, the attack will deal double damage. Sword dammage is fixed and I've figured out a formula to find the amount of dammage a sword can deal a second: Attack Animations * Base dammage / Time to preform all of the attack animations. I'm confident that this formula is correct, because I have tested it. Anyways my question is how can I factor in critical chance to my equation to reresent the stat properly. Thanks!

Hi Tomecide! Welcome to MHB! (Smile)

When an animation deals damage, the damage dealt is:
\begin{cases}\text{Base Damage} &\text{with probability }1 - \text{Critical Chance} \\
\text{Base Damage} \times 2 &\text{with probability }\text{Critical Chance}
\end{cases}
The expected amount of damage is:
\begin{aligned}\text{Expected Damage} &= (1 - \text{Critical Chance}) \times \text{Base Damage} + \text{Critical Chance}\times \text{Base Damage} \times 2 \\
&= (1 + \text{Critical Chance})\times \text{Base Damage}
\end{aligned}
So the:
$$\text{Damage Per Second} = \text{Attack Animations} \times (1 + \text{Critical Chance})\times \text{Base Damage} \ /\ \text{Time}$$
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Thread 'Imaginary Pythagoras'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Back
Top