Programming Pokémon Showdown Damage Calculator

1708610958616.png


Well... this is a decieving calc... because shadow ball act does

+1 252 SpA Iron Valiant Shadow Ball vs. 0 HP / 4 SpD Gholdengo: 266-314 (84.4 - 99.6%) -- guaranteed 2HKO

And can never kill a gholdengo from full hp but since quark drive is defaulted to "auto-select" it def is trying to confuse some people. Witnessed it first hand in tour games and on ladder several times. What should prob happen is it should default to having no boosts... as very few pokemon benefit from smth like fiery dance moth -> elec terrain happens and now you havq quark drive special attack.

If it defaulted to the stats at +0 this allows you to calc quickly and make sure that you have the right thing as in tense moments like tours this may be something you overlook and something that can prob cost you the game since its telling you are doing more dmg than you can.

If you want to auto check it then you can just set it to +special attack like in doubles where an electric terrain teammate may come in after while you are on the field boosted...
 
I have a question that may be weird. I was looking through the github trying to find where the calculator decides to go for a 4HKO, 3HKO, 2HKO odds, etc.

I'm very new to coding and was curious to see a simple way of doing this type of thing. Can someone point to me where it is in the github?
 
I have a question that may be weird. I was looking through the github trying to find where the calculator decides to go for a 4HKO, 3HKO, 2HKO odds, etc.

I'm very new to coding and was curious to see a simple way of doing this type of thing. Can someone point to me where it is in the github?
should be here
 
These two parts specifically aren't properly integrated into the calc extension for Gen 1: " RBY features only a single move that raises Speed in Agility, which is found on many Pokémon, particularly the legendary birds. Thanks to the way the game handles boosting stats, Agility completely cures the Speed drop inflicted by paralysis upon use". This does not show in the Calcdex, which was very confusing because I would be going against a paralyzed Zapdos with agility and be told I was faster even when I wasn't. There's also this: "Paralysis, along with burn, is subject to the stat reapplication glitch. This means that, if the opposing Pokémon uses a stat-raising move like Swords Dance, the stat drop of your Pokémon's status is reapplied. For example, if a Starmie with 328 Speed were to be paralyzed, it would first drop to 82 as normal. If an opposing Kabutops were to use Swords Dance, though, it would drop further to a mere 20 Speed". Once again there would be times where I made choices based on what Calcdex said that were misleading. You can read more here: https://www.smogon.com/rb/articles/rby_speed
 
Grassy seed (presumably other seeds) give boosts in the terrain but do not reduce knock off damage
252 Atk Choice Band Weavile Knock Off (97.5 BP) vs. +1 252 HP / 0 Def Grassy Seed Prism Armor Necrozma: 222-262 (55.7 - 65.8%) -- guaranteed 2HKO after Grassy Terrain recovery (note the base power listed)
 
Want to remention that Neutralizing Gas doesn't seem to be affecting certain Abilities. Was mentioned in some earlier posts but didn't see a mention of it in reply.

Kingambit against NG
252+ Atk Supreme Overlord 3 allies fainted Kingambit Iron Head vs. 252 HP / 80+ Def Weezing-Galar: 278-330 (83.2 - 98.8%) -- guaranteed 2HKO
1710460909410.png

Kingambit against Levitate
252+ Atk Supreme Overlord 3 allies fainted Kingambit Iron Head vs. 252 HP / 80+ Def Weezing-Galar: 278-330 (83.2 - 98.8%) -- guaranteed 2HKO
1710460955175.png
 
These two parts specifically aren't properly integrated into the calc extension for Gen 1: " RBY features only a single move that raises Speed in Agility, which is found on many Pokémon, particularly the legendary birds. Thanks to the way the game handles boosting stats, Agility completely cures the Speed drop inflicted by paralysis upon use". This does not show in the Calcdex, which was very confusing because I would be going against a paralyzed Zapdos with agility and be told I was faster even when I wasn't. There's also this: "Paralysis, along with burn, is subject to the stat reapplication glitch. This means that, if the opposing Pokémon uses a stat-raising move like Swords Dance, the stat drop of your Pokémon's status is reapplied. For example, if a Starmie with 328 Speed were to be paralyzed, it would first drop to 82 as normal. If an opposing Kabutops were to use Swords Dance, though, it would drop further to a mere 20 Speed". Once again there would be times where I made choices based on what Calcdex said that were misleading. You can read more here: https://www.smogon.com/rb/articles/rby_speed
Showdex dev here, this is actually a bug on our end lol since we copied Showdown's code and modified it to calculate the final stats ourselves. We weren't aware of that mechanic and all the unique caveats. That is way more complicated than I ever could have imagined, wow! I tried testing it out myself and I was surprised that the tooltip actually reports the incorrect speed as well if you Agility before getting paralyzed. I used Agility then got paralyzed, and it reported my speed stat as 452 in the tooltip. But the next turn, my opponent moved first, which means my speed actually wasn't 452, it was probably 112 (cause the paralysis debuff was still being applied).

We'll have to consult with someone who understands RBY a lot better than we do and see how we could potentially fix it. The stat reapplication glitch makes it more complicated too, so we're hoping there's a simpler fix we can implement. Thanks for the heads-up, we'll be looking into it!
 
Grassy seed (presumably other seeds) give boosts in the terrain but do not reduce knock off damage
252 Atk Choice Band Weavile Knock Off (97.5 BP) vs. +1 252 HP / 0 Def Grassy Seed Prism Armor Necrozma: 222-262 (55.7 - 65.8%) -- guaranteed 2HKO after Grassy Terrain recovery (note the base power listed)
Fixed.
 
Hey new to the forums so I don't know if anyone else is having these issues but my showdown calculator is showing the second mon on the right as vertically under the first for some reason. It doesnt have this issue with the randbats calculator for some reason, just the usual 1v1. I use OperaGx browser
 

Attachments

Nashrock

be happy
is a Social Media Contributoris a Forum Moderatoris a Community Contributoris a Tiering Contributoris a Contributor to Smogon
1710813359315.png

we just did a test to confirm that grassy glide is buffed to 60bp by tera without terrain, but for now the calc doesn't automatically update it from 55 to 60 when you de-select terrain
 

jetou

is a Programmeris a Forum Moderatoris a Battle Simulator Moderatoris a Community Contributor Alumnus
Moderator
View attachment 616877
we just did a test to confirm that grassy glide is buffed to 60bp by tera without terrain, but for now the calc doesn't automatically update it from 55 to 60 when you de-select terrain
It does seem to get buffed to 60 BP when I deselect Grassy Terrain: '252+ Atk Choice Band Tera Grass Rillaboom Grassy Glide (60 BP) vs. 0 HP / 0 Def Mew: 210-248 (61.5 - 72.7%) -- guaranteed 2HKO'. You can see that yours has the 'after Grassy Terrain recovery' so the terrain must be active if that's the case.
 

1LDK

It's never going to get better
is a Top Team Rater
Hey, this is just a minor thing, and maybe I'm dumb in case im putting it wrong, but the calc does not automatically count wind raider boost under tailwind

Qur2xUaj2u.png

csZnNqwr2j.png
 
I noticed about 12 hours ago that the SwSh calculator isn't functionally properly. The Dynamax button is changing the Pokemon's HP value, but it's not updating the Pokemon's moves to their dynamax equivalents.
 

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

Top