For convenience, I built my own calculator in a spreadsheet a while back but I've never been able to exactly match showdown's calcs. The min and max rolls will always be extremely close but a little bit off. My calculator is linked here (I've left this sheet open for edits so you can change things). I've looked through the showdown github to try to find the exact damage formula used but I'm not really a programmer and kinda got lost in all the text.
The spreadsheet is pretty basic. You enter the values for the variables in the blue cells, like STAB, boosts, etc, and the offensive and defensive stats for each mon and it gives you a min and max roll. I just can't get my min/max to match showdown's results.
Would anyone be able to check out my calculator and help me find out what is making my results slightly off? I feel like it has to come down to rounding somewhere and I've triple checked everything twice. The formula I'm using to get a damage percentage is shown below. This is getting me the results I show in the example below.
=(FLOOR.MATH(FLOOR.MATH(FLOOR.MATH(2*100/5+2)*BasePower*Attack/Defense)/50)+2)*Modifier/HP
Where the showdown calc gives this:
252+ SpA Life Orb Triage Charizard-Mega-Y Oblivion Wing vs. 252 HP / 252 SpD Kartana: 320-376 (99.3 - 116.7%) -- 87.5% chance to OHKO
My calculator gives the min roll as 99.0% and max roll as 116.5%.
The spreadsheet is pretty basic. You enter the values for the variables in the blue cells, like STAB, boosts, etc, and the offensive and defensive stats for each mon and it gives you a min and max roll. I just can't get my min/max to match showdown's results.
Would anyone be able to check out my calculator and help me find out what is making my results slightly off? I feel like it has to come down to rounding somewhere and I've triple checked everything twice. The formula I'm using to get a damage percentage is shown below. This is getting me the results I show in the example below.
=(FLOOR.MATH(FLOOR.MATH(FLOOR.MATH(2*100/5+2)*BasePower*Attack/Defense)/50)+2)*Modifier/HP
Where the showdown calc gives this:
252+ SpA Life Orb Triage Charizard-Mega-Y Oblivion Wing vs. 252 HP / 252 SpD Kartana: 320-376 (99.3 - 116.7%) -- 87.5% chance to OHKO
My calculator gives the min roll as 99.0% and max roll as 116.5%.