Programming Pokémon Showdown Damage Calculator

Hello!
I tried importing saved sets but some of the IVs were wrong. I corrected the values in the calculator, exported it, cleared the imported sets and tried to import it again resulting in the same wrong IVs. Am I doing something wrong (I only just started using the Damage Calculator)?
wrong imported IVs.png
 
Heracross set (UU Showdown Usage) has the ability moxie preselected with a flame orb held. I have a feeling this is not the standard UU set.
 
Heracross set (UU Showdown Usage) has the ability moxie preselected with a flame orb held. I have a feeling this is not the standard UU set.
that's just how the showdown usage-based sets work, it just looks at the most commonly used ability and item and moves and uses that. there is no standard uu set for heracross because no one uses heracross in uu
 
Not sure if this was an error with the random battles calc or a case of actual cheating/hacking, but only dealt 44.6% with my Persian's Foul Play to a Meloetta; according to the calc it should have done between 55.7 to 66.4%
Calc: Lvl 93 84 Atk Life Orb Persian Foul Play vs. Lvl 82 84 HP / 84 Def Meloetta: 166-198 (55.7 - 66.4%) -- guaranteed 2HKO
Replay (turn 44): https://replay.pokemonshowdown.com/gen9randombattle-1884138853-mirw636xrtbb6m8sdcmzwzjtitlaxj7pw
Random Battles EVs work as follows:
All Pokemon have 85 EVs in every stat with a neutral nature, unless 0 Atk EVs/IVs and 0 Spe EVs/IVs would be beneficial. In these cases, the rest of the EVs are still 85 and the nature is still neutral.
This result is likely because the Meloetta set you had in that game did not have any physical moves, meaning that it should have had 0 Atk EVs and IVs, giving the following calc:
Lvl 93 0 Atk Life Orb Persian Foul Play vs. Lvl 82 84 HP / 84 Def Meloetta: 127-151 (42.6 - 50.6%) -- 1.2% chance to 2HKO
The Random Battles calculator however, will always set the IVs to 31 and the EVs to 84 in every stat. You will need to change the EVs/IVs manually in this case.

Would the calc please be fixed in regards to Body Press not increasing in damage when there's a defense increase with Proto/Quark? Thank you.
I believe that Body Press currently behaves correctly in the calculator with respect to Protosynthesis/Quark Drive. Aside from stat stage changes (from moves such as Swords Dance, Iron Defense, etc), Body Press damage is typically modified by Attack-increasing effects (such as Huge Power and Choice Band) and is not modified by Defense-increasing effects (such as Fur Coat, Eviolite, and Snow). Body Press damage is increased by Protosynthesis/Quark Drive when those abilities increase Attack, not when they increase Defense.
Citation 1
Citation 2
 
Moves that lower the user's offensive stats like Superpower or Leaf Storm have that option because they get weaker when used consecutively.
It literally goes like this: "The user attacks the target with great power. This also lowers the user's Attack and Defense stats." A move lowering stats does not make a move gain power after each use.
 

Ehmcee

A Spoopy Ghost
is a Pre-Contributor
It literally goes like this: "The user attacks the target with great power. This also lowers the user's Attack and Defense stats." A move lowering stats does not make a move gain power after each use.
They have the flag so you can calculate the damage of the move used consecutively, instead of calcing the neutral hit, than calcing again for the -1 hit, then adding them together. If you put "twice", it calculates for the neutral hit and the -1 hit together.
 
Hi. Apparently the calculator doesn't show chip damage taken through Rough Skin/Iron Barbs/Rocky Helmet on contact moves, though it does show damage taken through self-inflicted recoil (e.g.: Flare Blitz, Wave Crash, etc). Are there any plans to add this?
 
Neutralizing gas in the calc is not properly cancelling power raising abilities like guts and sheer force and thus is not showing the correct damage calc
 

GenOne

DOU main. GMT-7. PS!: GenOne
is a Community Contributoris a Site Content Manager Alumnusis a Forum Moderator Alumnusis a Top Tiering Contributor Alumnusis a Contributor Alumnus
Palafin is a commonly used DOU mon (among other tiers) and the sample sets written for it only load for its base form, not the Palafin-Hero form it transforms into later in the match.

This is cumbersome when trying to run damage calcs for Palafin's targets, because you should almost always be in Palafin-Hero form by the time you're attacking foes for meaningful damage. Edit: and also Palafin-Hero has more bulk which has implications for calc'ing hits against it as well.

I know in past tiers Aegislash, a Pokemon that frequently alternates between Aegislash-Shield and Aegislash-Blade, just had the same sample sets duplicated for both formes in the calc. Can the same be done for Palafin?

View attachment 490549
Just bumping this as I flagged this 5 months ago and still hasn't been looked into or at the very least been acknowledged. Palafin is a Tier 3 Pokemon in Doubles OU so this is actually pretty important imo. Thanks in advance!
 
Fwiw, you can still change the forme of Palafin in the calc to Palafin-Hero. Its stats will change and the calc will change correspondingly.

1688791484107.png


However, I've still made an issue on the GitHub repo so that someone (be it me or somebody else) can address it.
 
Just want to start off - I don't post here much - but I am in total awe of the tools and systems that key members of the Smogon community have created. The level of intelligence, coding skill and effort is staggering - no other game series I play or have seen has such a robust community producing commercial level products like Showdown and Pikalytics.

Thank you all so much in producing this - hats off to you all and hope that you see great success in your personal lives worthy of the immense level of talent you display here.

With that said ;) - I've found a mismatch between the damage calculator as opposed to following the formula. (I'm sure I've got it wrong on my end)

I've got a spreadsheet which I use to calc damage when doing team planning for Battle Competition doubles. I follow the damage formula and its right MOST of the time, but there are the odd situations where the calcs are off by 1 or 2 damage points when targeting multiple pokemon. Like so:

Damage Calculator (both mon are level 50):

252+ SpA Typhlosion-Hisui Eruption (150 BP) vs. 0 HP / 0 SpD Muk-Alola: 100-118 (55.5 - 65.5%) -- guaranteed 2HKO

Following the damage formula in Google Sheets (and assuming the "PokeFloor" decimal removal that the damage formula USUALLY uses):

2*Level: 2*50 = 100
Divided by 5: 100/5 = 20
+2: 20+2 = 22
*Power: 22*150 = 3300
*Attack: 3300*188 = 620400
/Defense: 620400/120 =5170
/50: 5170/50 = 103
+2: 103+2 = 105

Now for our end of formula mods:

Target Mod: 105*0.75 = 78
Weather Mod: 78*1 = 78
Critical Mod: 78*1 = 78
Random Mod: 78*1 = 78 OR 78*0.85 =66
Stab Mod: 78*1.5 =117 OR 66*0.85 =99
Type Mod: 117*1 = 117 OR 99*1 =99
Burn Mod: 117*1 = 117 OR 99*1 =99
Other Mod: 117*1= 117 OR 99*1 =99

End result when following manually: 99 - 117
End result from damage calculator: 100-118 - only a point below but really curious about the difference.

Only thing I can think that might be wrong is the Target Mod - when this is set to 1 the damage calculations match. Is the calculation something different to *0.75? 105*0.75 is 78.75 - is the modifier not floored on this occasion?

Again not a consistent problem across the dex - most mon don't have this problem - just the odd one here and there - Slither Wing and Altaria also have this issue and sometimes disappears when the defending mon has a higher Defensive EV investment.
 
I think that Stakeout should be toggleable in the middle because if you're in doubles it would be a factor for Pokémon who don't have the ability. Thanks for your awesome work!
 
I'm not sure why the github lacks gen-9 compatibility and yet the actual damage calculator itself seems to work just fine.
 
I'm not sure why the github lacks gen-9 compatibility and yet the actual damage calculator itself seems to work just fine.
That's because the npm package hasn't been updated to support gen 9 Pokemon. However, the calc just uses the source code that it shares the repository with, and not the npm package.
 

Aqua Jet

Boba Bitch
is a Contributor to Smogonis a Community Contributor Alumnus
Revelation Dance is implemented incorrectly. After Tera, it fuctions as a more powerful Tera Blast that will always remain a special move. However...
+1 0 SpA Oricorio-Sensu Revelation Dance vs. 252 HP / 0 SpD Vessel of Ruin Ting-Lu: 33-40 (12.5 - 15.2%) -- possible 7HKO Copied
+1 0 SpA Tera Fighting Oricorio-Sensu Revelation Dance vs. 252 HP / 0 SpD Vessel of Ruin Ting-Lu: 33-40 (12.5 - 15.2%) -- possible 7HKO Copied

The correct calc can only be obtained by changing Oriocorio's typing manually.
 
Revelation Dance doesn't work properly with Tera in the calc; it just doesn't recognize the typing change also changing Revelation Dance's. Unsure if intended or not.
Revelation Dance is implemented incorrectly. After Tera, it fuctions as a more powerful Tera Blast that will always remain a special move. However...
+1 0 SpA Oricorio-Sensu Revelation Dance vs. 252 HP / 0 SpD Vessel of Ruin Ting-Lu: 33-40 (12.5 - 15.2%) -- possible 7HKO Copied
+1 0 SpA Tera Fighting Oricorio-Sensu Revelation Dance vs. 252 HP / 0 SpD Vessel of Ruin Ting-Lu: 33-40 (12.5 - 15.2%) -- possible 7HKO Copied

The correct calc can only be obtained by changing Oriocorio's typing manually.
Fixed
 
Clicking to copy a calc with a visible boost like Power Spot or Battery adds an extra space between the boost, but the spaces are correct in the description shown otherwise. These are some examples I have copied directly.

Code:
252+ SpA Abomasnow  Battery boosted  Power Spot boosted Blizzard vs. 248 HP / 8 SpD Abomasnow: 298-352 (77.8 - 91.9%) -- guaranteed 2HKO

+1 252 Atk Pixilate Tera Fairy Altaria-Mega  Power Spot boosted Double-Edge vs. 252 HP / 252 Def Tera Ghost Heracross-Mega: 390-460 (107.1 - 126.3%) -- guaranteed OHKO
 

Users Who Are Viewing This Thread (Users: 1, Guests: 5)

Top